19 Commits

Author SHA1 Message Date
5e8eaceae6 Fixed battery, temperature, clock, and workspace placement 2021-01-31 20:38:42 -05:00
4d9a57c448 Fixed xK_w, xK_r for the multi-screen 2021-01-31 19:56:14 -05:00
b45529e715 Fixed font (added "xft:" to font designation 2020-12-22 15:37:35 -05:00
ea170669e1 Took out do from clipmenu key binding 2020-12-21 20:37:26 -05:00
23eac2f9a5 clipmenu (complete) 2020-12-21 20:31:48 -05:00
79e6cf4b49 clipmenu branch initial commit 2020-12-21 16:02:18 -05:00
52a0702c7e Took out WM name (for Java crap) 2020-12-21 15:50:50 -05:00
9e7f09824d Fixed i3lock (no more white background) 2020-10-23 18:03:00 -04:00
4d19799b99 Remove spideroak workspace 2020-06-13 12:47:33 -04:00
1abee908ab Final bottom_dock commit (feature complete) 2020-06-05 22:57:47 -04:00
e9eabe81c8 Initial bottom_dock commit 2020-05-31 17:11:35 -04:00
14b8971b39 Fixed XMonad/dzen2 font setup 2020-05-30 17:09:39 -04:00
28864ff200 Fixed menubar formatting 2020-04-12 22:57:11 -04:00
e60fa6c76c 2020-04-12 base commit 2020-04-12 14:02:22 -04:00
60411b74cc Fixed keybinding for Google Chrome (not Chromium) 2019-08-04 19:36:23 -04:00
f700429936 xmonad.hs as of 2019-07-29T19:58:45 -04:00 2019-07-29 19:58:31 -04:00
d6b7f6686f Added troubleshooting directory 2019-07-29 19:45:21 -04:00
fcfb9a2aae Swapped xK_w and xK_r, for sending files to the left and right monitor, respectively 2018-10-26 20:23:53 -04:00
e47b69dc5a Fixed single-screen flicker (removed cal), and xrandr --off 2018-08-18 22:11:31 -04:00
3 changed files with 76 additions and 47 deletions

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
prompt-history
xmonad-x86_64-linux
xmonad.errors
xmonad.hi
xmonad.o

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

118
xmonad.hs
View File

@ -5,6 +5,7 @@ import XMonad.Config.Desktop
-- Actions
import XMonad.Actions.CycleWS
import XMonad.Actions.DynamicWorkspaces as DW
import XMonad.Actions.GridSelect
import XMonad.Actions.OnScreen
import XMonad.Actions.SpawnOn
import XMonad.Actions.UpdatePointer
@ -90,17 +91,17 @@ toggleHomeScreens = do
sc <- IS.countScreens
if sc == 1
then do
spawn "xrandr --output DVI-I-2-1 --off --output DVI-I-3-2 off"
--spawn "xrandr --output DVI-I-2-1 --off --output DVI-I-3-2 --off"
spawn "while true; do \n\
\~/bin/battery; \n\
\echo -n ' '; \n\
\echo -n $(cat /tmp/temp); \n\
\~/bin/temp.sh; \n\
\echo -n ' '; \n\
\date \"+%a, %b %d %T\"; \n\
\cal | /usr/bin/sed -E \"s/($(date +%_d)\b)/^fg(green)\1^fg()/\" ; \n\
\/usr/bin/sed -E \"s/($(date +%_d)\b)/^fg(green)\1^fg()/\" ; \n\
\sleep 1; \n\
\done | dzen2 -dock -p -x 1670 -w 255 -e \"onstart:lower;button1=togglecollapse\" -u -h 24 -ta l -sa c -fg #aaaaaa -bg #000000 -fn Terminus-10 &"
\done | dzen2 -dock -p -x 1600 -w 325 -u -h 24 -ta r -sa c -e 'sigusr1=togglehide'&"
else if sc == 3
then do
spawn "xrandr --output eDP-1-1 --primary --auto --output DVI-I-3-2 --auto --left-of eDP-1-1 --output DVI-I-2-1 --auto --right-of eDP-1-1"
@ -108,27 +109,27 @@ toggleHomeScreens = do
spawn "while true; do \n\
\~/bin/battery; \n\
\echo -n ' '; \n\
\echo -n $(cat /tmp/temp); \n\
\~/bin/temp.sh; \n\
\echo -n ' '; \n\
\date '+%a, %b %d %T'; \n\
\sleep 1; \n\
\done | dzen2 -dock -p -x 1680 -w 255 -h 24 -ta l -fg #aaaaaa -bg #000000 -fn Terminus-10 &"
\done | dzen2 -dock -p -x 1602 -w 325 -h 24 -ta l -fg #aaaaaa -bg #000000 -fn 'xos4 Terminus:style=Regular:Pixelsize=12' &"
spawn "while true; do \n\
\~/bin/battery; \n\
\echo -n ' '; \n\
\echo -n $(cat /tmp/temp); \n\
\~/bin/temp.sh; \n\
\echo -n ' '; \n\
\date '+%a, %b %d %T'; \n\
\sleep 1; \n\
\done | dzen2 -dock -p -x 3600 -w 255 -h 24 -ta l -fg #aaaaaa -bg #000000 -fn Terminus-10 &"
\done | dzen2 -dock -p -x 3522 -w 325 -h 24 -ta l -fg #aaaaaa -bg #000000 -fn 'xos4 Terminus:style=Regular:Pixelsize=12' &"
spawn "while true; do \n\
\~/bin/battery; \n\
\echo -n ' '; \n\
\echo -n $(cat /tmp/temp); \n\
\~/bin/temp.sh; \n\
\echo -n ' '; \n\
\date '+%a, %b %d %T'; \n\
\sleep 1; \n\
\done | dzen2 -dock -p -x 5520 -w 255 -h 24 -ta l -fg #aaaaaa -bg #000000 -fn Terminus-10 &"
\done | dzen2 -dock -p -x 5442 -w 325 -h 24 -ta l -fg #aaaaaa -bg #000000 -fn 'xos4 Terminus:style=Regular:Pixelsize=12' &"
{- spawn "while true; do echo -n $(cat /tmp/temp); echo -n ' '; date '+%a, %b %d %T'; sleep 1; done | dzen2 -dock -p -x 1710 -w 210 -e 'onstart:lower;button2=togglehide' -h 24 -ta l -fg #aaaaaa -bg #000000 -fn Terminus-10 -xs 1 &"
spawn "while true; do echo -n $(cat /tmp/temp); echo -n ' '; date '+%a, %b %d %T'; sleep 1; done | dzen2 -dock -p -x 3630 -w 210 -e 'onstart:lower;button2=togglehide' -h 24 -ta l -fg #aaaaaa -bg #000000 -fn Terminus-10 -xs 0 &"
spawn "while true; do echo -n $(cat /tmp/temp); echo -n ' '; date '+%a, %b %d %T'; sleep 1; done | dzen2 -dock -p -x 5550 -w 210 -e 'onstart:lower;button2=togglehide' -h 24 -ta r -fg #aaaaaa -bg #000000 -fn Terminus-10 -xs 2 &" -}
@ -141,6 +142,7 @@ myManageHook = composeAll
[ isDialog --> doFloat
, className =? "Gnome-dictionary" --> doFloat
, className =? "Xfce4-dict" --> doFloat
, className =? "Goldendict" --> doFloat
, className =? "Last.fm" --> doFloat
, className =? "Xmessage" --> doFloat
, className =? "Audacious" --> doFloat
@ -209,31 +211,38 @@ layoutH = layoutHints
-- ||| tiled ||| Mirror tiled)
$ Full
||| Mirror tiled
||| tabbed shrinkText myTheme
||| tiled
where
tiled = Tall 1 (3 % 100) (1/2)
--tiled2 = Tall 1 (3 % 100) (5 % 9)
myTheme :: Theme
myTheme = defaultTheme {
fontName = myFont
}
myFont = "xft:xos4 Terminus:style=Regular:Pixelsize=12"
fadeHook = fadeInactiveLogHook fadeAmount
where fadeAmount = 0.8
makeLauncher yargs run exec close = concat
["exe=`yeganesh ", yargs, "` && ", run, " ", exec, "$exe", close]
["exe=`yegonesh ", yargs, "` && ", run, " ", exec, "$exe", close]
--launcher = makeLauncher "-x -- -nf grey -nb black -fn 'xos4 Terminus:Pixelsize=8'" "eval" "\"exec " "\""
launcher = makeLauncher "-x" "eval" "\"exec " "\""
launcher = makeLauncher "-x -- -nf grey -nb black -fn 'xos4 Terminus:style=Regular:pixelsize=16'" "eval" "\"exec " "\""
main = do
dzenCenterBar <- spawnPipe centerBar
-- dzenLeftBar <- spawnPipe leftBar
-- dzenRightBar <- spawnPipe rightBar
dzenBottomBar <- spawnPipe bottomBar
xmonad $ docks $ ewmh $ desktopConfig {
workspaces = ["shell","spideroak","chromium","pindrop","kofc","bitcoin"]
workspaces = ["shell","vivaldi","pindrop","kofc","VM"]
, terminal = myTerminal
, focusFollowsMouse = True
, manageHook = manageDocks <+> myManageHook <+> manageHook desktopConfig
, handleEventHook = docksEventHook <+> handleEventHook desktopConfig
, layoutHook = avoidStruts $ layoutH
--, logHook = myLogHook dzenCenterBar >> myLogHook dzenLeftBar >> myLogHook dzenRightBar >> fadeHook >> updatePointer (0.5, 0.5) (0, 0)
, logHook = myLogHook dzenCenterBar >> fadeHook >> updatePointer (0.5, 0.5) (0, 0)
, borderWidth = 1
, normalBorderColor = "#333333"
@ -242,18 +251,22 @@ main = do
, startupHook = docksStartupHook <+> myStartup
} `additionalKeys` myKeys
myStartup :: X ()
myStartup = do
setWMName "LG3D"
--setWMName "LG3D"
toggleHomeScreens
spawn "trayer --edge top --align right --widthtype request --margin 255 --expand false --align right --SetDockType true --SetPartialStrut false --tint 0x000000 --transparent true --alpha 0 --height 24 --monitor 'primary'"
spawn "trayer --edge top --align right --widthtype request --margin 318 --expand false --SetDockType true --SetPartialStrut false --tint 0x000000 --transparent true --alpha 0 --height 24 --monitor 'primary'"
--spawn "gnome-gmail-notifier"
spawn "xset dpms 600"
--spawn "xautolock -secure -time 10 -locker 'i3lock -c 000000 -i /home/trey/images/black.png'"
spawn "xautolock -secure -time 10 -locker 'i3lock -c 000000'"
myBitmapsDir = "/home/trey/.xmonad/dzen2"
--leftBar = "dzen2 -w 0 -h 24 -ta l -fg #555753 -bg #000000 -fn Terminus-10 -xs 1"
centerBar = "dzen2 -dock -p -x 1921 -ta l -w 960 -e 'onstart:lower;button2=togglehide' -fg #555753 -bg #000000 -fn Terminus-10 "
centerBar = "dzen2 -dock -p -x 1920 -ta l -w 1024 -e 'onstart:lower;button2=togglehide;sigusr1=togglehide'"
bottomBar = "conky | dzen2 -dock -p -x 1920 -y 1080 -ta l -w 1920 -e 'sigusr1=togglehide'"
-- rightBar = "dzen2 -w 3840 -h 24 -ta r -fg #555753 -bg #000000 -fn Terminus-10 -xs 2"
myLogHook :: Handle -> X ()
@ -291,10 +304,10 @@ winKey :: KeyMask-}
--myTerminal :: String
--myTerminal = "konsole"
myTerminal = "ssh-agent urxvtc -cd ~"
--myTerminal = "terminology"
--myTerminal = "ssh-agent urxvtc -cd ~"
myTerminal = "alacritty"
--myTerminal = "terminator"
altTerminal = "urxvtc -cd ~ -name altUrxvt"
--altTerminal = "urxvtc -cd ~ -name altUrxvt4
--myTerminal = "gnome-terminal"
--myTerminal = "terminator"
@ -328,7 +341,7 @@ myKeys = [
--, ((winKey , xK_l), spawnHere "xscreensaver-command --lock && sleep 3 && xset dpms force off")
--, ((winKey , xK_l), spawnHere "gnome-screensaver-command --lock && sleep 10 && xset dpms force off")
--, ((winKey , xK_l), spawnHere "dm-tool lock")
, ((winKey , xK_l), spawnHere "i3lock --color 000000 && sleep 3 && xset dpms force off")
, ((winKey , xK_l), spawnHere "i3lock --color 000000 -i /home/trey/images/black.png && sleep 3 && xset dpms force off")
-- , ((winKey , xK_l), spawnHere "light-locker-command --lock && sleep 10 && xset dpms force off")
-- , ((winKey , xK_l), spawnHere "dm-tool lock && sleep 3 && xset dpms force off")
-- ((winKey , xK_l), spawnHere "xscreensaver-command --lock")
@ -336,7 +349,7 @@ myKeys = [
, ((winKey , xK_Return), do
windows (viewOnScreen 0 "shell")
--ifWindows (resource =? "main") (mapM_ focus) (spawnHere myTerminal))
ifWindows (resource =? "urxvt") (mapM_ focus) (spawnHere myTerminal))
ifWindows (resource =? "Alacritty") (mapM_ focus) (spawnHere myTerminal))
, ((controlMask .|. lAlt, xK_BackSpace), (spawnHere "xfdesktop --quit"))
, ((controlMask .|. lAlt, xK_Delete), (spawnHere "pkill -9 chromium"))
, ((controlMask .|. shiftMask, xK_Return), (spawnHere myTerminal))
@ -344,24 +357,25 @@ myKeys = [
, ((controlMask .|. shiftMask, xK_4), unGrab >> spawn "scrot --exec 'mkdir -p ~/Desktop && mv $f ~/Desktop' --select && paplay ~/wav/camera.wav")
-- windows (viewOnScreen 1 "ws")
-- ifWindows (resource =? "altUrxvt") (mapM_ focus) (spawnHere altTerminal))
, ((winKey .|. shiftMask, xK_v), do
windows (viewOnScreen 1 "virtualbox")
ifWindows (className =? "Gvim") (mapM_ focus) (spawnHere "gvim"))
, ((winKey , xK_v), do
windows (viewOnScreen 1 "timetracker")
ifWindows (title =? "osmium:timetracker") (mapM_ focus) (spawnHere "urxvtc -cd ~/timetracker -e 'tmux attach -t timetracker || tmux -2 new-session -s timetracker'"))
, ((lAlt, xK_v), spawn "clipmenu && xdotool key Ctrl+v")
--, ((winKey .|. shiftMask, xK_v), do
-- windows (viewOnScreen 1 "virtualbox")
-- ifWindows (className =? "Gvim") (mapM_ focus) (spawnHere "gvim"))
--, ((winKey , xK_v), do
-- windows (viewOnScreen 1 "timetracker")
-- ifWindows (title =? "osmium:timetracker") (mapM_ focus) (spawnHere "urxvtc -cd ~/timetracker -e 'tmux attach -t timetracker || tmux -2 new-session -s timetracker'"))
--, ((lAlt , xK_v), spawnHere "xfce4-popup-clipman")
--, ((winKey , xK_x), windowPromptGoto dXPConfig)
, ((winKey .|. shiftMask, xK_x), windowPromptBring dXPConfig)
--, ((winKey .|. shiftMask, xK_Return), windows W.swapMaster)
--, ((winKey .|. shiftMask, xK_Return), spawnHere myTerminal)
, ((winKey , xK_b), sendMessage $ ToggleStrut U)
--, ((winKey , xK_g), spawnHere "chromium --allow-outdated-plugins --purge-memory-button ")
, ((winKey , xK_b), do
spawnHere "pkill -USR1 dzen2"
spawnHere "pkill trayer"
sendMessage $ ToggleStrut U)
, ((lAlt , xK_g), spawnHere "~/bin/google_selection.sh")
--, ((winKey , xK_g), ifWindows (className =? "Google-chrome") (mapM_ focus) (spawnHere "google-chrome"))
-- , ((winKey , xK_g), do
-- windows (viewOnScreen 1 "pindrop")
--ifWindows (className =? "chromium") (mapM_ focus) (spawnHere "chromium"))
-- ifWindows (className =? "Google-chrome") (mapM_ focus) (spawnHere "google-chrome-stable"))
, ((winKey , xK_g), ifWindows (className =? "Google-chrome") (mapM_ focus) (spawnHere "google-chrome-stable"))
--, ((winKey , xK_r), do
-- windows (viewOnScreen 1 "wb")
-- ifWindows (className =? "Google-chrome-stable") (mapM_ focus) (spawnHere "google-chrome-stable"))
@ -370,8 +384,9 @@ myKeys = [
--, ((winKey , xK_i), spawnHere "iceweasel")
--, ((winKey , xK_i), spawnHere "clementine")
, ((winKey , xK_i), ifWindows (className =? "Clementine") (mapM_ killWindow) (spawnHere "clementine"))
, ((winKey , xK_d), ifWindows (className =? "Xfce4-dict") (mapM_ killWindow) (spawnHere "xfce4-dict"))
--, ((winKey , xK_d), ifWindows (className =? "Gnome-dictionary") (mapM_ killWindow) (spawnHere "gnome-dictionary"))
-- , ((winKey , xK_d ), ifWindows (className =? "Goldendict") (mapM_ killWindow) (spawnHere "goldendict"))
-- , ((winKey , xK_d), ifWindows (className =? "Xfce4-dict") (mapM_ killWindow) (spawnHere "xfce4-dict"))
, ((winKey , xK_d), ifWindows (className =? "Gnome-dictionary") (mapM_ killWindow) (spawnHere "gnome-dictionary"))
, ((winKey , xK_f), spawnHere (myTerminal ++ " -e vifm . ~"))
--, ((winKey , xK_f), spawnHere ("export SHELL=/bin/bash && " ++ myTerminal ++ " -e mc"))
--, ((winKey , xK_e), spawnHere ("export SHELL=/bin/bash && " ++ myTerminal ++ " -e mc")) -- key stroke matches Win+E (from Win7)
@ -396,6 +411,7 @@ myKeys = [
, ((winKey , xK_k), windows W.focusUp) -- explicitly setting the default
, ((winKey .|. controlMask, xK_k), windows W.swapUp) -- explicitly setting the default
, ((lAlt , xK_Tab), windows W.focusDown) -- replicating MS Windows task switcher behavior
, ((winKey , xK_Tab), goToSelected defaultGSConfig)
, ((lAlt .|. shiftMask, xK_Tab), windows W.focusUp) -- replicating MS Windows task switcher behavior
, ((winKey .|. controlMask, xK_Return), windows W.swapMaster)
, ((winKey, xK_space ), sendMessage NextLayout)
@ -416,20 +432,24 @@ myKeys = [
, ((0, xF86XK_Calculator), ifWindows (className =? "Gnome-calculator") (mapM_ killWindow) (spawnHere "gnome-calculator"))
, ((0, xF86XK_AudioPlay), spawn "clementine --play-pause")
--, ((0, xF86XK_AudioMute), spawn "amixer -c 0 set Master toggle")
, ((0, xF86XK_AudioMute), spawn "/home/trey/bin/mute")
, ((0, xF86XK_AudioRaiseVolume), spawn "amixer -c 0 set Master 5dB+")
, ((0, xF86XK_AudioLowerVolume), spawn "amixer -c 0 set Master 5dB-")
, ((0, xF86XK_AudioMute), spawn "pamixer --toggle-mute")
, ((0, xF86XK_AudioRaiseVolume), spawn "pamixer --increase 5")
, ((0, xF86XK_AudioLowerVolume), spawn "pamixer --decrease 5")
, ((0, xF86XK_MonBrightnessUp), spawn "sudo xbacklight -inc 5")
, ((0, xF86XK_MonBrightnessDown), spawn "sudo xbacklight -dec 5")
-- , ((winKey .|. controlMask, xK_Left), shiftToPrev >> prevWS)
-- , ((winKey .|. controlMask, xK_Right), shiftToNext >> nextWS)
, ((winKey .|. controlMask, xK_h), sendMessage Shrink)
, ((winKey .|. lAlt, xK_h), do
--windows (viewOnScreen 1 "hng")
windows (viewOnScreen 1 "chromium")
ifWindows (className =? "Chromium") (mapM_ focus) (spawnHere "chromium"))
--windows (viewOnScreen 1 "chromium")
--ifWindows (className =? "Chromium") (mapM_ focus) (spawnHere "chromium"))
windows (viewOnScreen 1 "vivaldi")
ifWindows (className =? "Vivaldi-stable") (mapM_ focus) (spawnHere "vivaldi-stable"))
--ifWindows (className =? "Iceweasel") (mapM_ focus) (spawnHere "iceweasel"))
, ((winKey .|. controlMask, xK_l), sendMessage Expand)
--, ((winKey , xK_1), windows (viewOnScreen 0 "shell"))
, ((winKey , xK_1), ifWindows (resource =? "urxvt") (mapM_ focus) (spawnHere myTerminal))
, ((winKey , xK_1), ifWindows (className =? "Alacritty") (mapM_ focus) (spawnHere myTerminal))
, ((winKey , xK_2), windows (viewOnScreen 0 "chromium"))
, ((winKey , xK_a), do
windows (viewOnScreen 1 "pindrop")
@ -525,7 +545,7 @@ myKeys = [
[((m .|. winKey, key), screenWorkspace sc >>= flip whenJust (windows . f))
-- | (key, sc) <- zip [xK_w, xK_r] [0..]
-- | (key, sc) <- zip [xK_Left, xK_Right] [0..] -- For arrow keys
| (key, sc) <- zip [xK_w, xK_e, xK_r] [0..] -- For w,r keys
| (key, sc) <- zip [xK_e, xK_w, xK_r] [0..] -- For w,r keys
-- | (key, sc) <- zip [xK_w, xK_r] [1,0] -- For w,r keys in backwards order
-- | (key, sc) <- zip [xK_w, xK_r] [1,0] -- For w,r keys in backwards order
, (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
@ -533,7 +553,9 @@ myKeys = [
dXPConfig = defaultXPConfig {
bgColor = "yellow"
, fgColor = "blue"
, fgColor = "blue"
, font = myFont
}
myXPConfigSelect = defaultXPConfig {
@ -541,6 +563,7 @@ myXPConfigSelect = defaultXPConfig {
, fgColor = "blue"
, autoComplete = Just 0
, showCompletionOnTab = True
, font = myFont
}
myXPConfigNew = defaultXPConfig {
@ -548,5 +571,6 @@ myXPConfigNew = defaultXPConfig {
, fgColor = "blue"
, autoComplete = Nothing
, showCompletionOnTab = True
, font = myFont
}