First commit adding linux exclusive scripts

This commit is contained in:
Fabian Schmidt 2020-07-25 19:22:54 +02:00
parent 09d839d92a
commit e9519cd5b4
4 changed files with 1702 additions and 0 deletions

32
animatedWallpaper Executable file
View File

@ -0,0 +1,32 @@
#!/bin/bash
PIDFILE="/var/run/user/$UID/bg.pid"
# Declare PIDs array
declare -a PIDs
_screen() {
# TODO Replace with -wid=WID somehow
xwinwrap -ov -ni -g "$1" -- mpv --fullscreen\
--no-stop-screensaver\
--vo=gpu --hwdec=yuv420p\
--loop-file --no-audio --no-osc --no-osd-bar\
-wid WID --no-input-default-bindings\
"$2" &
# Needs more testing not in fullscreen mode
#xwinwrap -ov -ni -g "$1" -- sxiv "$2" -f -b -a -e WID &
PIDs+=($!)
}
while read p; do
[[ $(ps -p "$p" -o comm=) == "xwinwrap" ]] && kill -9 "$p";
done < $PIDFILE
sleep 0.5
for i in $(xrandr -q | grep ' connected' | grep -oP '\d+x\d+\+\d+\+\d+')
do
_screen "$i" "$1"
done
printf "%s\n" "${PIDs[@]}" > $PIDFILE

20
dmenu_quit Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
test=$(echo -e "Shutdown\nLogout\nSuspend\nReboot\nCancel" | dmenu -i -p "$1")
case "$test" in
Shutdown)
poweroff
;;
Logout)
#herbstclient quit
killall xinit
;;
Suspend)
systemctl suspend
;;
Reboot)
reboot
;;
esac

5
udmenu Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
grep -v "#" ~/.local/bin/unicode | dmenu -i -l 20 -fn "JoyPixels:pixelsize=10" | awk '{print $1}' | tr -d '\n' | xclip -selection clipboard
pgrep -x dunst > /dev/null && notify-send "$(xclip -o -selection clipboard) copied to clipboard"

1645
unicode Normal file

File diff suppressed because it is too large Load Diff