diff options
author | jao <jao@gnu.org> | 2022-05-02 00:44:35 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-05-02 00:44:52 +0100 |
commit | 5b619f106191d3fedfc3ba6bd3ee63eb715b3b83 (patch) | |
tree | 4ad34d39ef231276b6dfaf372f7e8ef0dfb2899d | |
parent | 7bce289a1919943d42a2521736d14f4d197fab65 (diff) | |
download | xmonad-config-5b619f106191d3fedfc3ba6bd3ee63eb715b3b83.tar.gz xmonad-config-5b619f106191d3fedfc3ba6bd3ee63eb715b3b83.tar.bz2 |
some simplifications
-rwxr-xr-x | xmobars.sh | 8 | ||||
-rw-r--r-- | xmonad.hs | 29 |
2 files changed, 20 insertions, 17 deletions
@@ -2,13 +2,19 @@ killall trayer +if [[ $JAO_COLOR_SCHEME == dark ]]; then + alpha=255 +else + alpha=60 +fi + trayer --margin 2 --distancefrom left \ --distance 1 --edge top \ --align left --SetDockType true --SetPartialStrut false \ --widthtype request \ --height 21 --heighttype pixel \ --transparent true \ - --alpha 60 --padding 1 & + --alpha $alpha --padding 1 & killall xmobar-exwm xmobar-exwm $* & @@ -16,7 +16,6 @@ import qualified XMonad.Hooks.EwmhDesktops as Ewm import qualified XMonad.Layout.NoBorders as NB import XMonad.Layout.IM (withIM, Property(ClassName)) import XMonad.Layout.LayoutCombinators ((|||)) --- import XMonad.Layout.WindowNavigation import qualified XMonad.Layout.LayoutCombinators as LJ import qualified XMonad.Layout.Renamed as LR import qualified XMonad.Layout.Spacing as SP @@ -102,9 +101,8 @@ keyDefs conf = , ("<XF86AudioRaiseVolume>", spawn "amixer sset Master 10%+") , ("<XF86AudioLowerVolume>", spawn "amixer sset Master 10%-") , ("<XF86AudioMute>", spawn "amixer sset Master toggle") + , ("<XF86AudioPlay>", emacsclient "message \"audio play\"") , ("<Print>", spawn "import -window root ~/screenshot.png") - , ("C-c", bindAll [(isntEmacs, raiseEmacs), (pure True, sendCtrlC)]) - , ("C-S-c", bindFirst [(isntEmacs, sendCtrlC)]) , ("M-<Right>", move (10,0)) , ("M-<Left>", move (-10,0)) , ("M-<Up>", move (0,-10)) @@ -119,10 +117,9 @@ keyDefs conf = , ("M-C-<Left>", resize (-10,0) (0,1)) , ("M-C-<Up>", resize (0,-10) (0,0)) , ("M-C-<Down>", resize (0,10) (0,0)) - , ("M-C-b", sendMessage $ MD.ToggleStruts) + , ("M-b", sendMessage $ MD.ToggleStruts) , ("M-d", NS.namedScratchpadAction scratchpads "deezer") - , ("M-e", runOrRaiseEmacs) - , ("M-f", toggleEmacs runOrRaiseFirefox) + , ("M-e", toggleEmacs runOrRaiseFirefox) , ("M-m", raiseEmacs >> emacsclient "jao-transient-media") , ("M-S-r", PS.shellPrompt $ conf {P.position = P.Top}) , ("M-C-r", PS.shellPrompt $ conf {P.position = P.Top}) @@ -164,7 +161,7 @@ keyDefs conf = spacing n = SP.spacingRaw False (SP.Border n 0 n 0) True (SP.Border 0 n 0 n) True namedLyt n = LR.renamed [LR.Replace n] -lytFull = namedLyt "F" $ NB.smartBorders Full +lytFull = namedLyt "F" Full lytTall = namedLyt "T" $ spacing 1 (Tall 1 (1/100) (1/2)) lytLeft = namedLyt "L" $ withIM (9/26) (ClassName "Emacs") Full lytRight = namedLyt "R" $ Refl.reflectHoriz lytLeft @@ -180,22 +177,22 @@ centerFloat width height where marginLeft = (1 - width) / 2 marginTop = (1 - height) / 2 -mHook = MD.manageDocks <+> MH.composeOne dlgs <+> composeAll cl +mHook = MH.composeOne dlgs <+> composeAll cl where dlgs = [MH.isDialog -?> MH.doCenterFloat] - cfs = ["Display", "Gitk", "MPlayer", "Vlc", "Ekiga", "xli", "Skype", - "Gpick", "Blueman-services", "Blueman-manager", "Wicd-client.py", - "Pavumeter", "Xmessage", "XLogo", "mpv", "Mpv"] + cfs = ["Display", "Gitk", "MPlayer", "Vlc", "xli", + "Blueman-services", "Blueman-manager", + "Pavucontrol", "Pavumeter", "Xmessage", "XLogo", "mpv", "Mpv"] cl = [className =? x --> MH.doCenterFloat | x <- cfs] main = do scheme <- lookupEnv "JAO_COLOR_SCHEME" let dark = Just "dark" == scheme popCfg = if dark then darkPopConfig else lightPopConfig - defBorder = if dark then "grey10" else "grey90" - defFBorder = if dark then "grey15" else "grey50" + defBorder = if dark then "grey80" else "grey70" + defFBorder = if dark then "grey85" else "grey20" ehook = SM.serverModeEventHook <+> UH.trayerPaddingXmobarEventHook - lyt = lytFull ||| lytRight ||| lytLeft ||| lytTall + lyt = NB.smartBorders $ lytFull ||| lytRight ||| lytLeft ||| lytTall localStartupHook = spawn "xmobars.sh" >> runOrRaiseEmacs xmonad $ MD.docks $ Ewm.ewmhFullscreen $ Ewm.ewmh def { manageHook = scratchpad <+> mHook <+> manageHook def @@ -203,11 +200,11 @@ main = do , layoutHook = MD.avoidStruts lyt , startupHook = localStartupHook , modMask = mod4Mask - , borderWidth = 0 + , borderWidth = 1 , focusedBorderColor = defFBorder , normalBorderColor = defBorder , terminal = (jaoscript "term") , workspaces = defWorkspaces , focusFollowsMouse = False - } `EZ.removeKeysP` ["M-j", "M-n", "M-w", "M-m", "M-r", "M-<Space>"] + } `EZ.removeKeysP` ["M-j", "M-n", "M-w", "M-m", "M-r", "M-p", "M-<Space>"] `EZ.additionalKeysP` (keyDefs popCfg) |