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]]
- [[#imports][Imports]]
- [[#variables][Variables]]
- [[#autostart][Autostart]]
- [[#autostart-the-startup-hook][Autostart (The Startup Hook)]]
- [[#gridselect][Gridselect]]
- [[#scratchpads][Scratchpads]]
- [[#layouts][Layouts]]
@ -143,25 +143,31 @@ windowCount :: X (Maybe String)
windowCount = gets $ Just . show . length . W.integrate' . W.stack . W.workspace . W.current . windowset
#+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.
#+BEGIN_SRC haskell
myStartupHook :: X ()
myStartupHook = do
spawnOnce "lxsession &"
spawnOnce "~/.fehbg &" -- set last saved wallpaper
-- spawnOnce "feh --randomize --bg-fill ~/wallpapers/*" -- set random wallpaper
spawnOnce "picom &"
spawnOnce "nm-applet &"
spawnOnce "volumeicon &"
spawnOnce "conky -c $HOME/.config/conky/xmonad.conkyrc"
spawnOnce "trayer --edge top --align right --widthtype request --padding 6 --SetDockType true --SetPartialStrut true --expand true --monitor 1 --transparent true --alpha 0 --tint 0x282c34 --height 22 &"
spawnOnce "/usr/bin/emacs --daemon &" -- emacs daemon for the emacsclient
-- spawnOnce "kak -d -s mysession &" -- kakoune 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
setWMName "LG3D"
spawnOnce "lxsession &"
spawnOnce "picom &"
spawnOnce "nm-applet &"
spawnOnce "volumeicon &"
spawnOnce "conky -c $HOME/.config/conky/xmonad.conkyrc"
spawnOnce "trayer --edge top --align right --widthtype request --padding 6 --SetDockType true --SetPartialStrut true --expand true --monitor 1 --transparent true --alpha 0 --tint 0x282c34 --height 22 &"
spawnOnce "/usr/bin/emacs --daemon &" -- emacs daemon for the emacsclient
-- spawnOnce "kak -d -s mysession &" -- kakoune daemon for better performance
-- spawnOnce "urxvtd -q -o -f &" -- urxvt daemon for better performance
#+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"
#+END_SRC
* Gridselect
@ -545,7 +551,8 @@ myKeys =
-- 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.
, ("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)
, ("M-u p", spawn "mocp --play")

View File

@ -104,19 +104,22 @@ windowCount = gets $ Just . show . length . W.integrate' . W.stack . W.workspace
myStartupHook :: X ()
myStartupHook = do
spawnOnce "lxsession &"
spawnOnce "~/.fehbg &" -- set last saved wallpaper
-- spawnOnce "feh --randomize --bg-fill ~/wallpapers/*" -- set random wallpaper
spawnOnce "picom &"
spawnOnce "nm-applet &"
spawnOnce "volumeicon &"
spawnOnce "conky -c $HOME/.config/conky/xmonad.conkyrc"
spawnOnce "trayer --edge top --align right --widthtype request --padding 6 --SetDockType true --SetPartialStrut true --expand true --monitor 1 --transparent true --alpha 0 --tint 0x282c34 --height 22 &"
spawnOnce "/usr/bin/emacs --daemon &" -- emacs daemon for the emacsclient
-- spawnOnce "kak -d -s mysession &" -- kakoune 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
setWMName "LG3D"
spawnOnce "lxsession &"
spawnOnce "picom &"
spawnOnce "nm-applet &"
spawnOnce "volumeicon &"
spawnOnce "conky -c $HOME/.config/conky/xmonad.conkyrc"
spawnOnce "trayer --edge top --align right --widthtype request --padding 6 --SetDockType true --SetPartialStrut true --expand true --monitor 1 --transparent true --alpha 0 --tint 0x282c34 --height 22 &"
spawnOnce "/usr/bin/emacs --daemon &" -- emacs daemon for the emacsclient
-- spawnOnce "kak -d -s mysession &" -- kakoune daemon for better performance
-- spawnOnce "urxvtd -q -o -f &" -- urxvt daemon for better performance
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"
myColorizer :: Window -> Bool -> X (String, String)
myColorizer = colorRangeFromClassName
@ -445,7 +448,8 @@ myKeys =
-- 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.
, ("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)
, ("M-u p", spawn "mocp --play")