1
0
Fork 0
mirror of https://gitlab.com/dwt1/dotfiles.git synced 2023-02-13 20:55:19 -05:00

Minor edits.

This commit is contained in:
Derek Taylor 2020-11-12 16:57:50 -06:00
parent fd04830dd1
commit 5cd8c36009
10 changed files with 360 additions and 260 deletions

View file

@ -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'

View file

@ -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'

View file

@ -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",

View file

@ -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)

View file

@ -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)

View file

@ -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

View file

@ -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:
: <interactive>: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 <fn> 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 = [ "<action=xdotool key super+" ++ show (n) ++ "> " ++ ws ++ " </action>" |
clickable l = [ "<action=xdotool key super+" ++ show (n) ++ ">" ++ ws ++ "</action>" |
(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-<Return>", 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-<Return>", shellPrompt dtXPConfig) -- Shell Prompt
, ("M-S-<Return>", 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-<Return>", 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-<Delete>", withFocused $ windows . W.sink) -- Push floating window back to tile
, ("M-S-<Delete>", 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-<Backspace>", promote) -- Moves focused window to master, others maintain order
, ("M1-S-<Tab>", rotSlavesDown) -- Rotate all windows except master and keep focus in place
, ("M1-C-<Tab>", rotAllDown) -- Rotate all the windows in the current stack
--, ("M-S-s", windows copyToAll)
, ("M-C-s", killAllOtherCopies)
-- Layouts
, ("M-<Tab>", sendMessage NextLayout) -- Switch to next layout
, ("M-C-M1-<Up>", sendMessage Arrange)
, ("M-C-M1-<Down>", sendMessage DeArrange)
, ("M-<Space>", sendMessage (MT.Toggle NBFULL) >> sendMessage ToggleStruts) -- Toggles noborder/full
, ("M-S-<Space>", sendMessage ToggleStruts) -- Toggles struts
, ("M-S-n", sendMessage $ MT.Toggle NOBORDERS) -- Toggles noborder
, ("M-<KP_Multiply>", sendMessage (IncMasterN 1)) -- Increase number of clients in master pane
, ("M-<KP_Divide>", sendMessage (IncMasterN (-1))) -- Decrease number of clients in master pane
, ("M-S-<KP_Multiply>", increaseLimit) -- Increase number of windows
, ("M-S-<KP_Divide>", 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-<KP_Add>", shiftTo Next nonNSP >> moveTo Next nonNSP) -- Shifts focused window to next ws
, ("M-S-<KP_Subtract>", 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-<Backspace>", promote) -- Moves focused window to master, others maintain order
, ("M-S-<Tab>", rotSlavesDown) -- Rotate all windows except master and keep focus in place
, ("M-C-<Tab>", rotAllDown) -- Rotate all the windows in the current stack
-- Layouts
, ("M-<Tab>", sendMessage NextLayout) -- Switch to next layout
, ("M-C-M1-<Up>", sendMessage Arrange)
, ("M-C-M1-<Down>", sendMessage DeArrange)
, ("M-<Space>", sendMessage (MT.Toggle NBFULL) >> sendMessage ToggleStruts) -- Toggles noborder/full
, ("M-S-<Space>", 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-<Up>", sendMessage (IncMasterN 1)) -- Increase number of clients in master pane
, ("M-S-<Down>", sendMessage (IncMasterN (-1))) -- Decrease number of clients in master pane
, ("M-C-<Up>", increaseLimit) -- Increase number of windows
, ("M-C-<Down>", 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-<Return>", 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
, ("<XF86AudioPlay>", spawn "cmus toggle")
, ("<XF86AudioPrev>", spawn "cmus prev")
, ("<XF86AudioNext>", spawn "cmus next")
, ("<XF86AudioPlay>", spawn (myTerminal ++ "mocp --play"))
, ("<XF86AudioPrev>", spawn (myTerminal ++ "mocp --previous"))
, ("<XF86AudioNext>", spawn (myTerminal ++ "mocp --next"))
-- , ("<XF86AudioMute>", spawn "amixer set Master toggle") -- Bug prevents it from toggling correctly in 12.04.
, ("<XF86AudioLowerVolume>", spawn "amixer set Master 5%- unmute")
, ("<XF86AudioRaiseVolume>", spawn "amixer set Master 5%+ unmute")
, ("<XF86HomePage>", spawn "firefox")
, ("<XF86Search>", safeSpawn "firefox" ["https://www.google.com/"])
, ("<XF86Search>", safeSpawn "firefox" ["https://www.duckduckgo.com/"])
, ("<XF86Mail>", runOrRaise "geary" (resource =? "thunderbird"))
, ("<XF86Calculator>", runOrRaise "gcalctool" (resource =? "gcalctool"))
, ("<XF86Eject>", spawn "toggleeject")
, ("<Print>", 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 = "<fc=#666666> <fn=2>|</fn> </fc>" -- Separators in xmobar
, ppSep = "<fc=#666666> <fn=2>|</fn> </fc>" -- Separators in xmobar
, ppUrgent = xmobarColor "#C45500" "" . wrap "!" "!" -- Urgent workspace
, ppExtras = [windowCount] -- # of windows current workspace
, ppOrder = \(ws:l:t:ex) -> [ws,l]++ex++[t]

View file

@ -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 = [ "<action=xdotool key super+" ++ show (n) ++ "> " ++ ws ++ " </action>" |
clickable l = [ "<action=xdotool key super+" ++ show (n) ++ ">" ++ ws ++ "</action>" |
(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-<Return>", 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-<Return>", shellPrompt dtXPConfig) -- Shell Prompt
, ("M-S-<Return>", 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-<Return>", 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-<Delete>", withFocused $ windows . W.sink) -- Push floating window back to tile
, ("M-S-<Delete>", 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-<Backspace>", promote) -- Moves focused window to master, others maintain order
, ("M1-S-<Tab>", rotSlavesDown) -- Rotate all windows except master and keep focus in place
, ("M1-C-<Tab>", rotAllDown) -- Rotate all the windows in the current stack
--, ("M-S-s", windows copyToAll)
, ("M-C-s", killAllOtherCopies)
-- Layouts
, ("M-<Tab>", sendMessage NextLayout) -- Switch to next layout
, ("M-C-M1-<Up>", sendMessage Arrange)
, ("M-C-M1-<Down>", sendMessage DeArrange)
, ("M-<Space>", sendMessage (MT.Toggle NBFULL) >> sendMessage ToggleStruts) -- Toggles noborder/full
, ("M-S-<Space>", sendMessage ToggleStruts) -- Toggles struts
, ("M-S-n", sendMessage $ MT.Toggle NOBORDERS) -- Toggles noborder
, ("M-<KP_Multiply>", sendMessage (IncMasterN 1)) -- Increase number of clients in master pane
, ("M-<KP_Divide>", sendMessage (IncMasterN (-1))) -- Decrease number of clients in master pane
, ("M-S-<KP_Multiply>", increaseLimit) -- Increase number of windows
, ("M-S-<KP_Divide>", 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-<KP_Add>", shiftTo Next nonNSP >> moveTo Next nonNSP) -- Shifts focused window to next ws
, ("M-S-<KP_Subtract>", 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-<Backspace>", promote) -- Moves focused window to master, others maintain order
, ("M-S-<Tab>", rotSlavesDown) -- Rotate all windows except master and keep focus in place
, ("M-C-<Tab>", rotAllDown) -- Rotate all the windows in the current stack
-- Layouts
, ("M-<Tab>", sendMessage NextLayout) -- Switch to next layout
, ("M-C-M1-<Up>", sendMessage Arrange)
, ("M-C-M1-<Down>", sendMessage DeArrange)
, ("M-<Space>", sendMessage (MT.Toggle NBFULL) >> sendMessage ToggleStruts) -- Toggles noborder/full
, ("M-S-<Space>", 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-<Up>", sendMessage (IncMasterN 1)) -- Increase number of clients in master pane
, ("M-S-<Down>", sendMessage (IncMasterN (-1))) -- Decrease number of clients in master pane
, ("M-C-<Up>", increaseLimit) -- Increase number of windows
, ("M-C-<Down>", 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-<Return>", 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
, ("<XF86AudioPlay>", spawn "cmus toggle")
, ("<XF86AudioPrev>", spawn "cmus prev")
, ("<XF86AudioNext>", spawn "cmus next")
, ("<XF86AudioPlay>", spawn (myTerminal ++ "mocp --play"))
, ("<XF86AudioPrev>", spawn (myTerminal ++ "mocp --previous"))
, ("<XF86AudioNext>", spawn (myTerminal ++ "mocp --next"))
-- , ("<XF86AudioMute>", spawn "amixer set Master toggle") -- Bug prevents it from toggling correctly in 12.04.
, ("<XF86AudioLowerVolume>", spawn "amixer set Master 5%- unmute")
, ("<XF86AudioRaiseVolume>", spawn "amixer set Master 5%+ unmute")
, ("<XF86HomePage>", spawn "firefox")
, ("<XF86Search>", safeSpawn "firefox" ["https://www.google.com/"])
, ("<XF86Search>", safeSpawn "firefox" ["https://www.duckduckgo.com/"])
, ("<XF86Mail>", runOrRaise "geary" (resource =? "thunderbird"))
, ("<XF86Calculator>", runOrRaise "gcalctool" (resource =? "gcalctool"))
, ("<XF86Eject>", spawn "toggleeject")
, ("<Print>", 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 = "<fc=#666666> <fn=2>|</fn> </fc>" -- Separators in xmobar
, ppSep = "<fc=#666666> <fn=2>|</fn> </fc>" -- Separators in xmobar
, ppUrgent = xmobarColor "#C45500" "" . wrap "!" "!" -- Urgent workspace
, ppExtras = [windowCount] -- # of windows current workspace
, ppOrder = \(ws:l:t:ex) -> [ws,l]++ex++[t]

View file

@ -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.

Binary file not shown.