From 8921f3445ce41d234f0347439764c805d89b6f77 Mon Sep 17 00:00:00 2001 From: Derek Taylor Date: Tue, 31 Aug 2021 18:26:31 -0500 Subject: [PATCH] Editing xmonad keybindings and sxiv handler. --- .config/sxiv/exec/key-handler | 4 ---- .xmonad/README.org | 21 ++++++++++----------- .xmonad/xmonad.hs | 18 +++++++++--------- 3 files changed, 19 insertions(+), 24 deletions(-) diff --git a/.config/sxiv/exec/key-handler b/.config/sxiv/exec/key-handler index d981466..e5a24a2 100755 --- a/.config/sxiv/exec/key-handler +++ b/.config/sxiv/exec/key-handler @@ -50,10 +50,6 @@ do notify-send "File information" \ "$(mediainfo "$file" | tr -s ' ' | grep -v CompleteName_Last)" ;; - "w") - feh --bg-scale "$file" && - notify-send "$file has been set as your wallpaper." && exit 0 - ;; "x") xwallpaper --stretch "$file" && filename=$HOME/.xwallpaper diff --git a/.xmonad/README.org b/.xmonad/README.org index 69cc977..cccd7ef 100644 --- a/.xmonad/README.org +++ b/.xmonad/README.org @@ -155,14 +155,13 @@ myStartupHook = do 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 + -- uncomment to restore last saved wallpaper + spawnOnce "xargs xwallpaper --stretch < ~/.xwallpaper" + --uncomment to set a random wallpaper on login + -- spawnOnce "find /usr/share/backgrounds/dtos-backgrounds/ -type f | shuf -n 1 | xargs xwallpaper --stretch" #+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 "find ~/wallpapers/ -type f | 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 @@ -170,7 +169,7 @@ Uncomment only ONE of the following options for setting wallpaper. #+END_SRC * Gridselect -GridSelect displays items (programs, open windows, etc.) in a 2D grid and lets the user select from it with the cursor/hjkl keys or the mouse. +GridSelect displays items (programs, open windows, etc.) in a 2D grid and lets the user selectfrom it with the cursor/hjkl keys or the mouse. #+BEGIN_SRC haskell myColorizer :: Window -> Bool -> X (String, String) @@ -558,11 +557,11 @@ myKeys = , ("C-s c", namedScratchpadAction myScratchPads "calculator") -- KB_GROUP Set wallpaper - -- 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-", spawn "sxiv -r -q -t -o ~/wallpapers/*") - , ("M-", spawn "find ~/wallpapers/ -type f | shuf -n 1 | xargs xwallpaper --stretch") - -- , ("M-", spawn "feh --randomize --bg-fill ~/wallpapers/*") + -- Set wallpaper with either 'xwallwaper'. Type 'SUPER+F1' to launch sxiv in the + -- wallpapers directory; then in sxiv, type 'C-x x' to set the wallpaper that you + -- choose. Or, type 'SUPER+F2' to set a random wallpaper. + , ("M-", spawn "sxiv -r -q -t -o /usr/share/backgrounds/dtos-backgrounds/*") + , ("M-", spawn "find /usr/share/backgrounds/dtos-backgrounds// -type f | shuf -n 1 | xargs xwallpaper --stretch") -- KB_GROUP Controls for mocp music player (SUPER-u followed by a key) , ("M-u p", spawn "mocp --play") diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index 135c39e..50d3def 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -106,11 +106,11 @@ myStartupHook = do 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 + -- uncomment to restore last saved wallpaper + spawnOnce "xargs xwallpaper --stretch < ~/.xwallpaper" + --uncomment to set a random wallpaper on login + -- spawnOnce "find /usr/share/backgrounds/dtos-backgrounds/ -type f | shuf -n 1 | xargs xwallpaper --stretch" - spawnOnce "xargs xwallpaper --stretch < ~/.xwallpaper" -- set last saved with xwallpaper - -- spawnOnce "find ~/wallpapers/ -type f | 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 @@ -448,11 +448,11 @@ myKeys = , ("C-s c", namedScratchpadAction myScratchPads "calculator") -- KB_GROUP Set wallpaper - -- 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-", spawn "sxiv -r -q -t -o ~/wallpapers/*") - , ("M-", spawn "find ~/wallpapers/ -type f | shuf -n 1 | xargs xwallpaper --stretch") - -- , ("M-", spawn "feh --randomize --bg-fill ~/wallpapers/*") + -- Set wallpaper with either 'xwallwaper'. Type 'SUPER+F1' to launch sxiv in the + -- wallpapers directory; then in sxiv, type 'C-x x' to set the wallpaper that you + -- choose. Or, type 'SUPER+F2' to set a random wallpaper. + , ("M-", spawn "sxiv -r -q -t -o /usr/share/backgrounds/dtos-backgrounds/*") + , ("M-", spawn "find /usr/share/backgrounds/dtos-backgrounds// -type f | shuf -n 1 | xargs xwallpaper --stretch") -- KB_GROUP Controls for mocp music player (SUPER-u followed by a key) , ("M-u p", spawn "mocp --play")