aboutsummaryrefslogtreecommitdiffstats
path: root/herbstluftwm
diff options
context:
space:
mode:
authorGravatar Tom Willemse2022-05-20 22:55:46 -0700
committerGravatar Tom Willemse2022-05-20 22:55:46 -0700
commit8e798ea24f1a08f7d991f114b4e9b2dfa2d0b3d9 (patch)
tree5a070eaf2930a52208ccdc199e76c07238aa0c66 /herbstluftwm
parent286f8d1b06a12b3bc5ad18b7ddb1ce492f766359 (diff)
downloadnew-dotfiles-8e798ea24f1a08f7d991f114b4e9b2dfa2d0b3d9.tar.gz
new-dotfiles-8e798ea24f1a08f7d991f114b4e9b2dfa2d0b3d9.zip
[herbstluftwm] Track the wallpaper used in herbstluftwm
Diffstat (limited to 'herbstluftwm')
-rwxr-xr-xherbstluftwm/.config/herbstluftwm/autostart9
1 files changed, 8 insertions, 1 deletions
diff --git a/herbstluftwm/.config/herbstluftwm/autostart b/herbstluftwm/.config/herbstluftwm/autostart
index 4c2ab7f..aec44a5 100755
--- a/herbstluftwm/.config/herbstluftwm/autostart
+++ b/herbstluftwm/.config/herbstluftwm/autostart
@@ -41,7 +41,14 @@ hc emit_hook reload
## Background image:
# Set a random image as the desktop wallpaper.
-feh --bg-tile $(random-wallpaper)
+wallpaper=$(random-wallpaper)
+
+if ! hc attr my_wallpaper
+then
+ hc new_attr string my_wallpaper
+fi
+
+feh --bg-tile "$wallpaper" && hc set_attr my_wallpaper "$wallpaper"
## Keybindings:
# Remove all existing keybindings so that when herbstluftwm is