Delete unused scripts
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
#! /usr/bin/env python3
|
||||
|
||||
import os
|
||||
import glob
|
||||
import random
|
||||
|
||||
homedir = os.environ['HOME']
|
||||
|
||||
wallpapers = glob.glob(f"{homedir}/Pictures/Wallpapers/*")
|
||||
|
||||
while True:
|
||||
wallpaper = random.choice(wallpapers)
|
||||
|
||||
if wallpaper.__contains__("README.md"):
|
||||
continue
|
||||
else:
|
||||
break
|
||||
|
||||
print(wallpaper)
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
# This script requires i3ipc-python package (install it from a system package manager
|
||||
# or pip).
|
||||
# It makes inactive windows transparent. Use `transparency_val` variable to control
|
||||
# transparency strength in range of 0…1 or use the command line argument -o.
|
||||
|
||||
import argparse
|
||||
import i3ipc
|
||||
import signal
|
||||
import sys
|
||||
from functools import partial
|
||||
|
||||
def on_window_focus(inactive_opacity, ipc, event):
|
||||
global prev_focused
|
||||
global prev_workspace
|
||||
|
||||
focused_workspace = ipc.get_tree().find_focused()
|
||||
|
||||
if focused_workspace == None:
|
||||
return
|
||||
|
||||
focused = event.container
|
||||
workspace = focused_workspace.workspace().num
|
||||
|
||||
if focused.id != prev_focused.id: # https://github.com/swaywm/sway/issues/2859
|
||||
focused.command("opacity 1")
|
||||
if workspace == prev_workspace:
|
||||
prev_focused.command("opacity " + inactive_opacity)
|
||||
prev_focused = focused
|
||||
prev_workspace = workspace
|
||||
|
||||
|
||||
def remove_opacity(ipc):
|
||||
for workspace in ipc.get_tree().workspaces():
|
||||
for w in workspace:
|
||||
w.command("opacity 1")
|
||||
ipc.main_quit()
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
transparency_val = "0.80"
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
description="This script allows you to set the transparency of unfocused windows in sway."
|
||||
)
|
||||
parser.add_argument(
|
||||
"--opacity",
|
||||
"-o",
|
||||
type=str,
|
||||
default=transparency_val,
|
||||
help="set opacity value in range 0...1",
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
ipc = i3ipc.Connection()
|
||||
prev_focused = None
|
||||
prev_workspace = ipc.get_tree().find_focused().workspace().num
|
||||
|
||||
for window in ipc.get_tree():
|
||||
if window.focused:
|
||||
prev_focused = window
|
||||
else:
|
||||
window.command("opacity " + args.opacity)
|
||||
for sig in [signal.SIGINT, signal.SIGTERM]:
|
||||
signal.signal(sig, lambda signal, frame: remove_opacity(ipc))
|
||||
ipc.on("window::focus", partial(on_window_focus, args.opacity))
|
||||
ipc.main()
|
||||
@@ -1,26 +0,0 @@
|
||||
#! /bin/bash
|
||||
|
||||
packages=$(pacman -Qqe)
|
||||
packagesToDelete=()
|
||||
|
||||
_GREEN=$(tput setaf 2)
|
||||
_RED=$(tput setaf 1)
|
||||
_RESET=$(tput sgr0)
|
||||
|
||||
for package in ${packages[@]}
|
||||
do
|
||||
description=`pacman -Qi $package | grep -i description | awk -F: '{ print $2 }'`
|
||||
|
||||
echo "${_GREEN}$package${_RESET} - $description"
|
||||
|
||||
read -p "${_RED}Delete it? (y/N)${_RESET}: " yes
|
||||
|
||||
if [ "$yes" == "Y" -o "$yes" == "y" ] ; then
|
||||
packagesToDelete+=("$package")
|
||||
echo "Added $package to list of packages to delete"
|
||||
else
|
||||
echo "Ok, skipping"
|
||||
fi
|
||||
done
|
||||
|
||||
sudo pacman -Rs ${packagesToDelete[@]}
|
||||
Reference in New Issue
Block a user