From 5cd8c3600987df07a40764a9dca6cb425f3378c1 Mon Sep 17 00:00:00 2001 From: Derek Taylor Date: Thu, 12 Nov 2020 16:57:50 -0600 Subject: [PATCH] Minor edits. --- .bashrc | 4 - .config/fish/config.fish | 4 - .config/qtile/README.org | 4 +- .config/stumpwm/config | 37 ++++- .dmenu/dmenu-edit-configs.sh | 2 +- .dmenu/dmenu-surfraw.sh | 2 +- .xmonad/README.org | 287 ++++++++++++++++++++--------------- .xmonad/xmonad.hs | 268 ++++++++++++++++++-------------- dwmblocks/blocks.h | 12 +- dwmblocks/dwmblocks | Bin 18136 -> 18192 bytes 10 files changed, 360 insertions(+), 260 deletions(-) diff --git a/.bashrc b/.bashrc index e6e637d..12f52ac 100644 --- a/.bashrc +++ b/.bashrc @@ -165,10 +165,6 @@ alias status='git status' alias tag='git tag' alias newtag='git tag -a' -# shutdown or reboot -alias ssn="sudo shutdown now" -alias sr="sudo reboot" - # Merge Xresources alias merge='xrdb -merge ~/.Xresources' diff --git a/.config/fish/config.fish b/.config/fish/config.fish index bf7c809..6738f49 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -332,10 +332,6 @@ alias psmem10='ps auxf | sort -nr -k 4 | head -10' alias pscpu='ps auxf | sort -nr -k 3' alias pscpu10='ps auxf | sort -nr -k 3 | head -10' -# shutdown or reboot -alias ssn="sudo shutdown now" -alias sr="sudo reboot" - # Merge Xresources alias merge='xrdb -merge ~/.Xresources' diff --git a/.config/qtile/README.org b/.config/qtile/README.org index 57e6e0e..dabed8d 100644 --- a/.config/qtile/README.org +++ b/.config/qtile/README.org @@ -59,9 +59,10 @@ import os import re import socket import subprocess -from libqtile.config import Key, Screen, Group, Drag, Click +from libqtile.config import KeyChord. Key, Screen, Group, Drag, Click from libqtile.command import lazy from libqtile import layout, bar, widget, hook +from libqtile.lazy import lazy from typing import List # noqa: F401 #+END_SRC @@ -232,7 +233,6 @@ keys = [ desc='Passmenu' ), Key(["mod1", "control"], "r", - lazy.spawn("./.dmenu/dmenu-reddio.sh"), desc='Dmenu reddio script' ), Key(["mod1", "control"], "s", diff --git a/.config/stumpwm/config b/.config/stumpwm/config index 1b197e5..0791563 100755 --- a/.config/stumpwm/config +++ b/.config/stumpwm/config @@ -58,8 +58,12 @@ (stumpwm:gnewbg "Eight") (stumpwm:toggle-mode-line (stumpwm:current-screen) (stumpwm:current-head)) -;; change the prefix key to something else -(set-prefix-key (kbd "C-z")) +;; I change the prefix key to something else besides a keychord. +;; The following three lines are a dirty hack to make SUPER the prefix key. +;; This was originally (set-prefix-key (kbd "C-t")) +(run-shell-command "xmodmap -e 'clear mod4'" t) +(run-shell-command "xmodmap -e \'keycode 133 = F20\'" t) +(set-prefix-key (kbd "F20")) ;; prompt the user for an interactive command. The first arg is an ;; optional initial contents. @@ -68,13 +72,35 @@ (when cmd (eval-command cmd t)))) -(define-key *root-map* (kbd "q") "quit") +(define-key *root-map* (kbd "Q") "quit") +(define-key *root-map* (kbd "R") "restart-hard") +(define-key *root-map* (kbd "c") "command-mode") + +;; (define-key *root-map* (kbd "h") "move-focus left") +;; (define-key *root-map* (kbd "j") "move-focus down") +;; (define-key *root-map* (kbd "k") "move-focus up") +;; (define-key *root-map* (kbd "l") "move-focus left") + +;; Interactive keymap activated by hitting the SUPER+backslash +;; Then you can simply use h,j,k,l to move focus, or +;; H,J,K,L to move windows. Esc will exit this keymap. +(define-interactive-keymap imove-window nil + ((kbd "h") "move-focus left") + ((kbd "j") "move-focus down") + ((kbd "k") "move-focus up") + ((kbd "l") "move-focus right") + ((kbd "H") "move-window left") + ((kbd "J") "move-window down") + ((kbd "K") "move-window up") + ((kbd "L") "move-window right")) +(define-key *top-map* (kbd "C-\\") "imove-window") + (define-key *root-map* (kbd "C-m") "mode-line") ;; Launch My Terminal (st) -(define-key *root-map* (kbd "RET") "exec alacritty") +(define-key *root-map* (kbd "RET") "exec alacritty -e fish") (define-key *root-map* (kbd "C-c") "exec st") ;; Launch Emacs -(define-key *root-map* (kbd "S-RET") "exec emacsclient -c") +(define-key *root-map* (kbd "e") "exec emacsclient -c -a") ;; Launch Dmenu (define-key *root-map* (kbd "d") "exec dmenu_run") ;; My Dmenu Scripts @@ -108,7 +134,6 @@ (set-font "-xos4-terminus-medium-r-normal--13-140-72-72-c-80-iso8859-14") ;;; Define window placement policy... - ;; Clear rules (clear-window-placement-rules) diff --git a/.dmenu/dmenu-edit-configs.sh b/.dmenu/dmenu-edit-configs.sh index d17c60b..848cffc 100755 --- a/.dmenu/dmenu-edit-configs.sh +++ b/.dmenu/dmenu-edit-configs.sh @@ -42,7 +42,7 @@ xresources zsh quit") -choice=$(echo -e "${options[@]}" | dmenu -i -p 'Edit config file: ') +choice=$(echo -e "${options[@]}" | dmenu -p 'Edit config file: ') case "$choice" in quit) diff --git a/.dmenu/dmenu-surfraw.sh b/.dmenu/dmenu-surfraw.sh index 848d556..5d54f85 100755 --- a/.dmenu/dmenu-surfraw.sh +++ b/.dmenu/dmenu-surfraw.sh @@ -7,7 +7,7 @@ # # Dmenu script for launching surfaw, a command line search utility. -cmd="dmenu -i" +cmd="dmenu" while [ -z "$engine" ]; do engine=$(sr -elvi | gawk '{if (NR!=1) { print $1 }}' | $cmd -p "Search engine?") || exit diff --git a/.xmonad/README.org b/.xmonad/README.org index ed6893b..e3cbb78 100644 --- a/.xmonad/README.org +++ b/.xmonad/README.org @@ -19,6 +19,8 @@ - [[#scratchpads][Scratchpads]] - [[#layouts][Layouts]] - [[#workspaces][Workspaces]] + - [[#standard-non-clickable-workspaces][Standard Non-Clickable Workspaces]] + - [[#clickable-workspaces][Clickable Workspaces]] - [[#managehook][Managehook]] - [[#loghook][Loghook]] - [[#keybindings][Keybindings]] @@ -61,7 +63,7 @@ import XMonad.Actions.WithAll (sinkAll, killAll) import qualified XMonad.Actions.Search as S -- Data -import Data.Char (isSpace) +import Data.Char (isSpace, toUpper) import Data.Monoid import Data.Maybe (isJust) import Data.Tree @@ -92,9 +94,12 @@ import XMonad.Layout.Magnifier import XMonad.Layout.MultiToggle (mkToggle, single, EOT(EOT), (??)) import XMonad.Layout.MultiToggle.Instances (StdTransformers(NBFULL, MIRROR, NOBORDERS)) import XMonad.Layout.NoBorders -import XMonad.Layout.Renamed (renamed, Rename(Replace)) +import XMonad.Layout.Renamed import XMonad.Layout.ShowWName +import XMonad.Layout.Simplest import XMonad.Layout.Spacing +import XMonad.Layout.SubLayouts +import XMonad.Layout.WindowNavigation import XMonad.Layout.WindowArranger (windowArrange, WindowArrangerMsg(..)) import qualified XMonad.Layout.ToggleLayouts as T (toggleLayouts, ToggleLayout(Toggle)) import qualified XMonad.Layout.MultiToggle as MT (Toggle(..)) @@ -105,7 +110,7 @@ import XMonad.Prompt.Input import XMonad.Prompt.FuzzyMatch import XMonad.Prompt.Man import XMonad.Prompt.Pass -import XMonad.Prompt.Shell (shellPrompt) +import XMonad.Prompt.Shell import XMonad.Prompt.Ssh import XMonad.Prompt.XMonad import Control.Arrow (first) @@ -145,7 +150,7 @@ myNormColor :: String myNormColor = "#282c34" -- Border color of normal windows myFocusColor :: String -myFocusColor = "#bbc5ff" -- Border color of focused windows +myFocusColor = "#46d9ff" -- Border color of focused windows altMask :: KeyMask altMask = mod1Mask -- Setting this for use in xprompts @@ -546,7 +551,7 @@ dtXPConfig = def , promptBorderWidth = 0 , promptKeymap = dtXPKeymap , position = Top --- , position = CenteredAt { xpCenterY = 0.3, xpWidth = 0.3 } + -- , position = CenteredAt { xpCenterY = 0.3, xpWidth = 0.3 } , height = 20 , historySize = 256 , historyFilter = id @@ -555,8 +560,11 @@ dtXPConfig = def , showCompletionOnTab = False -- , searchPredicate = isPrefixOf , searchPredicate = fuzzyMatch + , defaultPrompter = id $ map toUpper -- change prompt to UPPER + -- , defaultPrompter = unwords . map reverse . words -- reverse the prompt + -- , defaultPrompter = drop 5 .id (++ "XXXX: ") -- drop first 5 chars of prompt and add XXXX: , alwaysHighlight = True - , maxComplRows = Nothing -- set to Just 5 for 5 rows + , maxComplRows = Nothing -- set to 'Just 5' for 5 rows } -- The same config above minus the autocomplete feature which is annoying @@ -583,6 +591,9 @@ promptList' = [ ("c", calcPrompt, "qalc") -- requires qalculate-gtk ] #+END_SRC +#+RESULTS: +: :48:15: error: parse error on input ‘]’ + ** Custom Prompts calcPrompt requires a cli calculator called qalcualte-gtk. You could use this as a template for other custom prompts that use command line programs that return a single line of output. @@ -593,7 +604,6 @@ calcPrompt c ans = where trim = f . f where f = reverse . dropWhile isSpace - #+END_SRC ** Xprompt Keymap @@ -715,31 +725,55 @@ mySpacing' i = spacingRaw True (Border i i i i) True (Border i i i i) True -- Defining a bunch of layouts, many that I don't use. tall = renamed [Replace "tall"] + $ windowNavigation + $ addTabs shrinkText myTabTheme + $ subLayout [] (smartBorders Simplest) $ limitWindows 12 $ mySpacing 8 $ ResizableTall 1 (3/100) (1/2) [] magnify = renamed [Replace "magnify"] + $ windowNavigation + $ addTabs shrinkText myTabTheme + $ subLayout [] (smartBorders Simplest) $ magnifier $ limitWindows 12 $ mySpacing 8 $ ResizableTall 1 (3/100) (1/2) [] monocle = renamed [Replace "monocle"] + $ windowNavigation + $ addTabs shrinkText myTabTheme + $ subLayout [] (smartBorders Simplest) $ limitWindows 20 Full floats = renamed [Replace "floats"] + $ windowNavigation + $ addTabs shrinkText myTabTheme + $ subLayout [] (smartBorders Simplest) $ limitWindows 20 simplestFloat grid = renamed [Replace "grid"] + $ windowNavigation + $ addTabs shrinkText myTabTheme + $ subLayout [] (smartBorders Simplest) $ limitWindows 12 $ mySpacing 8 $ mkToggle (single MIRROR) $ Grid (16/10) spirals = renamed [Replace "spirals"] + $ windowNavigation + $ addTabs shrinkText myTabTheme + $ subLayout [] (smartBorders Simplest) $ mySpacing' 8 $ spiral (6/7) threeCol = renamed [Replace "threeCol"] + $ windowNavigation + $ addTabs shrinkText myTabTheme + $ subLayout [] (smartBorders Simplest) $ limitWindows 7 $ mySpacing' 4 $ ThreeCol 1 (3/100) (1/2) threeRow = renamed [Replace "threeRow"] + $ windowNavigation + $ addTabs shrinkText myTabTheme + $ subLayout [] (smartBorders Simplest) $ limitWindows 7 $ mySpacing' 4 -- Mirror takes a layout and rotates it by 90 degrees. @@ -749,44 +783,55 @@ threeRow = renamed [Replace "threeRow"] tabs = renamed [Replace "tabs"] -- I cannot add spacing to this layout because it will -- add spacing between window and tabs which looks bad. - $ tabbed shrinkText myTabConfig - where - myTabConfig = def { fontName = "xft:Mononoki Nerd Font:regular:pixelsize=11" - , activeColor = "#282c34" - , inactiveColor = "#3e445e" - , activeBorderColor = "#282c34" - , inactiveBorderColor = "#282c34" - , activeTextColor = "#ffffff" - , inactiveTextColor = "#d0d0d0" - } + $ tabbed shrinkText myTabTheme + +myTabTheme = def { fontName = myFont + , activeColor = "#46d9ff" + , inactiveColor = "#313846" + , activeBorderColor = "#46d9ff" + , inactiveBorderColor = "#282c34" + , activeTextColor = "#282c34" + , inactiveTextColor = "#d0d0d0" + } -- Theme for showWName which prints current workspace when you change workspaces. myShowWNameTheme :: SWNConfig myShowWNameTheme = def - { swn_font = "xft:Sans:bold:size=60" + { swn_font = "xft:Ubuntu:bold:size=60" , swn_fade = 1.0 - , swn_bgcolor = "#000000" - , swn_color = "#FFFFFF" + , swn_bgcolor = "#1c1f24" + , swn_color = "#ffffff" } -- The layout hook -myLayoutHook = avoidStruts $ mouseResize $ windowArrange $ T.toggleLayouts floats $ - mkToggle (NBFULL ?? NOBORDERS ?? EOT) myDefaultLayout +myLayoutHook = avoidStruts $ mouseResize $ windowArrange $ T.toggleLayouts floats + $ mkToggle (NBFULL ?? NOBORDERS ?? EOT) myDefaultLayout where -- I've commented out the layouts I don't use. myDefaultLayout = tall ||| magnify ||| noBorders monocle ||| floats - -- ||| grid ||| noBorders tabs - -- ||| spirals - -- ||| threeCol - -- ||| threeRow + ||| grid + ||| spirals + ||| threeCol + ||| threeRow #+END_SRC * Workspaces -My workspaces are clickable meaning that the mouse can be used to switch workspaces. This requires xdotool. You need to use UnsafeStdInReader instead of simply StdInReader in xmobar config so you can pass actions to it. Also, you will notice I add tags to the clickable workspaces to select from the additionalFonts that I have set in my xmobar configs. +I include two options for workspace: (1) Standard non-clickable workspaces, and (2) clickable workspaces. Choose one. + +** Standard Non-Clickable Workspaces +These workspaces do not accept mouse clicks for changing workspaces. You must use the keybindings (which you probably should be doing anyway). To use standard non-clickable workspaces, be sure have 'workspaces = myWorkspaces' in the main at the bottom of this config. + +#+begin_src haskell +myWorkspaces = [" dev ", " www ", " sys ", " doc ", " vbox ", " chat ", " mus ", " vid ", " gfx "] +-- myWorkspaces = [" 1 ", " 2 ", " 3 ", " 4 ", " 5 ", " 6 ", " 7 ", " 8 ", " 9 "] +#+end_src + +** Clickable Workspaces +Clickable workspaces means the mouse can be used to switch workspaces. This requires /xdotool/ to be installed. You need to use UnsafeStdInReader instead of simply StdInReader in your xmobar config so you can pass actions to it. Finally, to use clickable workspaces, be sure have 'workspaces = myClickableWorkspaces' in the main at the bottom of this config. #+BEGIN_SRC haskell xmobarEscape :: String -> String @@ -795,12 +840,12 @@ xmobarEscape = concatMap doubleLts doubleLts '<' = "<<" doubleLts x = [x] -myWorkspaces :: [String] -myWorkspaces = clickable . (map xmobarEscape) - -- $ ["1", "2", "3", "4", "5", "6", "7", "8", "9"] - $ ["dev", "www", "sys", "doc", "vbox", "chat", "mus", "vid", "gfx"] +myClickableWorkspaces :: [String] +myClickableWorkspaces = clickable . (map xmobarEscape) + -- $ [" 1 ", " 2 ", " 3 ", " 4 ", " 5 ", " 6 ", " 7 ", " 8 ", " 9 "] + $ [" dev ", " www ", " sys ", " doc ", " vbox ", " chat ", " mus ", " vid ", " gfx "] where - clickable l = [ " " ++ ws ++ " " | + clickable l = [ "" ++ ws ++ "" | (i,ws) <- zip [1..9] l, let n = i ] #+END_SRC @@ -812,12 +857,11 @@ Sets some rules for certain programs. Examples include forcing certain programs myManageHook :: XMonad.Query (Data.Monoid.Endo WindowSet) myManageHook = composeAll -- using 'doShift ( myWorkspaces !! 7)' sends program to workspace 8! - -- I'm doing it this way because otherwise I would have to write out - -- the full name of my workspaces. - [ className =? "htop" --> doShift ( myWorkspaces !! 7 ) - , title =? "firefox" --> doShift ( myWorkspaces !! 1 ) + -- I'm doing it this way because otherwise I would have to write out the full + -- name of my workspaces, and the names would very long if using clickable workspaces. + [ title =? "Mozilla Firefox" --> doShift ( myWorkspaces !! 1 ) , className =? "mpv" --> doShift ( myWorkspaces !! 7 ) - -- , className =? "vlc" --> doShift ( myWorkspaces !! 7 ) + , className =? "vlc" --> doShift ( myWorkspaces !! 7 ) , className =? "Gimp" --> doShift ( myWorkspaces !! 8 ) , className =? "Gimp" --> doFloat , title =? "Oracle VM VirtualBox Manager" --> doFloat @@ -836,8 +880,7 @@ myLogHook = fadeInactiveLogHook fadeAmount #+END_SRC * Keybindings -I am using the Xmonad.Util.EZConfig module which allows keybindings -to be written in simpler, emacs-like format. +I am using the Xmonad.Util.EZConfig module which allows keybindings to be written in simpler, emacs-like format. The Super/Windows key is 'M' (the modkey). The ALT key is 'M1'. SHIFT is 'S' and CTR is 'C'. | A FEW IMPORTANT KEYBINDINGS | ASSOCIATED ACTION | |-----------------------------+----------------------------------------------------------------------| @@ -865,63 +908,21 @@ to be written in simpler, emacs-like format. myKeys :: [(String, X ())] myKeys = -- Xmonad - [ ("M-C-r", spawn "xmonad --recompile") -- Recompiles xmonad - , ("M-S-r", spawn "xmonad --restart") -- Restarts xmonad - , ("M-S-q", io exitSuccess) -- Quits xmonad - - -- Open my preferred terminal - , ("M-", spawn (myTerminal ++ " -e fish")) + [ ("M-C-r", spawn "xmonad --recompile") -- Recompiles xmonad + , ("M-S-r", spawn "xmonad --restart") -- Restarts xmonad + , ("M-S-q", io exitSuccess) -- Quits xmonad -- Run Prompt - , ("M-S-", shellPrompt dtXPConfig) -- Shell Prompt + , ("M-S-", shellPrompt dtXPConfig) -- Shell Prompt - -- Windows - , ("M-S-c", kill1) -- Kill the currently focused client - , ("M-S-a", killAll) -- Kill all windows on current workspace + -- Useful programs to have a keybinding for launch + , ("M-", spawn (myTerminal ++ " -e fish")) + , ("M-b", spawn (myBrowser ++ " www.youtube.com/c/DistroTube/")) + , ("M-M1-h", spawn (myTerminal ++ " -e htop")) - -- Floating windows - , ("M-f", sendMessage (T.Toggle "floats")) -- Toggles my 'floats' layout - , ("M-", withFocused $ windows . W.sink) -- Push floating window back to tile - , ("M-S-", sinkAll) -- Push ALL floating windows to tile - - -- Grid Select (CTRL-g followed by a key) - , ("C-g g", spawnSelected' myAppGrid) -- grid select favorite apps - , ("C-M1-g", spawnSelected' myAppGrid) -- grid select favorite apps - , ("C-g t", goToSelected $ mygridConfig myColorizer) -- goto selected window - , ("C-g b", bringSelected $ mygridConfig myColorizer) -- bring selected window - - -- Tree Select/ - , ("C-t t", treeselectAction tsDefaultConfig) - - -- Windows navigation - , ("M-m", windows W.focusMaster) -- Move focus to the master window - , ("M-j", windows W.focusDown) -- Move focus to the next window - , ("M-k", windows W.focusUp) -- Move focus to the prev window - --, ("M-S-m", windows W.swapMaster) -- Swap the focused window and the master window - , ("M-S-j", windows W.swapDown) -- Swap focused window with next window - , ("M-S-k", windows W.swapUp) -- Swap focused window with prev window - , ("M-", promote) -- Moves focused window to master, others maintain order - , ("M1-S-", rotSlavesDown) -- Rotate all windows except master and keep focus in place - , ("M1-C-", rotAllDown) -- Rotate all the windows in the current stack - --, ("M-S-s", windows copyToAll) - , ("M-C-s", killAllOtherCopies) - - -- Layouts - , ("M-", sendMessage NextLayout) -- Switch to next layout - , ("M-C-M1-", sendMessage Arrange) - , ("M-C-M1-", sendMessage DeArrange) - , ("M-", sendMessage (MT.Toggle NBFULL) >> sendMessage ToggleStruts) -- Toggles noborder/full - , ("M-S-", sendMessage ToggleStruts) -- Toggles struts - , ("M-S-n", sendMessage $ MT.Toggle NOBORDERS) -- Toggles noborder - , ("M-", sendMessage (IncMasterN 1)) -- Increase number of clients in master pane - , ("M-", sendMessage (IncMasterN (-1))) -- Decrease number of clients in master pane - , ("M-S-", increaseLimit) -- Increase number of windows - , ("M-S-", decreaseLimit) -- Decrease number of windows - - , ("M-h", sendMessage Shrink) -- Shrink horiz window width - , ("M-l", sendMessage Expand) -- Expand horiz window width - , ("M-C-j", sendMessage MirrorShrink) -- Shrink vert window width - , ("M-C-k", sendMessage MirrorExpand) -- Exoand vert window width + -- Kill windows + , ("M-S-c", kill1) -- Kill the currently focused client + , ("M-S-a", killAll) -- Kill all windows on current workspace -- Workspaces , ("M-.", nextScreen) -- Switch focus to next monitor @@ -929,11 +930,73 @@ myKeys = , ("M-S-", shiftTo Next nonNSP >> moveTo Next nonNSP) -- Shifts focused window to next ws , ("M-S-", shiftTo Prev nonNSP >> moveTo Prev nonNSP) -- Shifts focused window to prev ws + -- Floating windows + , ("M-f", sendMessage (T.Toggle "floats")) -- Toggles my 'floats' layout + , ("M-t", withFocused $ windows . W.sink) -- Push floating window back to tile + , ("M-S-t", sinkAll) -- Push ALL floating windows to tile + + -- Increase/decrease spacing (gaps) + , ("M-d", decWindowSpacing 4) -- Decrease window spacing + , ("M-i", incWindowSpacing 4) -- Increase window spacing + , ("M-S-d", decScreenSpacing 4) -- Decrease screen spacing + , ("M-S-i", incScreenSpacing 4) -- Increase screen spacing + + -- Grid Select (CTR-g followed by a key) + , ("C-g g", spawnSelected' myAppGrid) -- grid select favorite apps + , ("C-g t", goToSelected $ mygridConfig myColorizer) -- goto selected window + , ("C-g b", bringSelected $ mygridConfig myColorizer) -- bring selected window + + -- Tree Select + , ("C-t t", treeselectAction tsDefaultConfig) + + -- Windows navigation + , ("M-m", windows W.focusMaster) -- Move focus to the master window + , ("M-j", windows W.focusDown) -- Move focus to the next window + , ("M-k", windows W.focusUp) -- Move focus to the prev window + , ("M-S-m", windows W.swapMaster) -- Swap the focused window and the master window + , ("M-S-j", windows W.swapDown) -- Swap focused window with next window + , ("M-S-k", windows W.swapUp) -- Swap focused window with prev window + , ("M-", promote) -- Moves focused window to master, others maintain order + , ("M-S-", rotSlavesDown) -- Rotate all windows except master and keep focus in place + , ("M-C-", rotAllDown) -- Rotate all the windows in the current stack + + -- Layouts + , ("M-", sendMessage NextLayout) -- Switch to next layout + , ("M-C-M1-", sendMessage Arrange) + , ("M-C-M1-", sendMessage DeArrange) + , ("M-", sendMessage (MT.Toggle NBFULL) >> sendMessage ToggleStruts) -- Toggles noborder/full + , ("M-S-", sendMessage ToggleStruts) -- Toggles struts + , ("M-S-n", sendMessage $ MT.Toggle NOBORDERS) -- Toggles noborder + + -- Increase/decrease windows in the master pane or the stack + , ("M-S-", sendMessage (IncMasterN 1)) -- Increase number of clients in master pane + , ("M-S-", sendMessage (IncMasterN (-1))) -- Decrease number of clients in master pane + , ("M-C-", increaseLimit) -- Increase number of windows + , ("M-C-", decreaseLimit) -- Decrease number of windows + + -- Window resizing + , ("M-h", sendMessage Shrink) -- Shrink horiz window width + , ("M-l", sendMessage Expand) -- Expand horiz window width + , ("M-M1-j", sendMessage MirrorShrink) -- Shrink vert window width + , ("M-M1-k", sendMessage MirrorExpand) -- Exoand vert window width + + -- Sublayouts + -- This is used to push windows to tabbed sublayouts, or pull them out of it. + , ("M-C-h", sendMessage $ pullGroup L) + , ("M-C-l", sendMessage $ pullGroup R) + , ("M-C-k", sendMessage $ pullGroup U) + , ("M-C-j", sendMessage $ pullGroup D) + , ("M-C-m", withFocused (sendMessage . MergeAll)) + , ("M-C-u", withFocused (sendMessage . UnMerge)) + , ("M-C-/", withFocused (sendMessage . UnMergeAll)) + , ("M-C-.", onGroup W.focusUp') -- Switch focus to next tab + , ("M-C-,", onGroup W.focusDown') -- Switch focus to prev tab + -- Scratchpads , ("M-C-", namedScratchpadAction myScratchPads "terminal") , ("M-C-c", namedScratchpadAction myScratchPads "mocp") - -- Controls for mocp music player. + -- Controls for mocp music player (SUPER-u followed by a key) , ("M-u p", spawn "mocp --play") , ("M-u l", spawn "mocp --next") , ("M-u h", spawn "mocp --previous") @@ -952,45 +1015,29 @@ myKeys = -- emms is an emacs audio player. I set it to auto start playing in a specific directory. , ("C-e a", spawn "emacsclient -c -a 'emacs' --eval '(emms)' --eval '(emms-play-directory-tree \"~/Music/Non-Classical/70s-80s/\")'") - --- My Applications (Super+Alt+Key) - , ("M-M1-a", spawn (myTerminal ++ " -e ncpamixer")) - , ("M-M1-b", spawn "surf www.youtube.com/c/DistroTube/") - , ("M-M1-e", spawn (myTerminal ++ " -e neomutt")) - , ("M-M1-f", spawn (myTerminal ++ " -e sh ./.config/vifm/scripts/vifmrun | bash")) - , ("M-M1-i", spawn (myTerminal ++ " -e irssi")) - , ("M-M1-j", spawn (myTerminal ++ " -e joplin")) - , ("M-M1-l", spawn (myTerminal ++ " -e lynx https://distrotube.com")) - , ("M-M1-m", spawn (myTerminal ++ " -e mocp")) - , ("M-M1-n", spawn (myTerminal ++ " -e newsboat")) - , ("M-M1-p", spawn (myTerminal ++ " -e pianobar")) - , ("M-M1-r", spawn (myTerminal ++ " -e rtv")) - , ("M-M1-t", spawn (myTerminal ++ " -e toot curses")) - , ("M-M1-w", spawn (myTerminal ++ " -e wopr report.xml")) - , ("M-M1-y", spawn (myTerminal ++ " -e youtube-viewer")) - -- Multimedia Keys - , ("", spawn "cmus toggle") - , ("", spawn "cmus prev") - , ("", spawn "cmus next") + , ("", spawn (myTerminal ++ "mocp --play")) + , ("", spawn (myTerminal ++ "mocp --previous")) + , ("", spawn (myTerminal ++ "mocp --next")) -- , ("", spawn "amixer set Master toggle") -- Bug prevents it from toggling correctly in 12.04. , ("", spawn "amixer set Master 5%- unmute") , ("", spawn "amixer set Master 5%+ unmute") , ("", spawn "firefox") - , ("", safeSpawn "firefox" ["https://www.google.com/"]) + , ("", safeSpawn "firefox" ["https://www.duckduckgo.com/"]) , ("", runOrRaise "geary" (resource =? "thunderbird")) , ("", runOrRaise "gcalctool" (resource =? "gcalctool")) , ("", spawn "toggleeject") , ("", spawn "scrotd 0") ] - -- Appending search engine prompts to keybindings list. - -- Look at "search engines" section of this config for values for "k". + -- Appending search engine prompts to keybindings list. + -- Look at "search engines" section of this config for values for "k". ++ [("M-s " ++ k, S.promptSearch dtXPConfig' f) | (k,f) <- searchList ] ++ [("M-S-s " ++ k, S.selectSearch f) | (k,f) <- searchList ] - -- Appending some extra xprompts to keybindings list. - -- Look at "xprompt settings" section this of config for values for "k". + -- Appending some extra xprompts to keybindings list. + -- Look at "xprompt settings" section this of config for values for "k". ++ [("M-p " ++ k, f dtXPConfig') | (k,f) <- promptList ] ++ [("M-p " ++ k, f dtXPConfig' g) | (k,f,g) <- promptList' ] - -- The following lines are needed for named scratchpads. + -- The following lines are needed for named scratchpads. where nonNSP = WSIs (return (\ws -> W.tag ws /= "nsp")) nonEmptyNonNSP = WSIs (return (\ws -> isJust (W.stack ws) && W.tag ws /= "nsp")) #+END_SRC @@ -1019,7 +1066,7 @@ main = do , modMask = myModMask , terminal = myTerminal , startupHook = myStartupHook - , layoutHook = myLayoutHook + , layoutHook = showWName' myShowWNameTheme $ myLayoutHook , workspaces = myWorkspaces , borderWidth = myBorderWidth , normalBorderColor = myNormColor @@ -1031,7 +1078,7 @@ main = do , ppHidden = xmobarColor "#82AAFF" "" . wrap "*" "" -- Hidden workspaces in xmobar , ppHiddenNoWindows = xmobarColor "#c792ea" "" -- Hidden workspaces (no windows) , ppTitle = xmobarColor "#b3afc2" "" . shorten 60 -- Title of active window in xmobar - , ppSep = " | " -- Separators in xmobar + , ppSep = " | " -- Separators in xmobar , ppUrgent = xmobarColor "#C45500" "" . wrap "!" "!" -- Urgent workspace , ppExtras = [windowCount] -- # of windows current workspace , ppOrder = \(ws:l:t:ex) -> [ws,l]++ex++[t] diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index f423b7e..e7f2f20 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -17,7 +17,7 @@ import XMonad.Actions.WithAll (sinkAll, killAll) import qualified XMonad.Actions.Search as S -- Data -import Data.Char (isSpace) +import Data.Char (isSpace, toUpper) import Data.Monoid import Data.Maybe (isJust) import Data.Tree @@ -48,9 +48,12 @@ import XMonad.Layout.Magnifier import XMonad.Layout.MultiToggle (mkToggle, single, EOT(EOT), (??)) import XMonad.Layout.MultiToggle.Instances (StdTransformers(NBFULL, MIRROR, NOBORDERS)) import XMonad.Layout.NoBorders -import XMonad.Layout.Renamed (renamed, Rename(Replace)) +import XMonad.Layout.Renamed import XMonad.Layout.ShowWName +import XMonad.Layout.Simplest import XMonad.Layout.Spacing +import XMonad.Layout.SubLayouts +import XMonad.Layout.WindowNavigation import XMonad.Layout.WindowArranger (windowArrange, WindowArrangerMsg(..)) import qualified XMonad.Layout.ToggleLayouts as T (toggleLayouts, ToggleLayout(Toggle)) import qualified XMonad.Layout.MultiToggle as MT (Toggle(..)) @@ -61,7 +64,7 @@ import XMonad.Prompt.Input import XMonad.Prompt.FuzzyMatch import XMonad.Prompt.Man import XMonad.Prompt.Pass -import XMonad.Prompt.Shell (shellPrompt) +import XMonad.Prompt.Shell import XMonad.Prompt.Ssh import XMonad.Prompt.XMonad import Control.Arrow (first) @@ -96,7 +99,7 @@ myNormColor :: String myNormColor = "#282c34" -- Border color of normal windows myFocusColor :: String -myFocusColor = "#bbc5ff" -- Border color of focused windows +myFocusColor = "#46d9ff" -- Border color of focused windows altMask :: KeyMask altMask = mod1Mask -- Setting this for use in xprompts @@ -471,7 +474,7 @@ dtXPConfig = def , promptBorderWidth = 0 , promptKeymap = dtXPKeymap , position = Top --- , position = CenteredAt { xpCenterY = 0.3, xpWidth = 0.3 } + -- , position = CenteredAt { xpCenterY = 0.3, xpWidth = 0.3 } , height = 20 , historySize = 256 , historyFilter = id @@ -480,8 +483,11 @@ dtXPConfig = def , showCompletionOnTab = False -- , searchPredicate = isPrefixOf , searchPredicate = fuzzyMatch + , defaultPrompter = id $ map toUpper -- change prompt to UPPER + -- , defaultPrompter = unwords . map reverse . words -- reverse the prompt + -- , defaultPrompter = drop 5 .id (++ "XXXX: ") -- drop first 5 chars of prompt and add XXXX: , alwaysHighlight = True - , maxComplRows = Nothing -- set to Just 5 for 5 rows + , maxComplRows = Nothing -- set to 'Just 5' for 5 rows } -- The same config above minus the autocomplete feature which is annoying @@ -614,31 +620,55 @@ mySpacing' i = spacingRaw True (Border i i i i) True (Border i i i i) True -- Defining a bunch of layouts, many that I don't use. tall = renamed [Replace "tall"] + $ windowNavigation + $ addTabs shrinkText myTabTheme + $ subLayout [] (smartBorders Simplest) $ limitWindows 12 $ mySpacing 8 $ ResizableTall 1 (3/100) (1/2) [] magnify = renamed [Replace "magnify"] + $ windowNavigation + $ addTabs shrinkText myTabTheme + $ subLayout [] (smartBorders Simplest) $ magnifier $ limitWindows 12 $ mySpacing 8 $ ResizableTall 1 (3/100) (1/2) [] monocle = renamed [Replace "monocle"] + $ windowNavigation + $ addTabs shrinkText myTabTheme + $ subLayout [] (smartBorders Simplest) $ limitWindows 20 Full floats = renamed [Replace "floats"] + $ windowNavigation + $ addTabs shrinkText myTabTheme + $ subLayout [] (smartBorders Simplest) $ limitWindows 20 simplestFloat grid = renamed [Replace "grid"] + $ windowNavigation + $ addTabs shrinkText myTabTheme + $ subLayout [] (smartBorders Simplest) $ limitWindows 12 $ mySpacing 8 $ mkToggle (single MIRROR) $ Grid (16/10) spirals = renamed [Replace "spirals"] + $ windowNavigation + $ addTabs shrinkText myTabTheme + $ subLayout [] (smartBorders Simplest) $ mySpacing' 8 $ spiral (6/7) threeCol = renamed [Replace "threeCol"] + $ windowNavigation + $ addTabs shrinkText myTabTheme + $ subLayout [] (smartBorders Simplest) $ limitWindows 7 $ mySpacing' 4 $ ThreeCol 1 (3/100) (1/2) threeRow = renamed [Replace "threeRow"] + $ windowNavigation + $ addTabs shrinkText myTabTheme + $ subLayout [] (smartBorders Simplest) $ limitWindows 7 $ mySpacing' 4 -- Mirror takes a layout and rotates it by 90 degrees. @@ -648,40 +678,43 @@ threeRow = renamed [Replace "threeRow"] tabs = renamed [Replace "tabs"] -- I cannot add spacing to this layout because it will -- add spacing between window and tabs which looks bad. - $ tabbed shrinkText myTabConfig - where - myTabConfig = def { fontName = "xft:Mononoki Nerd Font:regular:pixelsize=11" - , activeColor = "#282c34" - , inactiveColor = "#3e445e" - , activeBorderColor = "#282c34" - , inactiveBorderColor = "#282c34" - , activeTextColor = "#ffffff" - , inactiveTextColor = "#d0d0d0" - } + $ tabbed shrinkText myTabTheme + +myTabTheme = def { fontName = myFont + , activeColor = "#46d9ff" + , inactiveColor = "#313846" + , activeBorderColor = "#46d9ff" + , inactiveBorderColor = "#282c34" + , activeTextColor = "#282c34" + , inactiveTextColor = "#d0d0d0" + } -- Theme for showWName which prints current workspace when you change workspaces. myShowWNameTheme :: SWNConfig myShowWNameTheme = def - { swn_font = "xft:Sans:bold:size=60" + { swn_font = "xft:Ubuntu:bold:size=60" , swn_fade = 1.0 - , swn_bgcolor = "#000000" - , swn_color = "#FFFFFF" + , swn_bgcolor = "#1c1f24" + , swn_color = "#ffffff" } -- The layout hook -myLayoutHook = avoidStruts $ mouseResize $ windowArrange $ T.toggleLayouts floats $ - mkToggle (NBFULL ?? NOBORDERS ?? EOT) myDefaultLayout +myLayoutHook = avoidStruts $ mouseResize $ windowArrange $ T.toggleLayouts floats + $ mkToggle (NBFULL ?? NOBORDERS ?? EOT) myDefaultLayout where -- I've commented out the layouts I don't use. myDefaultLayout = tall ||| magnify ||| noBorders monocle ||| floats - -- ||| grid ||| noBorders tabs - -- ||| spirals - -- ||| threeCol - -- ||| threeRow + ||| grid + ||| spirals + ||| threeCol + ||| threeRow + +myWorkspaces = [" dev ", " www ", " sys ", " doc ", " vbox ", " chat ", " mus ", " vid ", " gfx "] +-- myWorkspaces = [" 1 ", " 2 ", " 3 ", " 4 ", " 5 ", " 6 ", " 7 ", " 8 ", " 9 "] xmobarEscape :: String -> String xmobarEscape = concatMap doubleLts @@ -689,24 +722,23 @@ xmobarEscape = concatMap doubleLts doubleLts '<' = "<<" doubleLts x = [x] -myWorkspaces :: [String] -myWorkspaces = clickable . (map xmobarEscape) - -- $ ["1", "2", "3", "4", "5", "6", "7", "8", "9"] - $ ["dev", "www", "sys", "doc", "vbox", "chat", "mus", "vid", "gfx"] +myClickableWorkspaces :: [String] +myClickableWorkspaces = clickable . (map xmobarEscape) + -- $ [" 1 ", " 2 ", " 3 ", " 4 ", " 5 ", " 6 ", " 7 ", " 8 ", " 9 "] + $ [" dev ", " www ", " sys ", " doc ", " vbox ", " chat ", " mus ", " vid ", " gfx "] where - clickable l = [ " " ++ ws ++ " " | + clickable l = [ "" ++ ws ++ "" | (i,ws) <- zip [1..9] l, let n = i ] myManageHook :: XMonad.Query (Data.Monoid.Endo WindowSet) myManageHook = composeAll -- using 'doShift ( myWorkspaces !! 7)' sends program to workspace 8! - -- I'm doing it this way because otherwise I would have to write out - -- the full name of my workspaces. - [ className =? "htop" --> doShift ( myWorkspaces !! 7 ) - , title =? "firefox" --> doShift ( myWorkspaces !! 1 ) + -- I'm doing it this way because otherwise I would have to write out the full + -- name of my workspaces, and the names would very long if using clickable workspaces. + [ title =? "Mozilla Firefox" --> doShift ( myWorkspaces !! 1 ) , className =? "mpv" --> doShift ( myWorkspaces !! 7 ) - -- , className =? "vlc" --> doShift ( myWorkspaces !! 7 ) + , className =? "vlc" --> doShift ( myWorkspaces !! 7 ) , className =? "Gimp" --> doShift ( myWorkspaces !! 8 ) , className =? "Gimp" --> doFloat , title =? "Oracle VM VirtualBox Manager" --> doFloat @@ -721,63 +753,21 @@ myLogHook = fadeInactiveLogHook fadeAmount myKeys :: [(String, X ())] myKeys = -- Xmonad - [ ("M-C-r", spawn "xmonad --recompile") -- Recompiles xmonad - , ("M-S-r", spawn "xmonad --restart") -- Restarts xmonad - , ("M-S-q", io exitSuccess) -- Quits xmonad - - -- Open my preferred terminal - , ("M-", spawn (myTerminal ++ " -e fish")) + [ ("M-C-r", spawn "xmonad --recompile") -- Recompiles xmonad + , ("M-S-r", spawn "xmonad --restart") -- Restarts xmonad + , ("M-S-q", io exitSuccess) -- Quits xmonad -- Run Prompt - , ("M-S-", shellPrompt dtXPConfig) -- Shell Prompt + , ("M-S-", shellPrompt dtXPConfig) -- Shell Prompt - -- Windows - , ("M-S-c", kill1) -- Kill the currently focused client - , ("M-S-a", killAll) -- Kill all windows on current workspace + -- Useful programs to have a keybinding for launch + , ("M-", spawn (myTerminal ++ " -e fish")) + , ("M-b", spawn (myBrowser ++ " www.youtube.com/c/DistroTube/")) + , ("M-M1-h", spawn (myTerminal ++ " -e htop")) - -- Floating windows - , ("M-f", sendMessage (T.Toggle "floats")) -- Toggles my 'floats' layout - , ("M-", withFocused $ windows . W.sink) -- Push floating window back to tile - , ("M-S-", sinkAll) -- Push ALL floating windows to tile - - -- Grid Select (CTRL-g followed by a key) - , ("C-g g", spawnSelected' myAppGrid) -- grid select favorite apps - , ("C-M1-g", spawnSelected' myAppGrid) -- grid select favorite apps - , ("C-g t", goToSelected $ mygridConfig myColorizer) -- goto selected window - , ("C-g b", bringSelected $ mygridConfig myColorizer) -- bring selected window - - -- Tree Select/ - , ("C-t t", treeselectAction tsDefaultConfig) - - -- Windows navigation - , ("M-m", windows W.focusMaster) -- Move focus to the master window - , ("M-j", windows W.focusDown) -- Move focus to the next window - , ("M-k", windows W.focusUp) -- Move focus to the prev window - --, ("M-S-m", windows W.swapMaster) -- Swap the focused window and the master window - , ("M-S-j", windows W.swapDown) -- Swap focused window with next window - , ("M-S-k", windows W.swapUp) -- Swap focused window with prev window - , ("M-", promote) -- Moves focused window to master, others maintain order - , ("M1-S-", rotSlavesDown) -- Rotate all windows except master and keep focus in place - , ("M1-C-", rotAllDown) -- Rotate all the windows in the current stack - --, ("M-S-s", windows copyToAll) - , ("M-C-s", killAllOtherCopies) - - -- Layouts - , ("M-", sendMessage NextLayout) -- Switch to next layout - , ("M-C-M1-", sendMessage Arrange) - , ("M-C-M1-", sendMessage DeArrange) - , ("M-", sendMessage (MT.Toggle NBFULL) >> sendMessage ToggleStruts) -- Toggles noborder/full - , ("M-S-", sendMessage ToggleStruts) -- Toggles struts - , ("M-S-n", sendMessage $ MT.Toggle NOBORDERS) -- Toggles noborder - , ("M-", sendMessage (IncMasterN 1)) -- Increase number of clients in master pane - , ("M-", sendMessage (IncMasterN (-1))) -- Decrease number of clients in master pane - , ("M-S-", increaseLimit) -- Increase number of windows - , ("M-S-", decreaseLimit) -- Decrease number of windows - - , ("M-h", sendMessage Shrink) -- Shrink horiz window width - , ("M-l", sendMessage Expand) -- Expand horiz window width - , ("M-C-j", sendMessage MirrorShrink) -- Shrink vert window width - , ("M-C-k", sendMessage MirrorExpand) -- Exoand vert window width + -- Kill windows + , ("M-S-c", kill1) -- Kill the currently focused client + , ("M-S-a", killAll) -- Kill all windows on current workspace -- Workspaces , ("M-.", nextScreen) -- Switch focus to next monitor @@ -785,11 +775,73 @@ myKeys = , ("M-S-", shiftTo Next nonNSP >> moveTo Next nonNSP) -- Shifts focused window to next ws , ("M-S-", shiftTo Prev nonNSP >> moveTo Prev nonNSP) -- Shifts focused window to prev ws + -- Floating windows + , ("M-f", sendMessage (T.Toggle "floats")) -- Toggles my 'floats' layout + , ("M-t", withFocused $ windows . W.sink) -- Push floating window back to tile + , ("M-S-t", sinkAll) -- Push ALL floating windows to tile + + -- Increase/decrease spacing (gaps) + , ("M-d", decWindowSpacing 4) -- Decrease window spacing + , ("M-i", incWindowSpacing 4) -- Increase window spacing + , ("M-S-d", decScreenSpacing 4) -- Decrease screen spacing + , ("M-S-i", incScreenSpacing 4) -- Increase screen spacing + + -- Grid Select (CTR-g followed by a key) + , ("C-g g", spawnSelected' myAppGrid) -- grid select favorite apps + , ("C-g t", goToSelected $ mygridConfig myColorizer) -- goto selected window + , ("C-g b", bringSelected $ mygridConfig myColorizer) -- bring selected window + + -- Tree Select + , ("C-t t", treeselectAction tsDefaultConfig) + + -- Windows navigation + , ("M-m", windows W.focusMaster) -- Move focus to the master window + , ("M-j", windows W.focusDown) -- Move focus to the next window + , ("M-k", windows W.focusUp) -- Move focus to the prev window + , ("M-S-m", windows W.swapMaster) -- Swap the focused window and the master window + , ("M-S-j", windows W.swapDown) -- Swap focused window with next window + , ("M-S-k", windows W.swapUp) -- Swap focused window with prev window + , ("M-", promote) -- Moves focused window to master, others maintain order + , ("M-S-", rotSlavesDown) -- Rotate all windows except master and keep focus in place + , ("M-C-", rotAllDown) -- Rotate all the windows in the current stack + + -- Layouts + , ("M-", sendMessage NextLayout) -- Switch to next layout + , ("M-C-M1-", sendMessage Arrange) + , ("M-C-M1-", sendMessage DeArrange) + , ("M-", sendMessage (MT.Toggle NBFULL) >> sendMessage ToggleStruts) -- Toggles noborder/full + , ("M-S-", sendMessage ToggleStruts) -- Toggles struts + , ("M-S-n", sendMessage $ MT.Toggle NOBORDERS) -- Toggles noborder + + -- Increase/decrease windows in the master pane or the stack + , ("M-S-", sendMessage (IncMasterN 1)) -- Increase number of clients in master pane + , ("M-S-", sendMessage (IncMasterN (-1))) -- Decrease number of clients in master pane + , ("M-C-", increaseLimit) -- Increase number of windows + , ("M-C-", decreaseLimit) -- Decrease number of windows + + -- Window resizing + , ("M-h", sendMessage Shrink) -- Shrink horiz window width + , ("M-l", sendMessage Expand) -- Expand horiz window width + , ("M-M1-j", sendMessage MirrorShrink) -- Shrink vert window width + , ("M-M1-k", sendMessage MirrorExpand) -- Exoand vert window width + + -- Sublayouts + -- This is used to push windows to tabbed sublayouts, or pull them out of it. + , ("M-C-h", sendMessage $ pullGroup L) + , ("M-C-l", sendMessage $ pullGroup R) + , ("M-C-k", sendMessage $ pullGroup U) + , ("M-C-j", sendMessage $ pullGroup D) + , ("M-C-m", withFocused (sendMessage . MergeAll)) + , ("M-C-u", withFocused (sendMessage . UnMerge)) + , ("M-C-/", withFocused (sendMessage . UnMergeAll)) + , ("M-C-.", onGroup W.focusUp') -- Switch focus to next tab + , ("M-C-,", onGroup W.focusDown') -- Switch focus to prev tab + -- Scratchpads , ("M-C-", namedScratchpadAction myScratchPads "terminal") , ("M-C-c", namedScratchpadAction myScratchPads "mocp") - -- Controls for mocp music player. + -- Controls for mocp music player (SUPER-u followed by a key) , ("M-u p", spawn "mocp --play") , ("M-u l", spawn "mocp --next") , ("M-u h", spawn "mocp --previous") @@ -808,45 +860,29 @@ myKeys = -- emms is an emacs audio player. I set it to auto start playing in a specific directory. , ("C-e a", spawn "emacsclient -c -a 'emacs' --eval '(emms)' --eval '(emms-play-directory-tree \"~/Music/Non-Classical/70s-80s/\")'") - --- My Applications (Super+Alt+Key) - , ("M-M1-a", spawn (myTerminal ++ " -e ncpamixer")) - , ("M-M1-b", spawn "surf www.youtube.com/c/DistroTube/") - , ("M-M1-e", spawn (myTerminal ++ " -e neomutt")) - , ("M-M1-f", spawn (myTerminal ++ " -e sh ./.config/vifm/scripts/vifmrun | bash")) - , ("M-M1-i", spawn (myTerminal ++ " -e irssi")) - , ("M-M1-j", spawn (myTerminal ++ " -e joplin")) - , ("M-M1-l", spawn (myTerminal ++ " -e lynx https://distrotube.com")) - , ("M-M1-m", spawn (myTerminal ++ " -e mocp")) - , ("M-M1-n", spawn (myTerminal ++ " -e newsboat")) - , ("M-M1-p", spawn (myTerminal ++ " -e pianobar")) - , ("M-M1-r", spawn (myTerminal ++ " -e rtv")) - , ("M-M1-t", spawn (myTerminal ++ " -e toot curses")) - , ("M-M1-w", spawn (myTerminal ++ " -e wopr report.xml")) - , ("M-M1-y", spawn (myTerminal ++ " -e youtube-viewer")) - -- Multimedia Keys - , ("", spawn "cmus toggle") - , ("", spawn "cmus prev") - , ("", spawn "cmus next") + , ("", spawn (myTerminal ++ "mocp --play")) + , ("", spawn (myTerminal ++ "mocp --previous")) + , ("", spawn (myTerminal ++ "mocp --next")) -- , ("", spawn "amixer set Master toggle") -- Bug prevents it from toggling correctly in 12.04. , ("", spawn "amixer set Master 5%- unmute") , ("", spawn "amixer set Master 5%+ unmute") , ("", spawn "firefox") - , ("", safeSpawn "firefox" ["https://www.google.com/"]) + , ("", safeSpawn "firefox" ["https://www.duckduckgo.com/"]) , ("", runOrRaise "geary" (resource =? "thunderbird")) , ("", runOrRaise "gcalctool" (resource =? "gcalctool")) , ("", spawn "toggleeject") , ("", spawn "scrotd 0") ] - -- Appending search engine prompts to keybindings list. - -- Look at "search engines" section of this config for values for "k". + -- Appending search engine prompts to keybindings list. + -- Look at "search engines" section of this config for values for "k". ++ [("M-s " ++ k, S.promptSearch dtXPConfig' f) | (k,f) <- searchList ] ++ [("M-S-s " ++ k, S.selectSearch f) | (k,f) <- searchList ] - -- Appending some extra xprompts to keybindings list. - -- Look at "xprompt settings" section this of config for values for "k". + -- Appending some extra xprompts to keybindings list. + -- Look at "xprompt settings" section this of config for values for "k". ++ [("M-p " ++ k, f dtXPConfig') | (k,f) <- promptList ] ++ [("M-p " ++ k, f dtXPConfig' g) | (k,f,g) <- promptList' ] - -- The following lines are needed for named scratchpads. + -- The following lines are needed for named scratchpads. where nonNSP = WSIs (return (\ws -> W.tag ws /= "nsp")) nonEmptyNonNSP = WSIs (return (\ws -> isJust (W.stack ws) && W.tag ws /= "nsp")) @@ -870,7 +906,7 @@ main = do , modMask = myModMask , terminal = myTerminal , startupHook = myStartupHook - , layoutHook = myLayoutHook + , layoutHook = showWName' myShowWNameTheme $ myLayoutHook , workspaces = myWorkspaces , borderWidth = myBorderWidth , normalBorderColor = myNormColor @@ -882,7 +918,7 @@ main = do , ppHidden = xmobarColor "#82AAFF" "" . wrap "*" "" -- Hidden workspaces in xmobar , ppHiddenNoWindows = xmobarColor "#c792ea" "" -- Hidden workspaces (no windows) , ppTitle = xmobarColor "#b3afc2" "" . shorten 60 -- Title of active window in xmobar - , ppSep = " | " -- Separators in xmobar + , ppSep = " | " -- Separators in xmobar , ppUrgent = xmobarColor "#C45500" "" . wrap "!" "!" -- Urgent workspace , ppExtras = [windowCount] -- # of windows current workspace , ppOrder = \(ws:l:t:ex) -> [ws,l]++ex++[t] diff --git a/dwmblocks/blocks.h b/dwmblocks/blocks.h index df3855f..3afab70 100644 --- a/dwmblocks/blocks.h +++ b/dwmblocks/blocks.h @@ -1,17 +1,17 @@ //Modify this file to change what commands output to your statusbar, and recompile using the make command. static const Block blocks[] = { /*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/ - {" 🐧 ", "kernel", 360, 2}, + {" 🐧 ", "/home/dt/.local/bin/kernel", 360, 2}, - {" 🔺 ", "upt", 60, 2}, + {" 🔺 ", "/home/dt/.local/bin/upt", 60, 2}, - {" 📦 ", "pacupdate", 360, 9}, + {" 📦 ", "/home/dt/.local/bin/pacupdate", 360, 9}, - {" 💻 ", "memory", 6, 1}, + {" 💻 ", "/home/dt/.local/bin/memory", 6, 1}, - {" 🔊 ", "volume", 2, 10}, + {" 🔊 ", "/home/dt/.local/bin/volume", 2, 10}, - {" 🕑 ", "clock", 5, 0}, + {" 🕑 ", "/home/dt/.local/bin/clock", 5, 0}, }; //sets delimeter between status commands. NULL character ('\0') means no delimeter. diff --git a/dwmblocks/dwmblocks b/dwmblocks/dwmblocks index e8ec78a9aa4a6f8617c461008c9d347725fe6fc6..f91f9e037db99cad36264acfcaa8774e232bfa2e 100755 GIT binary patch delta 3062 zcmZuzeNa@_6~Fhf%L4IZ7uh^EitGXvFtQ(t7!)fEE?Lv`W0N{1nO0nJnT+JstJw0j;kX!B_O z5({m#6!0ghGfU??rF>Y*=cPO@Vn^;^UrqJq^w?-DZ_AMV`<%N{YaLx&AnBBv_vo(C-|(7tnVu)ORL*;d&+$N?6wk z0_x5inapKA@Yb7aLw)}W^)EfTNCd2W5drCaH#3=MN8&}$_X_|;l8 ziYKf|P|uEZjSZNaLgK!kPNm<#YJI;$mddeeB>JzBDE3vN+x^d2gP_D179zcuI`kFU zWx1HXPbc*9>~j^2UA~X{^`e${ap%)}u8Grj%?kBfe~yErl!xFU_Y|C35xg>ccMOL? ziOK=PvqjD)5CX&9!XVzF^rJ8sMd(HfIeY8PAE%lNQ??#otYcHuw=wSXws*8f+I<_^ zHv684ZrvPhXYPp?_y5+-rt|395*IWbou1wjY38hZIiEc8K%{^o}o%lIge1-Q|vj0{Y?m;hFSKVTI0-Y?eYv8Zt^^s4&mBPNl!7i z(MiZSo%a++#<263Zi_g4D`FmYxE3cFx{ZJN7GDScBk(J}&Oaq-x#ADOYZNXi<}0WZ z@&QVg%;n#vmrF`{A)PO|-%^h{P-kFH%3s=-Oa7{gHnTTXxkXaO>TsbD%i5d)zHF#yZ^+WFrT~%uYngE^_4IGJDXgG+L$SUx!5u5g~?^)4!{J=4rMXs`*v$ ztIv!`AjVwk^S0!Vqp)Jw3}9!o>4x{4+F&*<_s!?=)FZwqzw7?*tgUnh{NBZ0Kl*qn zed6E9F$*}evRN~Zu0IerS5avMWU(AJIITSw%Y4mIO|x*e@f><5u!oORWU;QrJk-7T zrfUXxj%;ahdNE_SxwFq`#i zp-HeiVHC0Me1kRRKJrxS{G?pv4GLH5uHS>=tdI@X8$M>9x2d;UUvo~fE|ylT#c*Oa zlwYhqq3o*e?1J)V4Tj?)mF^$(0oJ-C*+O<)MVZ;Ikz=Vkd#(i$oH^JbTC=pA=TqlW z-Bl`WPBx~#QbumZ7SR!~tK=GXX8vQC>_c=O>|ao4jotOthgZ=t;x)Qu8)9*H=4fm` z1!{EHqwsd48VA)5&0K>NsnH#$;hm4Fo-Q!#KcOQv#r$uA;~&x};wO|xQq^6)`EdT6 zCc$nMtTu~{7n*quyeTu}Q+S!q7f2bDvYC2eiOTtQDf^{-fj(HKyN+S64y}+KuD?Co zugP(r?)n2*vDfu#t*COkATqcvDYkcxVSYui^QqUW_pDQ_Up;xU$H8M#+4qWnGz{5g zfY+7%ZDoH%vW!{ql!!h2-Dwzxlzj&5c04_=)hmO7Lc@O{>(mX)hl(gti5^mR^-skr zDNw5i>J(e4iXKx@tChV}MVZI=u888TLefaBg{o@{_zN^zt6PpD!gw4;Xc9hulAiAg zX}tnY{P-0VL^iZlZSIIiy{)XJ1xiai@)&(@d5HT{hnC;4(7{y~c^Pf5_c_ciWnu-L zg4OJ0CeEenu$oQBL@(7g`0~t_gBG^6p(fAlG-zx?P|bcfo|C%T(8T$>RNLswHD82r z>TFz=7xNh9h&jZGTGv+VNsc}7#2bIfmWgQ9O^h>ub&1)J{8+qPU9SdN9dn`-zo Ibh4@Z{}`dwYXATM delta 2946 zcmZuz3vd%f7~Z`kO;arAR+G|NXiA zDW`qQmskBU%XGWfG&=+dK`vpwQ}ChqB;m6yAX7r^$xJ8V!o+J~?~%+wJ$A zYF;u8g2FVK3bketVpV2XW=f||L%m6)bzHv8SXF$YqgAH{Jnx@~0%k0w6; zQ&p7?%WaIn;nq=A{fWi~`WGwF@08BcXRl@sbDu$nME75+y0x!01IJx#9MxQfcHMUr z$LM>T=KJ7T`yot=B)+_;sz(=$v3{?LEdgU_cU8xNF`VyV>?6i`@|VZ$32AnU+xZ7uZDf+tY1x7c$E|z{94`5))u_jf znSv|n6N6YKzti98P{XU3A~qrJ7YH=Cr%N)dF}@Aa zxT&Qw(`t1UDPr8wYME)Z7%7O?%4|ePEgZ=gyZ4*BUrJ`Bn6wcX%D>;e-@*o37={78 z-ZNL$d=M?DOHlGzqN<9__6NWwmo4sPO%b4R|v6dv z!HetzoJ}J|6WE>5gOOk4Y&r?(Y)p4P2;Jz*t{TNZ!LI_E8cz{#Z@>{`f5Q{N*x`Vt zHQ0U_LH0N*85^k5Sbkox`x&@PMd^Fay2$>3#u~oKEGyeN&N@ggG?&f*b$-(1v`bd! zfCHuC!l~?3kxN&X&-Hc^mKi_Z0;s1%#3MAWW4$-QQ6@^aAe)A7VbGEK zF5<0b5ed{|Kb=b-lTrxxoq0W}=b?urH*=d6T;9v1uuXvZ#ZG}d0dBu2?Lt2Xxq=W` z^Dyg373*aKJCNe~EF}F2&dv61LeIkRNpYd%Aw9u0N;i zztH!97boOKQE$inocI-zgtwc;Z^75Z8apejU8d>N$jv&DrRj+XJryFI3C$IvRIEGa z>NdQZqTO6>Q_JN>CSkC`>~sj1el+a>S}96<^*Dv;+9aL&T(9v6N4fkQ>MLE)Re6oM z+*jd?e_Ap-uXcnOSOU$#!W5&*U