mirror of
https://github.com/ellmau/nixos.git
synced 2025-12-19 09:29:36 +01:00
Further updates on the XMonad setup
This commit is contained in:
parent
ca537a05d9
commit
b99443dfaf
@ -21,6 +21,12 @@ with lib; {
|
||||
};
|
||||
};
|
||||
upower.enable = true;
|
||||
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
};
|
||||
environment.systemPackages = with pkgs; [ firefox thunderbird ];
|
||||
};
|
||||
|
||||
2
users/ellmau/conf/xmonad/ELSS.hs
Normal file
2
users/ellmau/conf/xmonad/ELSS.hs
Normal file
@ -0,0 +1,2 @@
|
||||
module ELSS where
|
||||
keyboardtoggle = "dummy"
|
||||
@ -25,14 +25,21 @@ import XMonad.Hooks.DynamicLog
|
||||
-- Code Action Imports
|
||||
import System.Exit
|
||||
import XMonad.Actions.PhysicalScreens
|
||||
import XMonad.Layout.NoBorders
|
||||
import XMonad.Layout.Grid
|
||||
import XMonad.Layout.Tabbed
|
||||
import XMonad.Layout.Renamed
|
||||
import XMonad.Layout.ThreeColumns
|
||||
|
||||
main :: IO ()
|
||||
main' :: D.Client -> IO ()
|
||||
main = mkDbusClient >>= main'
|
||||
|
||||
layout = avoidStruts $
|
||||
(Full ||| tall ||| Mirror tall)
|
||||
workSpaces = ["code", "web", "misc", "comm"] ++ map show ([5 .. 9] ++ [0])
|
||||
layout = smartBorders $ avoidStruts $
|
||||
(tall ||| Mirror tall ||| Grid ||| Full ||| simpleTabbed ||| threemid)
|
||||
where tall = Tall 1 (3/100) (1/2)
|
||||
threemid = renamed [AppendWords "Mid"] $ ThreeColMid 1 (3/100) (1/2)
|
||||
|
||||
main' dbus = do
|
||||
hostname <- io $ getHostName
|
||||
@ -42,11 +49,11 @@ main' dbus = do
|
||||
, layoutHook = layout
|
||||
, modMask = mod4Mask -- rebind mod to super key
|
||||
, keys = keyMap
|
||||
, manageHook = composeAll [ manageDocks
|
||||
, isFullscreen --> doFullFloat
|
||||
, placeHook $ withGaps (32, 32, 32, 32) $ smart (0.5, 0.5)
|
||||
, manageHook def
|
||||
]
|
||||
, manageHook = myHookManager
|
||||
, startupHook = do
|
||||
startupHook def
|
||||
spawn "autorandr -c"
|
||||
, workspaces = workSpaces
|
||||
}
|
||||
|
||||
mkDbusClient :: IO D.Client
|
||||
@ -97,14 +104,30 @@ keyMap c = mkKeymap c $
|
||||
[(m ++ k, windows $ f w)
|
||||
| (w, k) <- zip (XMonad.workspaces c) (map show $ [1..9] ++ [0]),
|
||||
(m, f) <- [("M-", W.greedyView), ("M-S-", W.shift)]
|
||||
]
|
||||
++
|
||||
] ++
|
||||
[ layoutMap k l
|
||||
| (k, l) <- [ ("u", "Full")
|
||||
, ("i", "Grid")
|
||||
, ("o", "Tall")
|
||||
]
|
||||
] ++
|
||||
[ ("<XF86AudioMute>", spawn "pactl set-sink-mute @DEFAULT_SINK@ toggle")
|
||||
, ("<XF86AudioLowerVolume>", spawn "pactl set-sink-volume @DEFAULT_SINK@ -5%")
|
||||
, ("<XF86AudioRaiseVolume>", spawn "pactl set-sink-volume @DEFAULT_SINK@ +5%")
|
||||
, ("<XF86AudioMicMute>", spawn "pactl set-source-mute @DEFAULT_SOURCE@ toggle")
|
||||
]
|
||||
|
||||
layoutMap :: String -> String -> (String, X ())
|
||||
layoutMap k l = ("M-y M-" ++ k, sendMessage $ JumpToLayout (l :: String))
|
||||
|
||||
myHookManager = composeAll [ manageDocks
|
||||
, className =? "Element" --> doShift "comm"
|
||||
, className =? "firefox" --> doShift "web"
|
||||
, isFullscreen --> doFullFloat
|
||||
, placeHook $ withGaps (32, 32, 32, 32) $ smart (0.5, 0.5)
|
||||
, manageHook def
|
||||
]
|
||||
|
||||
polybarHook :: D.Client -> PP
|
||||
polybarHook dbus =
|
||||
let wrapper c b "NSP" = mempty
|
||||
|
||||
@ -14,7 +14,7 @@ with lib; {
|
||||
];
|
||||
libFiles."ELSS.hs" = pkgs.writeText "ELSS.hs" ''
|
||||
module ELSS where
|
||||
keyboardtoggle = "${../keyboard/keyboardtoggle.sh}"
|
||||
keyboardtoggle = "${conf/keyboard/keyboard_layout_toggle.sh}"
|
||||
'';
|
||||
config = conf/xmonad/xmonad.hs;
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user