diff options
author | mono-b <monoblanco@DRAINERDOMAIN.localdomain> | 2022-12-24 08:48:23 -0300 |
---|---|---|
committer | mono-b <monoblanco@DRAINERDOMAIN.localdomain> | 2022-12-24 08:48:23 -0300 |
commit | 51c9b070ed3dcddfec84943be08e1c2a03e8307f (patch) | |
tree | 0b3c97a9ea41b012db2a252fcfde7808b0353ac4 | |
parent | abd2b4e8990c054013057401cb67a985066cb41c (diff) |
-rwxr-xr-x | screenshots.sh | 3 | ||||
-rwxr-xr-x | themechanger.sh | 15 | ||||
-rwxr-xr-x | waldunst.sh | 9 |
3 files changed, 22 insertions, 5 deletions
diff --git a/screenshots.sh b/screenshots.sh index 00c31e4..73b64f6 100755 --- a/screenshots.sh +++ b/screenshots.sh @@ -1,6 +1,5 @@ #!/bin/sh - # Wal colors dmenu . "${HOME}/.cache/wal/colors.sh" @@ -16,7 +15,7 @@ case $main_menu_selection in "Fullscreen") display_selection=$(xrandr | grep " connected" | awk '{print $1}' | give_to_dmenu -l $number_of_displays -p Display:) screenshot_res=$(xrandr | grep "$display_selection" | grep -o '[[:digit:]]\+x[[:digit:]]\++[[:digit:]]\++[[:digit:]]\+') - screenshot_name=$(echo "" | give_to_dmenu -p Name:) + screenshot_name=$(: | give_to_dmenu -p Name:) maim -g $screenshot_res -d 1 ~/stf/ss/"$screenshot_name.png" && dunstify " Screenshot taken" || dunstify "ERROR: Screenshot not taken" ;; "Region") diff --git a/themechanger.sh b/themechanger.sh index 89d4b91..92f2f55 100755 --- a/themechanger.sh +++ b/themechanger.sh @@ -1,9 +1,18 @@ #!/bin/sh wal=$(sxiv -o -t ~/stf/wals/) -[ "$wal" == "" ] && dunstify "ERROR: No wallpaper was selected" && exit 1 -[ $(echo "$wal" | wc -l) -gt 1 ] && dunstify "ERROR: More than 1 wallpaper selected" && exit 1 +wal_dir=$HOME/.cache/wal -sed -i "s|/home/monoblanco/stf/wals/.*|$wal\"|g" ~/.config/feh/.fehbg && source ~/.config/feh/.fehbg +if [ "$wal" == "" ] ; then + dunstify "ERROR: No wallpaper was selected" + exit 1 +elseif [ $(echo "$wal" | wc -l) -gt 1 ] + dunstify "ERROR: More than 1 wallpaper selected" + exit 1 +fi + +sed -i "s|/home/monoblanco/stf/wals/.*|$wal\"|g" ~/.config/feh/.fehbg +source ~/.config/feh/.fehbg wal -i "$wal" sh walnewsboat.sh +sh waldunst.sh diff --git a/waldunst.sh b/waldunst.sh new file mode 100755 index 0000000..7b116e7 --- /dev/null +++ b/waldunst.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +bg=$(sed -n 1p $HOME/.cache/wal/colors) +fg=$(sed -n 15p $HOME/.cache/wal/colors) +cfg=$HOME/.config/dunst/dunstrc + +kill $(pidof dunst) +sed -i "s/background = \"#[0-9].*\"/background = \"$bg\"/g" "$cfg" +sed -i "s/foreground = \"#[0-9].*\"/foreground = \"$fg\"/g" "$cfg" |