Skip to content

Latest commit

 

History

History
60 lines (45 loc) · 1.14 KB

File metadata and controls

60 lines (45 loc) · 1.14 KB

inotify

Commands:

# Package: inotify-tools
inotifywatch
inotifywait

Loop in file change:

while true; do
  inotifywait -m -e modify $sassdir/** | \
  sassc -Mt expanded $mainsass $gtkcss && \
  xfconf-query -c xsettings -p /Net/ThemeName -r && \
  xfconf-query -c xsettings -p /Net/ThemeName -s Lightly
done

Loop in file change and show what file:

while true; do
  inotifywait -m -e modify dir/** | while read path action file; do
    echo "File: $path$file"
    echo "Action: $action"
  done
done

To set the theme in Gnome, run the following commands in terminal:

gsettings set org.gnome.desktop.interface gtk-theme "Numix"
gsettings set org.gnome.desktop.wm.preferences theme "Numix"

To set the theme in Xfce, run the following commands in terminal:

xfconf-query -c xsettings -p /Net/ThemeName -s "Numix"
xfconf-query -c xfwm4 -p /general/theme -s "Numix"

Example Numix:

while true; do
  inotifywait @gtk.gresource -qr -e modify -e create -e delete $(RES_DIR);
done

Example Phocus:

xsettingsd -c <(echo 'Net/ThemeName \"phocus\"') >/dev/null 2>&1 & sleep 0.2 && kill $!