Compare commits
10 Commits
dzen2_flic
...
bottom_doc
Author | SHA1 | Date | |
---|---|---|---|
1abee908ab | |||
e9eabe81c8 | |||
14b8971b39 | |||
28864ff200 | |||
e60fa6c76c | |||
60411b74cc | |||
f700429936 | |||
d6b7f6686f | |||
fcfb9a2aae | |||
e47b69dc5a |
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
prompt-history
|
||||
xmonad-x86_64-linux
|
||||
xmonad.errors
|
||||
xmonad.hi
|
||||
xmonad.o
|
BIN
troubleshooting/2019-07-29-194200_1920x1080_scrot.png
Normal file
BIN
troubleshooting/2019-07-29-194200_1920x1080_scrot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 95 KiB |
93
xmonad.hs
93
xmonad.hs
@ -90,17 +90,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,11 +108,11 @@ 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 1680 -w 255 -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\
|
||||
@ -120,7 +120,7 @@ toggleHomeScreens = do
|
||||
\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 3600 -w 255 -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\
|
||||
@ -128,7 +128,7 @@ toggleHomeScreens = do
|
||||
\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 5520 -w 255 -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 +141,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,25 +210,35 @@ 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 = "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
|
||||
dzenBottomBar <- spawnPipe bottomBar
|
||||
-- dzenLeftBar <- spawnPipe leftBar
|
||||
-- dzenRightBar <- spawnPipe rightBar
|
||||
xmonad $ docks $ ewmh $ desktopConfig {
|
||||
workspaces = ["shell","spideroak","chromium","pindrop","kofc","bitcoin"]
|
||||
workspaces = ["shell","spideroak","vivaldi","pindrop","kofc","bitcoin"]
|
||||
, terminal = myTerminal
|
||||
, focusFollowsMouse = True
|
||||
, manageHook = manageDocks <+> myManageHook <+> manageHook desktopConfig
|
||||
@ -242,18 +253,21 @@ main = do
|
||||
, startupHook = docksStartupHook <+> myStartup
|
||||
} `additionalKeys` myKeys
|
||||
|
||||
|
||||
myStartup :: X ()
|
||||
myStartup = do
|
||||
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 --align right --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'"
|
||||
spawn "xautolock -secure -time 10 -locker 'i3lock -c 000000 -i /home/trey/images/black.png'"
|
||||
|
||||
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 2060 -ta l -w 1024 -e 'onstart:lower;button2=togglehide;sigusr1=togglehide'"
|
||||
bottomBar = "conky | dzen2 -dock -p -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 +305,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 +342,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 +350,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))
|
||||
@ -355,13 +369,13 @@ myKeys = [
|
||||
, ((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_b), do
|
||||
spawnHere "pkill -USR1 dzen2"
|
||||
spawnHere "pkill trayer"
|
||||
sendMessage $ ToggleStrut U)
|
||||
--, ((winKey , xK_g), spawnHere "chromium --allow-outdated-plugins --purge-memory-button ")
|
||||
--, ((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)
|
||||
@ -416,20 +431,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 +544,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_r, xK_w] [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 +552,9 @@ myKeys = [
|
||||
|
||||
dXPConfig = defaultXPConfig {
|
||||
bgColor = "yellow"
|
||||
, fgColor = "blue"
|
||||
, fgColor = "blue"
|
||||
, font = myFont
|
||||
|
||||
}
|
||||
|
||||
myXPConfigSelect = defaultXPConfig {
|
||||
@ -541,6 +562,7 @@ myXPConfigSelect = defaultXPConfig {
|
||||
, fgColor = "blue"
|
||||
, autoComplete = Just 0
|
||||
, showCompletionOnTab = True
|
||||
, font = myFont
|
||||
}
|
||||
|
||||
myXPConfigNew = defaultXPConfig {
|
||||
@ -548,5 +570,6 @@ myXPConfigNew = defaultXPConfig {
|
||||
, fgColor = "blue"
|
||||
, autoComplete = Nothing
|
||||
, showCompletionOnTab = True
|
||||
, font = myFont
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user