diff options
author | rafa_99 <rafa99@protonmail.com> | 2020-10-10 22:56:00 +0100 |
---|---|---|
committer | rafa_99 <rafa99@protonmail.com> | 2020-10-10 22:56:00 +0100 |
commit | fd1f1013e3335bdddb6aed705c6819f9dc010fad (patch) | |
tree | 6f39fe30aeae3128e5ed78d39f2d9bdd54b46b45 /sxiv | |
parent | c3a2aadbc427ddeaf18dd3ce5b4e00f718025f13 (diff) |
Dots Upgrade to use GNU Stow Organization
Diffstat (limited to 'sxiv')
-rwxr-xr-x | sxiv/.config/sxiv/exec/key-handler | 11 | ||||
-rwxr-xr-x | sxiv/.local/bin/colorset | 36 |
2 files changed, 47 insertions, 0 deletions
diff --git a/sxiv/.config/sxiv/exec/key-handler b/sxiv/.config/sxiv/exec/key-handler new file mode 100755 index 0000000..4dbf761 --- /dev/null +++ b/sxiv/.config/sxiv/exec/key-handler @@ -0,0 +1,11 @@ +#!/bin/sh +while read -r FILE +do + case "$1" in + "d") + rm -rf "$FILE" + ;; + "w") + printf "$FILE" | xclip -selection clipboard + esac +done diff --git a/sxiv/.local/bin/colorset b/sxiv/.local/bin/colorset new file mode 100755 index 0000000..50b087f --- /dev/null +++ b/sxiv/.local/bin/colorset @@ -0,0 +1,36 @@ +#!/bin/sh + +if [ -f /usr/bin/wal ]; then + /usr/bin/wal -i "$1" +else + wal -i "$1" +fi + +# Checking for non-existant dirs +! [ -f "$SUCK"/colors/dmenu ] && mkdir -p "$SUCK"/colors/dmenu +! [ -f "$SUCK"/colors/dwm ] && mkdir -p "$SUCK"/colors/dwm +! [ -f "$SUCK"/colors/st ] && mkdir -p "$SUCK"/colors/st +! [ -f "$SUCK"/colors/tabbed ] && mkdir -p "$SUCK"/colors/tabbed + +# Purging previous colorscheme files +convert "$1" "$SUCK"/colors/wallpaper.png + +# Setting the new colorscheme based on the wallpaper +cp ~/.cache/wal/colors-wal-dmenu.h "$SUCK"/colors/dmenu/colors.h +cp ~/.cache/wal/colors-wal-st.h "$SUCK"/colors/st/colors.h +head -7 ~/.cache/wal/colors-wal-dwm.h > "$SUCK"/colors/dwm/colors.h +cp ~/.cache/wal/colors-wal-tabbed.h "$SUCK"/colors/tabbed/colors.h + +# Recompiling Suckless Programs with new colorscheme +cp -rf "$SUCK"/colors/* "$SUCK" +cp -rf "$SUCK"/colors/wallpaper.png ~/.config/wallpaper + +xwallpaper --stretch "$WALLPAPER" +cd "$SUCK"/dwm && git pull ; doas make clean install ; make clean +cd "$SUCK"/slstatus && git pull ; doas make clean install ; make clean +cd "$SUCK"/dmenu && git pull ; doas make clean install ; make clean +cd "$SUCK"/st && git pull ; doas make clean install ; make clean +cd "$SUCK"/tabbed && git pull ; doas make clean install ; make clean +cd "$SUCK"/farbfeld && git pull ; doas make clean install ; make clean +cd "$SUCK"/sent && git pull ; doas make clean install ; make clean +cd "$SUCK"/slock && git pull ; doas make clean install ; make clean |