-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add xmonad-related configs; some other changes
- Loading branch information
Showing
6 changed files
with
166 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Config | ||
{ font = "xft:Hack-10:bold" | ||
, bgColor = "black" | ||
, fgColor = "grey" | ||
, position = TopSize L 90 24 | ||
, commands = | ||
[ Run Cpu ["-m", "2", "-L","3","-H","50","--normal","green","--high","red"] 10 | ||
, Run Memory ["-t","Mem: <usedratio>%"] 10 | ||
, Run Swap [] 10 | ||
, Run BatteryP ["BAT0"] | ||
[ "-t", "<watts>W, <left>% / <timeleft> <acstatus>" | ||
, "--" | ||
, "-O", "<fc=#88ff88>AC</fc>" | ||
, "-i", "<fc=#8888ff>--</fc>" | ||
, "-o", "<fc=#ffaaaa>DC</fc>" | ||
] 50 | ||
, Run Date "%a %Y-%d-%m %H:%M" "date" 10 | ||
, Run StdinReader | ||
, Run CoreTemp ["-t", "Tcore: <core0>°C"] 10 | ||
, Run DynNetwork ["-m", "4", "-t", "<dev>: <rx>KB↓<tx>KB↑"] 5 | ||
, Run Wireless "wlan0" [] 5 | ||
, Run Kbd [("ru(ruu)", "RU"), ("us", "EN")] | ||
] | ||
, sepChar = "%" | ||
, alignSep = "}{" | ||
, template = "%StdinReader% }{ %dynnetwork% %wlan0wi% | %cpu% | %memory% * %swap% | %coretemp% | %battery% | <fc=#ee9a00>%date%</fc> <fc=#88ff88>[%kbd%]</fc>" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# xmodmap ~/.Xmodmap | ||
xrdb -merge .Xresources | ||
kbdd | ||
trayer --edge top --align right --SetDockType true --SetPartialStrut true \ | ||
--expand true --width 10 --transparent true --tint 0x191970 --height 24 & | ||
thunar --daemon & | ||
xcompmgr & | ||
|
||
feh --bg-scale /home/lvu/heavy/photo/droplet.jpg & | ||
pasystray & | ||
wicd-gtk --tray & | ||
xscreensaver -no-splash & | ||
chromium --app=https://getgoing.slack.com & | ||
chromium --app=https://messenger.com & | ||
keepass & | ||
( sleep 10 && /usr/bin/skype ) & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
import XMonad | ||
import XMonad.Actions.FocusNth | ||
import XMonad.Hooks.DynamicLog | ||
import XMonad.Hooks.EwmhDesktops | ||
import XMonad.Hooks.FadeInactive | ||
import XMonad.Hooks.ManageDocks | ||
import XMonad.Hooks.ManageHelpers | ||
import XMonad.Layout | ||
import XMonad.Layout.Column | ||
import XMonad.Layout.Combo | ||
import XMonad.Layout.FixedColumn | ||
import XMonad.Layout.IM | ||
import XMonad.Layout.NoBorders | ||
import XMonad.Layout.OneBig | ||
import XMonad.Layout.PerWorkspace | ||
import XMonad.Layout.Spiral | ||
import XMonad.Layout.Tabbed | ||
import XMonad.Layout.TwoPane | ||
import XMonad.Layout.WindowNavigation | ||
import qualified XMonad.StackSet as W | ||
import XMonad.Util.Run(spawnPipe) | ||
import XMonad.Util.EZConfig(additionalKeys) | ||
import System.IO | ||
|
||
baseConfig = ewmh defaultConfig | ||
|
||
myWorkspaces = ["web", "dev", "im"] ++ map show [4 .. 8] ++ ["junk"] | ||
|
||
defaultLayout = FixedColumn 1 5 128 10 | ||
|
||
myIM = withIM (1/7) ((ClassName "Skype") `And` (Not (Role "ConversationsWindow"))) (Tall 1 0.01 0.5) | ||
|
||
-- too hard to maintain window numbers :( | ||
myDevLayout = combineTwo (Mirror $ TwoPane 0.03 0.8) (FixedColumn 1 5 128 10) Full | ||
|
||
-- myTabbed = tabbed shrinkText def | ||
|
||
-- myDevLayout = spiralWithDir South CW 0.68 -- FixedColumn 1 5 130 10 | ||
|
||
myLayoutHook = windowNavigation $ noBorders | ||
(onWorkspace "im" (myIM ||| Full ||| defaultLayout) $ | ||
onWorkspace "dev" (myDevLayout ||| defaultLayout ||| Full) $ | ||
defaultLayout ||| myDevLayout ||| Full | ||
) | ||
|
||
myManageHook = composeAll | ||
[ (className =? "Chromium" <&&> resource =? "getgoing.slack.com") --> doShift "im" | ||
, (className =? "Chromium" <&&> resource =? "messenger.com") --> doShift "im" | ||
, className =? "Skype" --> doShift "im" | ||
, className =? "KeePass2" --> doShift "junk" | ||
, isDialog --> doCenterFloat | ||
] | ||
|
||
myBrowser = "chromium" | ||
incognitoBrowser = "chromium --incognito" | ||
myFileManager = "thunar" | ||
myTerminal = "terminator" | ||
|
||
myKeys = | ||
[ ((mod1Mask .|. controlMask, xK_Delete), spawn "xscreensaver-command -lock") | ||
, ((mod4Mask .|. shiftMask, xK_s), spawn "systemctl suspend") | ||
, ((mod4Mask, xK_b), spawn myBrowser) | ||
, ((mod4Mask .|. shiftMask, xK_b), spawn incognitoBrowser) | ||
, ((mod4Mask, xK_f), spawn myFileManager) | ||
, ((mod4Mask, xK_Left), sendMessage $ Swap L) | ||
, ((mod4Mask, xK_Right), sendMessage $ Swap R) | ||
, ((mod4Mask, xK_Up), sendMessage $ Swap U) | ||
, ((mod4Mask, xK_Down), sendMessage $ Swap D) | ||
] -- ++ [((mod1Mask, k), focusNth i) | (i, k) <- zip [0 .. 8] [xK_1 ..]] | ||
|
||
main = do | ||
xmproc <- spawnPipe "xmobar" | ||
xmonad $ baseConfig | ||
{ terminal = myTerminal | ||
, modMask = mod4Mask | ||
-- , focusFollowsMouse = False | ||
, manageHook = myManageHook <+> manageDocks <+> manageHook defaultConfig | ||
, layoutHook = avoidStruts $ myLayoutHook | ||
, workspaces = myWorkspaces | ||
, logHook = fadeInactiveLogHook 0.8 >> dynamicLogWithPP xmobarPP | ||
{ ppOutput = hPutStrLn xmproc | ||
, ppTitle = xmobarColor "green" "" . shorten 50 | ||
} | ||
} `additionalKeys` myKeys |