aboutsummaryrefslogtreecommitdiff
path: root/.local/share
diff options
context:
space:
mode:
Diffstat (limited to '.local/share')
-rwxr-xr-x.local/share/bin/ipod-sync6
-rwxr-xr-x.local/share/bin/mode11
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