diff --git a/org/config/awesome.org b/org/config/awesome.org index ad1c17a..b4fb7fd 100644 --- a/org/config/awesome.org +++ b/org/config/awesome.org @@ -368,9 +368,7 @@ [[https://github.com/l3ib/nitrogen/][Nitrogen]] and [[https://github.com/dylanaraps/pywal][Pywal]]. #+BEGIN_SRC lua local function set_random_pape() - papes = get_papes() - pape = papes[math.random(#papes)] - awful.spawn.with_shell("nitrogen --set-scaled "..pape.." && wal -o wal-set -i "..pape) + awful.spawn.with_shell("pape-update") naughty.notify({ preset = naughty.config.presets.normal, title = "Wallpaper change", text = "Done!"}) @@ -385,8 +383,7 @@ wallpaper: #+BEGIN_SRC lua local function set_wallpaper(_) - awful.spawn.with_shell("nitrogen --set-scaled (cat $HOME/.cache/wal/wal)") - awful.spawn.with_shell("wal -i (cat $HOME/.cache/wal/wal)") + awful.spawn.with_shell("wal -i (cat $HOME/.cache/wal/wal) && pape-restore") awful.spawn.with_shell("xrdb $HOME/.Xresources") end #+END_SRC diff --git a/org/config/bin.org b/org/config/bin.org index fbc80e7..dee21d2 100644 --- a/org/config/bin.org +++ b/org/config/bin.org @@ -26,6 +26,8 @@ - [[#emoji-picker][Emoji picker]] - [[#lock][Lock]] - [[#mp42webm][mp42webm]] +- [[#pape-update][pape-update]] +- [[#pape-restore][pape-restore]] - [[#pinfo][Pinfo]] - [[#polybar-launch][Polybar-launch]] - [[#rofi-mount][Rofi-mount]] @@ -431,6 +433,33 @@ ffmpeg -i $argv[1] -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis $argv[1].webm #+END_SRC +* pape-update + :PROPERTIES: + :HEADER-ARGS: :tangle ~/.local/bin/pape-update + :CUSTOM_ID: pape-update-bdecbadf + :END: + This little tool updates my wallpaper using both pywal and nitrogen (because + apparently pywal doesn’t like AwesomeWM). It depends on [[#pape-restore-981c39c2][~pape-restore~]]. + #+BEGIN_SRC fish + #!/usr/bin/fish + wal -i ~/Pictures/Wallpapers + pape-restore + #+END_SRC + +* pape-restore + :PROPERTIES: + :HEADER-ARGS: :tangle ~/.local/bin/pape-restore + :CUSTOM_ID: pape-restore-981c39c2 + :END: + Similarly to ~pape-update~, this tool restores my wallpaper back to the same + state as I left it last time. + #+BEGIN_SRC fish + #!/usr/bin/fish + for i in (seq (xrandr --current | grep ' connected' | wc -l)) + nitrogen --set-zoom-fill (cat ~/.cache/wal/wal) --head=(math "$i - 1") + end + #+END_SRC + * Pinfo :PROPERTIES: :HEADER-ARGS: :tangle ~/.local/bin/pinfo