Adding options for xwallpaper OR feh.

This commit is contained in:
Derek Taylor 2021-04-21 16:38:06 -05:00
parent c0e29a2c67
commit 6b45bac21b
2 changed files with 41 additions and 30 deletions

View File

@ -6,7 +6,7 @@
- [[#about-this-config][About This Config]] - [[#about-this-config][About This Config]]
- [[#imports][Imports]] - [[#imports][Imports]]
- [[#variables][Variables]] - [[#variables][Variables]]
- [[#autostart][Autostart]] - [[#autostart-the-startup-hook][Autostart (The Startup Hook)]]
- [[#gridselect][Gridselect]] - [[#gridselect][Gridselect]]
- [[#scratchpads][Scratchpads]] - [[#scratchpads][Scratchpads]]
- [[#layouts][Layouts]] - [[#layouts][Layouts]]
@ -143,15 +143,13 @@ windowCount :: X (Maybe String)
windowCount = gets $ Just . show . length . W.integrate' . W.stack . W.workspace . W.current . windowset windowCount = gets $ Just . show . length . W.integrate' . W.stack . W.workspace . W.current . windowset
#+END_SRC #+END_SRC
* Autostart * Autostart (The Startup Hook)
These are commands we want XMonad to execute on startup, such as running a compositor, setting our wallpaper, starting the emacs daemon, and starting our system tray and the applications that belong in it. These are commands we want XMonad to execute on startup, such as running a compositor, setting our wallpaper, starting the emacs daemon, and starting our system tray and the applications that belong in it.
#+BEGIN_SRC haskell #+BEGIN_SRC haskell
myStartupHook :: X () myStartupHook :: X ()
myStartupHook = do myStartupHook = do
spawnOnce "lxsession &" spawnOnce "lxsession &"
spawnOnce "~/.fehbg &" -- set last saved wallpaper
-- spawnOnce "feh --randomize --bg-fill ~/wallpapers/*" -- set random wallpaper
spawnOnce "picom &" spawnOnce "picom &"
spawnOnce "nm-applet &" spawnOnce "nm-applet &"
spawnOnce "volumeicon &" spawnOnce "volumeicon &"
@ -160,7 +158,15 @@ myStartupHook = do
spawnOnce "/usr/bin/emacs --daemon &" -- emacs daemon for the emacsclient spawnOnce "/usr/bin/emacs --daemon &" -- emacs daemon for the emacsclient
-- spawnOnce "kak -d -s mysession &" -- kakoune daemon for better performance -- spawnOnce "kak -d -s mysession &" -- kakoune daemon for better performance
-- spawnOnce "urxvtd -q -o -f &" -- urxvt daemon for better performance -- spawnOnce "urxvtd -q -o -f &" -- urxvt daemon for better performance
-- spawnOnce "nitrogen --restore &" -- if you prefer nitrogen to feh for wallpaper setter #+END_SRC
Uncomment only ONE of the following options for setting wallpaper.
#+BEGIN_SRC haskell
spawnOnce "xargs xwallpaper --stretch < ~/.xwallpaper" -- set last saved with xwallpaper
-- spawnOnce "/bin/ls ~/wallpapers | shuf -n 1 | xargs xwallpaper --stretch" -- set random xwallpaper
-- spawnOnce "~/.fehbg &" -- set last saved feh wallpaper
-- spawnOnce "feh --randomize --bg-fill ~/wallpapers/*" -- feh set random wallpaper
-- spawnOnce "nitrogen --restore &" -- if you prefer nitrogen to feh
setWMName "LG3D" setWMName "LG3D"
#+END_SRC #+END_SRC
@ -545,7 +551,8 @@ myKeys =
-- Set wallpaper with 'feh'. Type 'SUPER+F1' to launch sxiv in the wallpapers directory. -- Set wallpaper with 'feh'. Type 'SUPER+F1' to launch sxiv in the wallpapers directory.
-- Then in sxiv, type 'C-x w' to set the wallpaper that you choose. -- Then in sxiv, type 'C-x w' to set the wallpaper that you choose.
, ("M-<F1>", spawn "sxiv -r -q -t -o ~/wallpapers/*") , ("M-<F1>", spawn "sxiv -r -q -t -o ~/wallpapers/*")
, ("M-<F2>", spawn "feh --randomize --bg-fill ~/wallpapers/*") , ("M-<F2>", spawn "/bin/ls ~/wallpapers | shuf -n 1 | xargs xwallpaper --stretch")
--, ("M-<F2>", spawn "feh --randomize --bg-fill ~/wallpapers/*")
-- Controls for mocp music player (SUPER-u followed by a key) -- Controls for mocp music player (SUPER-u followed by a key)
, ("M-u p", spawn "mocp --play") , ("M-u p", spawn "mocp --play")

View File

@ -105,8 +105,6 @@ windowCount = gets $ Just . show . length . W.integrate' . W.stack . W.workspace
myStartupHook :: X () myStartupHook :: X ()
myStartupHook = do myStartupHook = do
spawnOnce "lxsession &" spawnOnce "lxsession &"
spawnOnce "~/.fehbg &" -- set last saved wallpaper
-- spawnOnce "feh --randomize --bg-fill ~/wallpapers/*" -- set random wallpaper
spawnOnce "picom &" spawnOnce "picom &"
spawnOnce "nm-applet &" spawnOnce "nm-applet &"
spawnOnce "volumeicon &" spawnOnce "volumeicon &"
@ -115,7 +113,12 @@ myStartupHook = do
spawnOnce "/usr/bin/emacs --daemon &" -- emacs daemon for the emacsclient spawnOnce "/usr/bin/emacs --daemon &" -- emacs daemon for the emacsclient
-- spawnOnce "kak -d -s mysession &" -- kakoune daemon for better performance -- spawnOnce "kak -d -s mysession &" -- kakoune daemon for better performance
-- spawnOnce "urxvtd -q -o -f &" -- urxvt daemon for better performance -- spawnOnce "urxvtd -q -o -f &" -- urxvt daemon for better performance
-- spawnOnce "nitrogen --restore &" -- if you prefer nitrogen to feh for wallpaper setter
spawnOnce "xargs xwallpaper --stretch < ~/.xwallpaper" -- set last saved with xwallpaper
-- spawnOnce "/bin/ls ~/wallpapers | shuf -n 1 | xargs xwallpaper --stretch" -- set random xwallpaper
-- spawnOnce "~/.fehbg &" -- set last saved feh wallpaper
-- spawnOnce "feh --randomize --bg-fill ~/wallpapers/*" -- feh set random wallpaper
-- spawnOnce "nitrogen --restore &" -- if you prefer nitrogen to feh
setWMName "LG3D" setWMName "LG3D"
myColorizer :: Window -> Bool -> X (String, String) myColorizer :: Window -> Bool -> X (String, String)
@ -445,7 +448,8 @@ myKeys =
-- Set wallpaper with 'feh'. Type 'SUPER+F1' to launch sxiv in the wallpapers directory. -- Set wallpaper with 'feh'. Type 'SUPER+F1' to launch sxiv in the wallpapers directory.
-- Then in sxiv, type 'C-x w' to set the wallpaper that you choose. -- Then in sxiv, type 'C-x w' to set the wallpaper that you choose.
, ("M-<F1>", spawn "sxiv -r -q -t -o ~/wallpapers/*") , ("M-<F1>", spawn "sxiv -r -q -t -o ~/wallpapers/*")
, ("M-<F2>", spawn "feh --randomize --bg-fill ~/wallpapers/*") , ("M-<F2>", spawn "/bin/ls ~/wallpapers | shuf -n 1 | xargs xwallpaper --stretch")
--, ("M-<F2>", spawn "feh --randomize --bg-fill ~/wallpapers/*")
-- Controls for mocp music player (SUPER-u followed by a key) -- Controls for mocp music player (SUPER-u followed by a key)
, ("M-u p", spawn "mocp --play") , ("M-u p", spawn "mocp --play")