Compare commits
75 commits
master
...
iusenixbtw
Author | SHA1 | Date | |
---|---|---|---|
675e9f4125 | |||
da67a6d08f | |||
ef916319ca | |||
9c445e801a | |||
103f14ad32 | |||
f0f726f3ab | |||
8b235d3a65 | |||
e4b903562b | |||
eb9f84e65f | |||
8b162c7c31 | |||
6070398070 | |||
db58691676 | |||
64cedbb27e | |||
90d4dbb58e | |||
f8bd90fb48 | |||
c70973d131 | |||
5a9b9d09bd | |||
a131b1bb1b | |||
5483cbda5e | |||
18e653b6f2 | |||
735ec3214a | |||
baac904283 | |||
6694a0e07a | |||
c830fce008 | |||
5a280ca7be | |||
93c88791a1 | |||
7941767bc4 | |||
b1c417b464 | |||
049af82a9a | |||
ae1da29574 | |||
9b561492e8 | |||
9cacbb2a0b | |||
558f52c01b | |||
767c37d492 | |||
8d1c03a862 | |||
29a3874b34 | |||
7f7fd27fd6 | |||
1b3f67199e | |||
8cdfff9901 | |||
d9d0f13cbb | |||
8914400110 | |||
24581f06d0 | |||
d51ced34d5 | |||
6f4d2c30c5 | |||
de4c5cc9c4 | |||
e1dfa4b269 | |||
8bd5e58c8a | |||
24ec645a56 | |||
ebeb708303 | |||
05ca473721 | |||
cf5baddf49 | |||
a8b1a0d92d | |||
1ac9836718 | |||
b0cfdbe530 | |||
3893cdb68e | |||
4fe78658cd | |||
807734ba81 | |||
c7117f7e3e | |||
c604a4c006 | |||
dd15ccfe6e | |||
9cc302cb98 | |||
7bfe1c43bc | |||
26b9fd7e68 | |||
a6f50829ae | |||
1f4e774ad7 | |||
ba75e65498 | |||
c174503244 | |||
37631ed6a2 | |||
5bf31dac93 | |||
c0dba2d167 | |||
1fba240b51 | |||
bc82caba10 | |||
310dfd47eb | |||
bdf505f52f | |||
|
c1c83e186e |
14 changed files with 491 additions and 174 deletions
1
.envrc
Normal file
1
.envrc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
use flake
|
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1,8 +1,8 @@
|
||||||
.*.swp
|
.*.swp
|
||||||
artwork/
|
artwork
|
||||||
*.hi
|
*.hi
|
||||||
*.o
|
*.o
|
||||||
prompt-history
|
prompt-history
|
||||||
xmonad-x86_64-linux
|
xmonad-*-linux
|
||||||
xmonad.errors
|
xmonad.errors
|
||||||
xmonad.state
|
xmonad.state
|
||||||
|
|
43
flake.lock
Normal file
43
flake.lock
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"flake-utils": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1667395993,
|
||||||
|
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1670242877,
|
||||||
|
"narHash": "sha256-jBLh7dRHnbfvPPA9znOC6oQfKrCPJ0El8Zoe0BqnCjQ=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "6e51c97f1c849efdfd4f3b78a4870e6aa2da4198",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
19
flake.nix
Normal file
19
flake.nix
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
description = "Build my xmonad config";
|
||||||
|
|
||||||
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, flake-utils }:
|
||||||
|
|
||||||
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
|
let pkgs = nixpkgs.legacyPackages.${system}; in
|
||||||
|
{
|
||||||
|
devShells.default = import ./shell.nix { inherit pkgs; };
|
||||||
|
}) // {
|
||||||
|
packages.aarch64-linux.default =
|
||||||
|
# Notice the reference to nixpkgs here.
|
||||||
|
with import nixpkgs { system = "aarch64-linux"; };
|
||||||
|
haskellPackages.callCabal2nix "xmonad-config" ./. {};
|
||||||
|
};
|
||||||
|
}
|
82
lib/Catppuccin.hs
Normal file
82
lib/Catppuccin.hs
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
module Catppuccin
|
||||||
|
( base
|
||||||
|
, blue
|
||||||
|
, crust
|
||||||
|
, flamingo
|
||||||
|
, green
|
||||||
|
, lavender
|
||||||
|
, mantle
|
||||||
|
, maroon
|
||||||
|
, mauve
|
||||||
|
, overlay0
|
||||||
|
, overlay1
|
||||||
|
, overlay2
|
||||||
|
, peach
|
||||||
|
, pink
|
||||||
|
, red
|
||||||
|
, rosewater
|
||||||
|
, sapphire
|
||||||
|
, sky
|
||||||
|
, subtext0
|
||||||
|
, subtext1
|
||||||
|
, surface0
|
||||||
|
, surface1
|
||||||
|
, surface2
|
||||||
|
, teal
|
||||||
|
, text
|
||||||
|
, yellow
|
||||||
|
, theme
|
||||||
|
) where
|
||||||
|
|
||||||
|
import XMonad.Layout.Decoration (Theme(..))
|
||||||
|
|
||||||
|
theme :: Theme
|
||||||
|
theme =
|
||||||
|
Theme { activeColor = mauve
|
||||||
|
, inactiveColor = surface0
|
||||||
|
, urgentColor = red
|
||||||
|
, activeBorderColor = mauve
|
||||||
|
, inactiveBorderColor = surface0
|
||||||
|
, urgentBorderColor = red
|
||||||
|
, activeBorderWidth = 1
|
||||||
|
, inactiveBorderWidth = 1
|
||||||
|
, urgentBorderWidth = 1
|
||||||
|
, activeTextColor = surface0
|
||||||
|
, inactiveTextColor = surface1
|
||||||
|
, urgentTextColor = red
|
||||||
|
, fontName = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
|
||||||
|
, decoWidth = 200
|
||||||
|
, decoHeight = 15
|
||||||
|
, windowTitleAddons = []
|
||||||
|
, windowTitleIcons = []
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Colors for the Mocha variant
|
||||||
|
-- https://raw.githubusercontent.com/catppuccin/palette/main/palette.json
|
||||||
|
-- cat palette.json|jq -rc '.mocha.colors|map ({(.name):.hex})|.[]'
|
||||||
|
base = "#1e1e2e"
|
||||||
|
blue = "#89b4fa"
|
||||||
|
crust = "#11111b"
|
||||||
|
flamingo = "#f2cdcd"
|
||||||
|
green = "#a6e3a1"
|
||||||
|
lavender = "#b4befe"
|
||||||
|
mantle = "#181825"
|
||||||
|
maroon = "#eba0ac"
|
||||||
|
mauve = "#cba6f7"
|
||||||
|
overlay0 = "#6c7086"
|
||||||
|
overlay1 = "#7f849c"
|
||||||
|
overlay2 = "#9399b2"
|
||||||
|
peach = "#fab387"
|
||||||
|
pink = "#f5c2e7"
|
||||||
|
red = "#f38ba8"
|
||||||
|
rosewater = "#f5e0dc"
|
||||||
|
sapphire = "#74c7ec"
|
||||||
|
sky = "#89dceb"
|
||||||
|
subtext0 = "#a6adc8"
|
||||||
|
subtext1 = "#bac2de"
|
||||||
|
surface0 = "#313244"
|
||||||
|
surface1 = "#45475a"
|
||||||
|
surface2 = "#585b70"
|
||||||
|
teal = "#94e2d5"
|
||||||
|
text = "#cdd6f4"
|
||||||
|
yellow = "#f9e2af"
|
|
@ -4,12 +4,14 @@ module KeyBindings (
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Control.Monad (void)
|
import Control.Monad (void)
|
||||||
|
import Data.Foldable (forM_)
|
||||||
import Data.List (sort, isSuffixOf)
|
import Data.List (sort, isSuffixOf)
|
||||||
import Data.Maybe (isJust)
|
import Data.Maybe (isJust)
|
||||||
import Graphics.X11.Types
|
import Graphics.X11.Types
|
||||||
import System.Exit
|
import System.Exit
|
||||||
import Text.EditDistance
|
-- import Text.EditDistance
|
||||||
import XMonad
|
import XMonad
|
||||||
|
import XMonad.Actions.CopyWindow (kill1,copy)
|
||||||
import XMonad.Actions.CycleWS
|
import XMonad.Actions.CycleWS
|
||||||
import XMonad.Actions.DynamicProjects
|
import XMonad.Actions.DynamicProjects
|
||||||
import XMonad.Core
|
import XMonad.Core
|
||||||
|
@ -17,13 +19,21 @@ import XMonad.Layout.ToggleLayouts
|
||||||
import XMonad.Operations
|
import XMonad.Operations
|
||||||
import XMonad.Prompt
|
import XMonad.Prompt
|
||||||
import XMonad.Prompt.ConfirmPrompt
|
import XMonad.Prompt.ConfirmPrompt
|
||||||
|
import XMonad.Prompt.FuzzyMatch
|
||||||
import XMonad.Prompt.Shell
|
import XMonad.Prompt.Shell
|
||||||
|
import XMonad.Prompt.Workspace (workspacePrompt)
|
||||||
import XMonad.Util.EZConfig
|
import XMonad.Util.EZConfig
|
||||||
import XMonad.Util.NamedScratchpad
|
import XMonad.Util.NamedScratchpad
|
||||||
import qualified Solarized as S
|
import qualified Catppuccin as C
|
||||||
import qualified Scratchpad as R
|
import qualified Scratchpad as R
|
||||||
import qualified XMonad.StackSet as W
|
import qualified XMonad.StackSet as W
|
||||||
|
|
||||||
|
-- Custom (in libs)
|
||||||
|
import Password (passPrompt)
|
||||||
|
|
||||||
|
lockScreenCmd =
|
||||||
|
spawn "/etc/profiles/per-user/e/bin/mpc pause; /run/current-system/sw/bin/xset s activate"
|
||||||
|
|
||||||
modify :: XConfig l -> XConfig l
|
modify :: XConfig l -> XConfig l
|
||||||
modify conf = conf
|
modify conf = conf
|
||||||
{ modMask = mod4Mask -- Use the "Win" key for the mod key
|
{ modMask = mod4Mask -- Use the "Win" key for the mod key
|
||||||
|
@ -31,12 +41,20 @@ modify conf = conf
|
||||||
|
|
||||||
`additionalKeysP` -- Add some extra key bindings:
|
`additionalKeysP` -- Add some extra key bindings:
|
||||||
[ ("M-S-q", confirmPrompt promptConfig "exit" (io exitSuccess))
|
[ ("M-S-q", confirmPrompt promptConfig "exit" (io exitSuccess))
|
||||||
, ("<XF86MonBrightnessDown>", spawn "/run/current-system/sw/bin/xbacklight -10")
|
, ("<XF86MonBrightnessDown>", spawn "/run/current-system/sw/bin/light -U 10")
|
||||||
, ("<XF86MonBrightnessUp>", spawn "/run/current-system/sw/bin/xbacklight +10")
|
, ("<XF86MonBrightnessUp>", spawn "/run/current-system/sw/bin/light -A 10")
|
||||||
, ("<XF86AudioPlay>", spawn "/run/current-system/sw/bin/mpc toggle")
|
, ("<XF86AudioPlay>", spawn "/etc/profiles/per-user/e/bin/mpc toggle")
|
||||||
, ("<XF86AudioNext>", spawn "/run/current-system/sw/bin/mpc next")
|
, ("<XF86AudioNext>", spawn "/etc/profiles/per-user/e/bin/mpc next")
|
||||||
, ("<XF86AudioPrev>", spawn "/run/current-system/sw/bin/mpc prev")
|
, ("<XF86AudioPrev>", spawn "/etc/profiles/per-user/e/bin/mpc prev")
|
||||||
, ("M-<Delete>", kill)
|
-- KP_1 -> KP_6 macros
|
||||||
|
, ("<XF86Tools>", viewProject "sound")
|
||||||
|
, ("<XF86Launch5>", viewProject "frs")
|
||||||
|
, ("<XF86Launch6>", viewProject "chat")
|
||||||
|
, ("<XF86Launch7>", viewProject "isengard")
|
||||||
|
, ("<XF86Launch8>", viewProject "moria")
|
||||||
|
, ("<XF86Launch9>", viewProject "fre")
|
||||||
|
-- KP_Delete
|
||||||
|
, ("Cancel", lockScreenCmd)
|
||||||
, ("M-<Down>", windows W.focusDown)
|
, ("M-<Down>", windows W.focusDown)
|
||||||
, ("M-<Esc>", sendMessage (Toggle "Full"))
|
, ("M-<Esc>", sendMessage (Toggle "Full"))
|
||||||
, ("M-$", sendMessage (Toggle "Full"))
|
, ("M-$", sendMessage (Toggle "Full"))
|
||||||
|
@ -46,21 +64,45 @@ modify conf = conf
|
||||||
, ("M-<Right>", nextWS)
|
, ("M-<Right>", nextWS)
|
||||||
, ("M-<Tab>", toggleWS' ["NSP"])
|
, ("M-<Tab>", toggleWS' ["NSP"])
|
||||||
, ("M-<Up>", windows W.focusUp)
|
, ("M-<Up>", windows W.focusUp)
|
||||||
, ("M-S-<Delete>", spawn "/run/current-system/sw/bin/mpc pause; /run/current-system/sw/bin/xset s activate")
|
, ("M-S-<Delete>", lockScreenCmd)
|
||||||
, ("M-S-<Left>", shiftToPrev >> prevWS)
|
, ("M-S-<Left>", shiftToPrev >> prevWS)
|
||||||
, ("M-S-<Right>", shiftToNext >> nextWS)
|
, ("M-S-<Right>", shiftToNext >> nextWS)
|
||||||
, ("M-s s", spawn "/run/current-system/sw/bin/flameshot gui")
|
, ("M-s s", spawn "/etc/profiles/per-user/e/bin/flameshot gui")
|
||||||
, ("M-s t", spawn "/run/current-system/sw/bin/scrot /tmp/screen.png")
|
, ("M-s t", spawn "/run/current-system/sw/bin/scrot /tmp/screen.png")
|
||||||
-- Workspace and tasks
|
-- Workspace and tasks
|
||||||
, ("M-b", switchProjectPrompt promptConfig)
|
, ("M-b", switchProjectPrompt promptConfig)
|
||||||
|
, ("M-p c", withFocused centerWindow)
|
||||||
, ("M-p m", shiftToProjectPrompt promptConfig)
|
, ("M-p m", shiftToProjectPrompt promptConfig)
|
||||||
, ("M-p n", switchProjectPrompt promptConfig)
|
, ("M-p n", switchProjectPrompt promptConfig)
|
||||||
, ("M-p r", renameProjectPrompt promptConfig)
|
, ("M-p r", renameProjectPrompt promptConfig)
|
||||||
, ("M-p s", shellPrompt promptConfig)
|
, ("M-p s", shellPrompt promptConfig)
|
||||||
|
, ("M-d", passPrompt promptConfig)
|
||||||
-- Scratchpads
|
-- Scratchpads
|
||||||
, ("M-p p", namedScratchpadAction R.pads "htop")
|
, ("M-p p", namedScratchpadAction R.pads "htop")
|
||||||
|
-- Copy windows to workspaces
|
||||||
|
, ("M-<Delete>", kill1)
|
||||||
|
, ("M-c", workspacePrompt promptConfig (\name -> windows $ copy name))
|
||||||
|
-- Mouse stuff
|
||||||
|
, ("<F9>", spawn "find-cursor")
|
||||||
|
-- , ("M-$ $", spawn "xdotool click 3")
|
||||||
|
-- , ("M-$ M-$", spawn "xdotool click 3") -- helpfull to combine M + right click
|
||||||
|
-- resizing the master/slave ratio
|
||||||
|
, ("M-h", sendMessage Shrink) -- Shrink the master area
|
||||||
|
, ("M-l", sendMessage Expand) -- Expand the master area
|
||||||
|
-- dunstctl calls
|
||||||
|
-- , ("C-<Space>", spawn "dunstctl close")
|
||||||
|
, ("C-S-<Space>", spawn "dunstctl close-all")
|
||||||
|
, ("M-n p", spawn "dunstctl set-paused toggle")
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
-- Borrowed from https://www.reddit.com/r/xmonad/comments/gzq316/how_can_i_centre_a_floating_window_without/fthtx29/
|
||||||
|
centerWindow :: Window -> X ()
|
||||||
|
centerWindow win = do
|
||||||
|
(_, W.RationalRect x y w h) <- floatLocation win
|
||||||
|
windows $ W.float win (W.RationalRect ((1 - w) / 2) ((1 - h) / 2) w h)
|
||||||
|
return ()
|
||||||
|
|
||||||
viewProject :: WorkspaceId -> X ()
|
viewProject :: WorkspaceId -> X ()
|
||||||
viewProject id = do
|
viewProject id = do
|
||||||
project <- lookupProject id
|
project <- lookupProject id
|
||||||
|
@ -71,26 +113,29 @@ viewProject id = do
|
||||||
promptConfig = def
|
promptConfig = def
|
||||||
{ position = Bottom
|
{ position = Bottom
|
||||||
, alwaysHighlight = True
|
, alwaysHighlight = True
|
||||||
, bgColor = S.magenta
|
, bgColor = C.lavender
|
||||||
, bgHLight = S.base0
|
, bgHLight = C.surface0
|
||||||
, borderColor = S.magenta
|
, borderColor = C.lavender
|
||||||
, defaultText = ""
|
, defaultText = ""
|
||||||
, fgColor = S.base02
|
, fgColor = C.surface2
|
||||||
, fgHLight = S.base03
|
, fgHLight = C.text
|
||||||
, font = "xft:Iosevka Term:style=Regular:size=8"
|
, font = "xft:Iosevka Samae:style=Regular:size=10:charwidth=6.5"
|
||||||
, height = 24
|
, height = 24
|
||||||
, promptBorderWidth = 5
|
, promptBorderWidth = 5
|
||||||
|
-- Fuzzysearch by default
|
||||||
|
, searchPredicate = fuzzyMatch
|
||||||
|
, sorter = fuzzySort
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Slightly taken from
|
-- -- Slightly taken from
|
||||||
-- https://mail.haskell.org/pipermail/xmonad/2010-October/010671.html
|
-- -- https://mail.haskell.org/pipermail/xmonad/2010-October/010671.html
|
||||||
data FuzzySpawn = FuzzySpawn deriving (Read, Show)
|
-- data FuzzySpawn = FuzzySpawn deriving (Read, Show)
|
||||||
instance XPrompt FuzzySpawn where showXPrompt _ = "RunC: "
|
-- instance XPrompt FuzzySpawn where showXPrompt _ = "RunC: "
|
||||||
fuzzyPrompt config = do
|
-- fuzzyPrompt config = do
|
||||||
cmds <- io getCommands
|
-- cmds <- io getCommands
|
||||||
let compl s
|
-- let compl s
|
||||||
| null s = []
|
-- | null s = []
|
||||||
| otherwise = let weight c = levenshteinDistance defaultEditCosts s c
|
-- | otherwise = let weight c = levenshteinDistance defaultEditCosts s c
|
||||||
in map snd $ take 20 $ sort $ map (\c -> (weight c,c)) cmds
|
-- in map snd $ take 20 $ sort $ map (\c -> (weight c,c)) cmds
|
||||||
mkXPrompt FuzzySpawn config (return . compl) spawn
|
-- mkXPrompt FuzzySpawn config (return . compl) spawn
|
||||||
|
--
|
||||||
|
|
55
lib/Password.hs
Normal file
55
lib/Password.hs
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
-- Initially from
|
||||||
|
-- https://github.com/MasseR/xmonad-masser/blob/master/src/XMonad/Password.hs
|
||||||
|
|
||||||
|
module Password (passGeneratePrompt, passPrompt) where
|
||||||
|
|
||||||
|
import Control.Monad.Trans (liftIO)
|
||||||
|
import Data.Function (on)
|
||||||
|
import Data.List (foldl', scanl', sort, sortBy)
|
||||||
|
import System.Directory (getHomeDirectory)
|
||||||
|
import System.FilePath.Posix (dropExtension, takeExtension, (</>))
|
||||||
|
import System.Posix.Env (getEnv)
|
||||||
|
import XMonad.Core
|
||||||
|
import XMonad.Prompt
|
||||||
|
import XMonad.Util.Run (runProcessWithInput)
|
||||||
|
|
||||||
|
newtype Pass = Pass { passLabel :: String }
|
||||||
|
|
||||||
|
-- Rosetta code levenshtein
|
||||||
|
levenshtein :: String -> String -> Int
|
||||||
|
levenshtein s1 s2 = last $ foldl' transform [0..length s1] s2
|
||||||
|
where
|
||||||
|
transform [] _ = []
|
||||||
|
transform ns@(n:ns1) c = scanl' calc (n+1) $ zip3 s1 ns ns1
|
||||||
|
where
|
||||||
|
calc z (c1, x, y) = minimum [y+1, z+1, x + (fromEnum (c1 /= c) * 2)]
|
||||||
|
|
||||||
|
instance XPrompt Pass where
|
||||||
|
showXPrompt p = passLabel p <> ": "
|
||||||
|
commandToComplete _ = id
|
||||||
|
nextCompletion _ = getNextCompletion
|
||||||
|
|
||||||
|
passGeneratePrompt :: XPConfig -> X ()
|
||||||
|
passGeneratePrompt _ = return () -- Not implemented
|
||||||
|
|
||||||
|
passPrompt :: XPConfig -> X ()
|
||||||
|
passPrompt = mkPassPrompt "Select password" copyPassword
|
||||||
|
|
||||||
|
mkPassPrompt :: String -> (String -> X ()) -> XPConfig -> X ()
|
||||||
|
mkPassPrompt label f conf = do
|
||||||
|
-- I'm just sorting here, but could use some kind of fuzzy matching instead, but it requires a bit more effort
|
||||||
|
passwords <- sort <$> liftIO getPasswords
|
||||||
|
-- Other change, use infixof instead of prefixof
|
||||||
|
mkXPrompt (Pass label) conf (\input -> pure (sortBy (compare `on` levenshtein input) . take 5 . filter (consumes input) $ passwords)) f
|
||||||
|
where
|
||||||
|
consumes [] _ = True -- everything consumed
|
||||||
|
consumes (_:_) [] = False -- all not consumed
|
||||||
|
consumes (a:xs) (a':ys) | a == a' = consumes xs ys
|
||||||
|
| otherwise = consumes (a:xs) ys
|
||||||
|
getPasswords = do
|
||||||
|
passwordStoreDir <- (</> "pass") <$> getHomeDirectory
|
||||||
|
files <- runProcessWithInput "find" [ passwordStoreDir, "-type", "f", "-name", "*.gpg", "-printf", "%p\n"] []
|
||||||
|
return . lines $ files
|
||||||
|
|
||||||
|
copyPassword :: String -> X ()
|
||||||
|
copyPassword pass = spawn $ "gpg --decrypt " ++ pass ++ " | copy"
|
177
lib/Projects.hs
177
lib/Projects.hs
|
@ -6,74 +6,135 @@ import XMonad
|
||||||
import XMonad.Actions.DynamicProjects
|
import XMonad.Actions.DynamicProjects
|
||||||
import XMonad.Util.Run
|
import XMonad.Util.Run
|
||||||
|
|
||||||
|
spinTextEditorAndTerm :: String -> String -> Project
|
||||||
|
spinTextEditorAndTerm dir name =
|
||||||
|
Project { projectName = name
|
||||||
|
, projectDirectory = dir <> name
|
||||||
|
, projectStartHook = Just
|
||||||
|
$ safeSpawn "rio" ["-e","tmux","new","-A","-s",name]
|
||||||
|
}
|
||||||
|
|
||||||
|
spinChat :: String -> Project
|
||||||
|
spinChat name =
|
||||||
|
Project { projectName = name
|
||||||
|
, projectDirectory = "/tmp"
|
||||||
|
, projectStartHook = Just $ do safeSpawnProg (name <> "-desktop")
|
||||||
|
}
|
||||||
|
|
||||||
|
spinInTermWithName :: String -> String -> Project
|
||||||
|
spinInTermWithName projectName cmd =
|
||||||
|
Project { projectName = projectName
|
||||||
|
, projectDirectory = "/tmp"
|
||||||
|
, projectStartHook = Just $ do safeSpawn "rio" ["-e",cmd]
|
||||||
|
}
|
||||||
|
|
||||||
|
spinInTerm :: String -> Project
|
||||||
|
spinInTerm name = spinInTermWithName name name
|
||||||
|
|
||||||
|
justStart :: String -> Project
|
||||||
|
justStart name = justStartWithName name name
|
||||||
|
|
||||||
|
justStartWithName :: String -> String -> Project
|
||||||
|
justStartWithName name pgm =
|
||||||
|
Project { projectName = name
|
||||||
|
, projectDirectory = "/tmp"
|
||||||
|
, projectStartHook = Just $ do safeSpawnProg pgm
|
||||||
|
}
|
||||||
|
|
||||||
|
spinNotes :: Project
|
||||||
|
spinNotes =
|
||||||
|
Project { projectName = "notes"
|
||||||
|
, projectDirectory = "~/zk/org-roam/"
|
||||||
|
, projectStartHook = Just $ do safeSpawn "emacs" ["~/zk/org-roam/20240202124747-index.org"]
|
||||||
|
}
|
||||||
|
|
||||||
|
adminProject = spinTextEditorAndTerm "~/admin/"
|
||||||
|
candyProject = spinTextEditorAndTerm "~/candy/"
|
||||||
|
workProject = spinTextEditorAndTerm "~/relex/"
|
||||||
|
workAnsibleProject = spinTextEditorAndTerm "~/relex/ansible-roles/"
|
||||||
|
|
||||||
projects :: [Project]
|
projects :: [Project]
|
||||||
projects = [ Project { projectName = "admin"
|
projects = [ adminProject "wrk-config"
|
||||||
, projectDirectory = "~/admin"
|
, adminProject "cdc-config"
|
||||||
, projectStartHook = Just $ do safeSpawn "vim" ["-g"]
|
, adminProject "overlays-personal"
|
||||||
safeSpawnProg "st"
|
, candyProject "adventofcode"
|
||||||
}
|
, candyProject "dhall-packages"
|
||||||
, Project { projectName = "mordor"
|
, candyProject "hfdb"
|
||||||
, projectDirectory = "~/mordor"
|
, justStartWithName "fre" "ff-perso"
|
||||||
, projectStartHook = Just $ do safeSpawn "vim" ["-g"]
|
, justStartWithName "frs" "ff-relex"
|
||||||
safeSpawnProg "st"
|
, justStartWithName "chat" "slack"
|
||||||
}
|
, justStartWithName "meet" "chromium"
|
||||||
, Project { projectName = "mordor-docs"
|
, spinNotes
|
||||||
, projectDirectory = "~/mordor-2"
|
, spinInTermWithName "VPN" "vpn-run"
|
||||||
, projectStartHook = Just $ do safeSpawn "vim" ["-g"]
|
, spinChat "element"
|
||||||
safeSpawnProg "st"
|
, spinChat "signal"
|
||||||
}
|
, spinInTerm "k9s"
|
||||||
, Project { projectName = "mordor-other"
|
, spinInTermWithName "email" "neomutt"
|
||||||
, projectDirectory = "~/mordor-3"
|
, spinTextEditorAndTerm "~/." "xmonad" -- Dark magic!
|
||||||
, projectStartHook = Just $ do safeSpawn "vim" ["-g"]
|
, workProject "azure-kube-platform"
|
||||||
safeSpawnProg "st"
|
, workProject "azure-kube-platform-environments"
|
||||||
}
|
, workProject "azure-management"
|
||||||
, Project { projectName = "email"
|
, workProject "calculation-node-playbook"
|
||||||
, projectDirectory = "~/mail"
|
, workProject "communication-nix-101"
|
||||||
, projectStartHook = Just $ do safeSpawnProg "st"
|
, workProject "communication-nix-102"
|
||||||
}
|
, workProject "communication-nix-103"
|
||||||
, Project { projectName = "frs"
|
, workProject "cooper"
|
||||||
|
, workProject "crebain"
|
||||||
|
, workProject "customer-configs"
|
||||||
|
, workProject "customer-modules"
|
||||||
|
, workProject "docker-images"
|
||||||
|
, workProject "fangorn"
|
||||||
|
, workProject "gitlab-runners"
|
||||||
|
, workProject "gitlab-self-manage"
|
||||||
|
, workProject "infra-inventory"
|
||||||
|
, workProject "isengard"
|
||||||
|
, workProject "isengard-2"
|
||||||
|
, workProject "isengard-3"
|
||||||
|
, workProject "jirawiz"
|
||||||
|
, workAnsibleProject "java"
|
||||||
|
, workProject "morannon"
|
||||||
|
, workProject "mordor-ca"
|
||||||
|
, workProject "mordor-deploy"
|
||||||
|
, workProject "mordor-interview"
|
||||||
|
, workProject "mordor-nixpkgs"
|
||||||
|
, workProject "mordor-ops"
|
||||||
|
, workProject "mordor-the-repo"
|
||||||
|
, workProject "mordorbooks"
|
||||||
|
, workProject "moria"
|
||||||
|
, workProject "muir"
|
||||||
|
, workProject "nix"
|
||||||
|
, workProject "nix-ansible-role"
|
||||||
|
, workProject "nixos-modules"
|
||||||
|
, workProject "nixpkgs"
|
||||||
|
, workProject "one-off-scripts"
|
||||||
|
, workProject "pck-access"
|
||||||
|
, workProject "planning-cloud"
|
||||||
|
, workProject "rfcs"
|
||||||
|
, workProject "runner-tests"
|
||||||
|
, workProject "slog-agent"
|
||||||
|
, workProject "sm-terraform"
|
||||||
|
, workProject "tech-radar"
|
||||||
|
, workProject "time-tracking"
|
||||||
|
, workProject "ugluk-ansible-role"
|
||||||
|
, workProject "unified-application-gateway"
|
||||||
|
, Project { projectName = "minecraft"
|
||||||
, projectDirectory = "/tmp"
|
, projectDirectory = "/tmp"
|
||||||
, projectStartHook = Just $ do safeSpawnProg "frs"
|
, projectStartHook = Just $ do safeSpawnProg "minecraft-launcher"
|
||||||
|
safeSpawnProg "mumble"
|
||||||
}
|
}
|
||||||
, Project { projectName = "fre"
|
, Project { projectName = "status"
|
||||||
, projectDirectory = "/tmp"
|
, projectDirectory = "/tmp"
|
||||||
, projectStartHook = Just $ do safeSpawnProg "fre"
|
, projectStartHook = Just $ do
|
||||||
}
|
safeSpawn "rio" ["-e","btop"]
|
||||||
, Project { projectName = "network-graph"
|
|
||||||
, projectDirectory = "~/relex/catch-a-network-bug/csvplotter"
|
|
||||||
, projectStartHook = Just $ do safeSpawn "zathura" ["weekXGraph.pdf"]
|
|
||||||
safeSpawnProg "st"
|
|
||||||
}
|
|
||||||
, Project { projectName = "orc"
|
|
||||||
, projectDirectory = "/tmp"
|
|
||||||
, projectStartHook = Just $ do safeSpawnProg "st"
|
|
||||||
}
|
|
||||||
, Project { projectName = "mordor-ops"
|
|
||||||
, projectDirectory = "~/relex/mordor-ops"
|
|
||||||
, projectStartHook = Just $ do safeSpawn "vim" ["-g"]
|
|
||||||
safeSpawnProg "st"
|
|
||||||
}
|
|
||||||
, Project { projectName = "mordor-deploy"
|
|
||||||
, projectDirectory = "~/relex/mordor-deploy"
|
|
||||||
, projectStartHook = Just $ do safeSpawn "vim" ["-g"]
|
|
||||||
safeSpawnProg "st"
|
|
||||||
}
|
|
||||||
, Project { projectName = "scaleout-ops"
|
|
||||||
, projectDirectory = "~/relex/scaleout-ops"
|
|
||||||
, projectStartHook = Just $ do safeSpawn "vim" ["-g"]
|
|
||||||
safeSpawnProg "st"
|
|
||||||
}
|
}
|
||||||
, Project { projectName = "sound"
|
, Project { projectName = "sound"
|
||||||
, projectDirectory = "/tmp"
|
, projectDirectory = "/tmp"
|
||||||
, projectStartHook = Just $ do safeSpawnProg "pavucontrol"
|
, projectStartHook = Just $ do
|
||||||
}
|
safeSpawn "pw-jack" ["patchage"]
|
||||||
, Project { projectName = "daily"
|
safeSpawnProg "easyeffects"
|
||||||
, projectDirectory = "/tmp"
|
|
||||||
, projectStartHook = Just $ do safeSpawn "nix" ["run", "nixpkgs.chromium", "-c", "chromium"]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
modify :: XConfig l -> XConfig l
|
modify :: XConfig l -> XConfig l
|
||||||
modify conf = dynamicProjects projects conf
|
modify conf = dynamicProjects projects conf
|
||||||
{ workspaces = [] }
|
{ workspaces = [] }
|
||||||
|
|
||||||
|
|
|
@ -12,11 +12,11 @@ import qualified XMonad.StackSet as W
|
||||||
|
|
||||||
modify :: XConfig l -> XConfig l
|
modify :: XConfig l -> XConfig l
|
||||||
modify conf = conf
|
modify conf = conf
|
||||||
{ manageHook = namedScratchpadManageHook pads
|
{ manageHook = manageHook conf <> namedScratchpadManageHook pads
|
||||||
}
|
}
|
||||||
|
|
||||||
pads =
|
pads =
|
||||||
[ NS "htop" "/run/current-system/sw/bin/st -t htop -e tmux" (title =? "htop")
|
[ NS "htop" "rio -e tmux" (title =? "htop")
|
||||||
(customFloating $ W.RationalRect (1/3) (1/3) (1/3) (1/3))
|
(customFloating $ W.RationalRect (1/3) (1/3) (1/3) (1/3))
|
||||||
-- , NS "stardict" "stardict" (className =? "Stardict")
|
-- , NS "stardict" "stardict" (className =? "Stardict")
|
||||||
-- (customFloating $ W.RationalRect (1/6) (1/6) (2/3) (2/3))
|
-- (customFloating $ W.RationalRect (1/6) (1/6) (2/3) (2/3))
|
||||||
|
|
22
lib/ScreenEvents.hs
Normal file
22
lib/ScreenEvents.hs
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
module ScreenEvents (
|
||||||
|
ScreenEvents.modify
|
||||||
|
) where
|
||||||
|
|
||||||
|
import XMonad
|
||||||
|
import Data.Monoid (All(..))
|
||||||
|
import XMonad.Hooks.Rescreen
|
||||||
|
|
||||||
|
-- screenChangeHandler :: Event -> X All
|
||||||
|
-- screenChangeHandler (RRScreenChangeNotifyEvent _ _ _ _ _ _ _ _ _ _ _ _ _ _ _) = do
|
||||||
|
-- spawn "touch /tmp/xmonad-WAAAAAT"
|
||||||
|
-- spawn "/home/e/.fehbg"
|
||||||
|
-- return (All True)
|
||||||
|
-- screenChangeHandler _ = return (All True)
|
||||||
|
|
||||||
|
modify :: XConfig l -> XConfig l
|
||||||
|
modify = addAfterRescreenHook afterRescreen
|
||||||
|
|
||||||
|
afterRescreen :: X ()
|
||||||
|
afterRescreen = do
|
||||||
|
spawn "xrandr --dpi 96"
|
||||||
|
spawn "/home/e/.fehbg"
|
|
@ -20,8 +20,33 @@ module Solarized
|
||||||
, foreground
|
, foreground
|
||||||
, foregroundhl
|
, foregroundhl
|
||||||
, foregroundll
|
, foregroundll
|
||||||
|
, theme
|
||||||
) where
|
) where
|
||||||
|
|
||||||
|
import XMonad.Layout.Decoration (Theme(..))
|
||||||
|
|
||||||
|
theme :: Theme
|
||||||
|
theme =
|
||||||
|
Theme { activeColor = violet
|
||||||
|
, inactiveColor = base03
|
||||||
|
, urgentColor = red
|
||||||
|
, activeBorderColor = violet
|
||||||
|
, inactiveBorderColor = base03
|
||||||
|
, urgentBorderColor = red
|
||||||
|
, activeBorderWidth = 1
|
||||||
|
, inactiveBorderWidth = 1
|
||||||
|
, urgentBorderWidth = 1
|
||||||
|
, activeTextColor = base03
|
||||||
|
, inactiveTextColor = base02
|
||||||
|
, urgentTextColor = red
|
||||||
|
, fontName = "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
|
||||||
|
, decoWidth = 200
|
||||||
|
, decoHeight = 15
|
||||||
|
, windowTitleAddons = []
|
||||||
|
, windowTitleIcons = []
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
base03 = "#002b36"
|
base03 = "#002b36"
|
||||||
base02 = "#073642"
|
base02 = "#073642"
|
||||||
base01 = "#586e75"
|
base01 = "#586e75"
|
||||||
|
|
|
@ -1,69 +0,0 @@
|
||||||
{-# LANGUAGE FlexibleContexts #-}
|
|
||||||
|
|
||||||
module StatusBar (
|
|
||||||
StatusBar.modify
|
|
||||||
) where
|
|
||||||
|
|
||||||
import Data.List
|
|
||||||
import Data.Monoid
|
|
||||||
import Solarized as S
|
|
||||||
import XMonad.Core
|
|
||||||
import XMonad.Hooks.DynamicBars (dynStatusBarStartup,dynStatusBarEventHook,multiPP)
|
|
||||||
import XMonad.Hooks.DynamicLog
|
|
||||||
import XMonad.ManageHook
|
|
||||||
import XMonad.Util.Run
|
|
||||||
|
|
||||||
-- Type constructors
|
|
||||||
import GHC.IO.Handle (Handle)
|
|
||||||
|
|
||||||
modify :: XConfig l -> XConfig l
|
|
||||||
modify conf = conf
|
|
||||||
{ startupHook = do
|
|
||||||
startupHook conf
|
|
||||||
dynStatusBarStartup runXmobar killXmobar
|
|
||||||
, handleEventHook = handleEventHook conf <+> dynStatusBarEventHook runXmobar killXmobar
|
|
||||||
, logHook = do
|
|
||||||
logHook conf
|
|
||||||
multiPP currentPP otherPP
|
|
||||||
}
|
|
||||||
|
|
||||||
runXmobar :: ScreenId -> IO Handle
|
|
||||||
runXmobar (S id) = spawnPipe
|
|
||||||
$ "/run/current-system/sw/bin/xmobar --screen="
|
|
||||||
<> show id
|
|
||||||
<> " /home/eeva/.xmonad/xmobarrc"
|
|
||||||
|
|
||||||
killXmobar :: IO ()
|
|
||||||
-- killXmobar = spawn "/run/current-system/sw/bin/pkill xmobar"
|
|
||||||
killXmobar = return ()
|
|
||||||
|
|
||||||
otherPP = currentPP
|
|
||||||
{ ppCurrent = xmobarColor S.foreground S.background
|
|
||||||
, ppVisible = xmobarColor S.foreground S.background
|
|
||||||
, ppHidden = xmobarColor S.foreground S.background
|
|
||||||
, ppHiddenNoWindows = xmobarColor S.backgroundhl S.background
|
|
||||||
}
|
|
||||||
|
|
||||||
currentPP = def
|
|
||||||
{ ppCurrent = xmobarColor' S.orange
|
|
||||||
, ppVisible = xmobarColor' S.yellow -- other screen
|
|
||||||
, ppHidden = xmobarColor' S.foreground -- other workspaces with windows
|
|
||||||
, ppHiddenNoWindows = xmobarColor' S.foregroundll -- other workspaces
|
|
||||||
, ppSep = " "
|
|
||||||
, ppWsSep = " "
|
|
||||||
, ppLayout = printLayout
|
|
||||||
, ppTitle = printTitle
|
|
||||||
}
|
|
||||||
where xmobarColor' fg = xmobarColor fg S.base03
|
|
||||||
|
|
||||||
printLayout s | "Mirror ResizableTall" `isSuffixOf` s = "[ — ]"
|
|
||||||
printLayout s | "ResizableTall" `isSuffixOf` s = "[ | ]"
|
|
||||||
printLayout "Full" = "[ F ]"
|
|
||||||
printLayout l = "[" ++ l ++ "]"
|
|
||||||
|
|
||||||
printTitle t = let t' = shorten 120 t
|
|
||||||
in xmobarColor' S.foregroundll "« "
|
|
||||||
++ xmobarColor' S.foregroundhl t'
|
|
||||||
++ xmobarColor' S.foregroundll " »"
|
|
||||||
|
|
||||||
|
|
15
shell.nix
Normal file
15
shell.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{ pkgs }:
|
||||||
|
let
|
||||||
|
inherit (pkgs) callPackage fetchFromGitHub mkShell;
|
||||||
|
easy-hls-src = fetchFromGitHub {
|
||||||
|
owner = "jkachmar";
|
||||||
|
repo = "easy-hls-nix";
|
||||||
|
rev = "291cf77f512a7121bb6801cde35ee1e8b7287f91";
|
||||||
|
sha256 = "1bvbcp9zwmh53sm16ycp8phhc6vzc72a71sf0bvyjgfbn6zp68bc";
|
||||||
|
};
|
||||||
|
easy-hls = callPackage easy-hls-src {};
|
||||||
|
in
|
||||||
|
|
||||||
|
mkShell {
|
||||||
|
buildInputs = [ easy-hls ];
|
||||||
|
}
|
38
xmonad.hs
38
xmonad.hs
|
@ -9,58 +9,76 @@ import XMonad.Actions.DynamicProjects
|
||||||
import XMonad.Config.Desktop
|
import XMonad.Config.Desktop
|
||||||
import XMonad.Hooks.DynamicLog
|
import XMonad.Hooks.DynamicLog
|
||||||
import XMonad.Hooks.ManageHelpers
|
import XMonad.Hooks.ManageHelpers
|
||||||
|
|
||||||
import XMonad.Layout.NoBorders (noBorders, smartBorders)
|
import XMonad.Layout.NoBorders (noBorders, smartBorders)
|
||||||
|
import XMonad.Layout.NoFrillsDecoration
|
||||||
|
import XMonad.Layout.PerScreen
|
||||||
|
import XMonad.Layout.Reflect
|
||||||
import XMonad.Layout.ResizableTile (ResizableTall(..))
|
import XMonad.Layout.ResizableTile (ResizableTall(..))
|
||||||
import XMonad.Layout.Spacing
|
import XMonad.Layout.Spacing
|
||||||
|
import XMonad.Layout.ThreeColumns (ThreeCol(..))
|
||||||
import XMonad.Layout.ToggleLayouts (toggleLayouts)
|
import XMonad.Layout.ToggleLayouts (toggleLayouts)
|
||||||
|
|
||||||
|
import XMonad.StackSet (sink)
|
||||||
|
|
||||||
import XMonad.Util.EZConfig
|
import XMonad.Util.EZConfig
|
||||||
|
import XMonad.Util.SpawnOnce
|
||||||
import qualified Solarized as S
|
import qualified Solarized as S
|
||||||
|
import qualified Catppuccin as C
|
||||||
|
|
||||||
-- Tidy modules
|
-- Tidy modules
|
||||||
import KeyBindings as Keys (modify)
|
import KeyBindings as Keys (modify)
|
||||||
import MouseBindings as Mouse (modify)
|
import MouseBindings as Mouse (modify)
|
||||||
import Projects (modify)
|
import Projects (modify)
|
||||||
import Scratchpad (modify)
|
import Scratchpad (modify)
|
||||||
|
import ScreenEvents (modify)
|
||||||
|
|
||||||
--------- toggle btw vvvvvvvvvv or vvvvv
|
-------------------- toggle btw vvvvvvvvvv or vvvvv
|
||||||
|
--layouts = titleBar $ toggleLayouts fullscreen tiled
|
||||||
layouts = toggleLayouts fullscreen tiled
|
layouts = toggleLayouts fullscreen tiled
|
||||||
where
|
where
|
||||||
fullscreen = (noBorders Full)
|
fullscreen = (noBorders Full)
|
||||||
tiled = smarts $ resizableTall ||| (Mirror resizableTall)
|
tiled = smarts $ ifWider (1920 + 1) wideScreen normalScreen
|
||||||
|
wideScreen = ThreeColMid 1 (5/100) (1/2)
|
||||||
|
normalScreen = ResizableTall 1 (5/100) (1/2) []
|
||||||
smarts = (smartSpacingWithEdge 5) . smartBorders
|
smarts = (smartSpacingWithEdge 5) . smartBorders
|
||||||
resizableTall = ResizableTall 1 (5/100) (1/2) []
|
--titleBar = noFrillsDeco shrinkText S.theme
|
||||||
|
|
||||||
-- Use the `xprop' tool to get the info you need for these matches.
|
-- Use the `xprop' tool to get the info you need for these matches.
|
||||||
-- For className, use the second value that xprop gives you.
|
-- For className, use the second value that xprop gives you.
|
||||||
-------------- Here be the law of windows
|
-------------- Here be the law of windows
|
||||||
myManageHook = composeOne
|
myManageHook = composeOne
|
||||||
[ className =? "Pavucontrol" -?> doShift "music"
|
[ className =? "Gcr-prompter" -?> doCenterFloat
|
||||||
|
, className =? "Pavucontrol" -?> doShift "music"
|
||||||
, className =? "Pinentry" -?> doFloat
|
, className =? "Pinentry" -?> doFloat
|
||||||
, className =? "Steam" -?> doShift "steam"
|
|
||||||
, className =? "VirtualBox" -?> doFloat
|
, className =? "VirtualBox" -?> doFloat
|
||||||
, className =? "csgo_linux64" -?> doShift "csgo"
|
, className =? "gpclient" -?> doTile <+> (doShift "VPN")
|
||||||
, className =? "mpv" -?> doFullFloat <+> (doShift "flims")
|
, className =? "mpv" -?> doFullFloat <+> (doShift "flims")
|
||||||
, className =? "qemu-system-x86_64" -?> doFloat
|
, className =? "qemu-system-x86_64" -?> doFloat
|
||||||
, className =? "qutebrowser" -?> doShift "web"
|
, className =? "qutebrowser" -?> doShift "web"
|
||||||
, isDialog -?> doCenterFloat
|
|
||||||
, isDialog -?> doCenterFloat
|
, isDialog -?> doCenterFloat
|
||||||
|
|
||||||
-- Move transient windows to their parent:
|
-- Move transient windows to their parent:
|
||||||
, transience
|
, transience
|
||||||
]
|
]
|
||||||
|
|
||||||
|
doTile :: ManageHook
|
||||||
|
doTile = ask >>= doF . sink
|
||||||
|
|
||||||
------------ build the full config
|
------------ build the full config
|
||||||
withConfig =
|
withConfig =
|
||||||
Projects.modify -- Apply projects config
|
Projects.modify -- Apply projects config
|
||||||
$ Keys.modify -- Apply keybindings config
|
$ Keys.modify -- Apply keybindings config
|
||||||
$ Mouse.modify -- Apply mouse bindings config
|
$ Mouse.modify -- Apply mouse bindings config
|
||||||
$ Scratchpad.modify -- Apply scratchpad managehook config
|
$ Scratchpad.modify -- Apply scratchpad managehook config
|
||||||
|
$ ScreenEvents.modify -- Apply screen event hook config
|
||||||
$ desktopConfig -- on a default desktop config
|
$ desktopConfig -- on a default desktop config
|
||||||
{ manageHook = myManageHook <+> manageHook desktopConfig
|
{ manageHook = myManageHook <+> manageHook desktopConfig
|
||||||
, layoutHook = desktopLayoutModifiers layouts
|
, layoutHook = desktopLayoutModifiers layouts
|
||||||
, terminal = "/run/current-system/sw/bin/st"
|
, startupHook = spawnOnce "sh /home/e/.fehbg"
|
||||||
, normalBorderColor = S.base03
|
, terminal = "rio"
|
||||||
, focusedBorderColor = S.violet
|
, normalBorderColor = C.surface0
|
||||||
|
, focusedBorderColor = C.mauve
|
||||||
, borderWidth = 5
|
, borderWidth = 5
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue