diff options
author | lonkaars <loek@pipeframe.xyz> | 2021-07-20 16:48:59 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2021-07-20 16:48:59 +0200 |
commit | 0ad0ac5e75ad4fa43216f2f8aef3ec09251980c8 (patch) | |
tree | 117c60c2c5c082668411d467407da5a5d3699913 /.local/share/bin | |
parent | e54959e39ec8f326bc0cff3c38e415744c60972f (diff) |
colors but they're different now
Diffstat (limited to '.local/share/bin')
-rwxr-xr-x | .local/share/bin/ipod-sync | 6 | ||||
-rwxr-xr-x | .local/share/bin/mode | 11 |
2 files changed, 16 insertions, 1 deletions
diff --git a/.local/share/bin/ipod-sync b/.local/share/bin/ipod-sync index 92eb0c2..62c8c80 100755 --- a/.local/share/bin/ipod-sync +++ b/.local/share/bin/ipod-sync @@ -2,6 +2,11 @@ UUID="81CC-A462" +if test ! -h "/dev/disk/by-uuid/$UUID"; then + notify-send "ipod-sync" "can't find disk with uuid $UUID" + exit 1 +fi + read -r -d '' commands << EOF echo "mounting..." sudo mount "/dev/disk/by-uuid/$UUID" /mnt/ipod -o uid=loek,gid=users @@ -22,4 +27,3 @@ EOF st -T "[floating]" -g "100x15--154-140" -e sh -c "$commands" - diff --git a/.local/share/bin/mode b/.local/share/bin/mode index 5668d3e..904ff03 100755 --- a/.local/share/bin/mode +++ b/.local/share/bin/mode @@ -60,6 +60,16 @@ EOF echo "$conf" > ~/.config/zathura/colors } +switch_gtk() { + if [[ $1 == "light" ]]; then + sed "s/-Dark/-Light/" -i ~/.config/gtk-3.0/settings.ini + sed "s/gtk-application-prefer-dark-theme.*/gtk-application-prefer-dark-theme=false/" -i ~/.config/gtk-3.0/settings.ini + else + sed "s/-Light/-Dark/" -i ~/.config/gtk-3.0/settings.ini + sed "s/gtk-application-prefer-dark-theme.*/gtk-application-prefer-dark-theme=true/" -i ~/.config/gtk-3.0/settings.ini + fi +} + reload_terms() { read -r -d '' escape_msgs << EOF \033]11;$(get_color background)\007 @@ -105,6 +115,7 @@ switch_cfgs() { switch_xrdb $1 switch_dunst $1 switch_zathura $1 + switch_gtk $1 echo $1 > ~/.local/share/mode/active rm ~/.local/share/mode/dark ~/.local/share/mode/light |