Compare commits
No commits in common. "31ba7cac2229e6355a1fee74f6f98a8f15e1001f" and "3d277d9cce9d5069d28b275f0fa12986c116e778" have entirely different histories.
31ba7cac22
...
3d277d9cce
6 changed files with 82 additions and 65 deletions
|
@ -36,7 +36,7 @@
|
||||||
devShells."x86_64-linux".default = pkgs.mkShell {
|
devShells."x86_64-linux".default = pkgs.mkShell {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
(pkgs.haskellPackages.ghcWithPackages
|
(pkgs.haskellPackages.ghcWithPackages
|
||||||
(pkgs: with pkgs; [xmonad xmonad-contrib xmobar]))
|
(pkgs: with pkgs; [xmonad xmonad-contrib]))
|
||||||
pkgs.haskell-language-server
|
pkgs.haskell-language-server
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
import Xmobar
|
|
||||||
|
|
||||||
config :: Config
|
|
||||||
config =
|
|
||||||
defaultConfig
|
|
||||||
{ font = "FiraCode Nerd Font",
|
|
||||||
allDesktops = True,
|
|
||||||
alpha = 255,
|
|
||||||
bgColor = "#282828",
|
|
||||||
fgColor = "#ebdbb2",
|
|
||||||
commands =
|
|
||||||
-- [ Run XMonadLog,
|
|
||||||
-- Run $ Memory ["t", "Mem: <usedratio>%"] 10,
|
|
||||||
-- Run $ Kbd [],
|
|
||||||
-- Run $ Date "%a %_d %b %Y <fc=#ee9a00>%H:%M:%S</fc>" "date" 10
|
|
||||||
-- ],
|
|
||||||
[ Run $ Memory ["t", "Mem: <usedratio>%"] 10,
|
|
||||||
Run $ Kbd [],
|
|
||||||
Run $ Date "%a %_d %b %Y <fc=#ee9a00>%H:%M:%S</fc>" "date" 10
|
|
||||||
],
|
|
||||||
template = "%kbd% | %date% | %memory%",
|
|
||||||
alignSep = "}{",
|
|
||||||
position = TopH 24
|
|
||||||
}
|
|
||||||
|
|
||||||
main :: IO ()
|
|
||||||
main = xmobar config -- or: configFromArgs config >>= xmobar
|
|
|
@ -24,7 +24,6 @@ import XMonad.Prompt
|
||||||
import XMonad.Prompt.Layout
|
import XMonad.Prompt.Layout
|
||||||
import XMonad.StackSet qualified as W
|
import XMonad.StackSet qualified as W
|
||||||
import XMonad.Actions.NoBorders
|
import XMonad.Actions.NoBorders
|
||||||
import XMonad.Util.EZConfig
|
|
||||||
|
|
||||||
myKeys conf@(XConfig {XMonad.modMask = modm}) =
|
myKeys conf@(XConfig {XMonad.modMask = modm}) =
|
||||||
M.fromList $
|
M.fromList $
|
||||||
|
@ -95,6 +94,17 @@ myMouseBindings (XConfig {XMonad.modMask = modm}) =
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Layouts:
|
||||||
|
|
||||||
|
-- You can specify and transform your layouts by modifying these values.
|
||||||
|
-- If you change layout bindings be sure to use 'mod-shift-space' after
|
||||||
|
-- restarting (with 'mod-q') to reset your layout state to the new
|
||||||
|
-- defaults, as xmonad preserves your old layout settings by default.
|
||||||
|
--
|
||||||
|
-- The available layouts. Note that each layout is separated by |||,
|
||||||
|
-- which denotes layout choice.
|
||||||
|
|
||||||
tabCfg =
|
tabCfg =
|
||||||
def
|
def
|
||||||
{ activeColor = "#282828",
|
{ activeColor = "#282828",
|
||||||
|
@ -108,12 +118,10 @@ tabCfg =
|
||||||
urgentTextColor = "#ebdbb2"
|
urgentTextColor = "#ebdbb2"
|
||||||
}
|
}
|
||||||
|
|
||||||
myLayout = setupSpacing $ avoidStruts $ autoChoose ||| tabbed shrinkText tabCfg
|
myLayout = avoidStruts $ autoChoose ||| threeCol ||| tiled ||| tabbed shrinkText tabCfg ||| Mirror tiled
|
||||||
where
|
where
|
||||||
-- default tiling algorithm partitions the screen into two panes
|
-- default tiling algorithm partitions the screen into two panes
|
||||||
autoChoose = IfMax 2 tiled $ IfMax 3 tiled_mag $ IfMax 4 grid_mag threeCol
|
autoChoose = IfMax 2 tiled $ IfMax 3 tiled_mag $ IfMax 4 Grid threeCol
|
||||||
setupSpacing = spacingRaw True (Border 0 0 0 0) True (Border 7 7 7 7) True
|
|
||||||
grid_mag = magnifiercz 1.4 Grid
|
|
||||||
tiled = Tall nmaster delta ratio
|
tiled = Tall nmaster delta ratio
|
||||||
tiled_mag = magnifiercz' 1.4 tiled
|
tiled_mag = magnifiercz' 1.4 tiled
|
||||||
threeCol = magnifiercz' 1.6 $ ThreeColMid nmaster delta ratio
|
threeCol = magnifiercz' 1.6 $ ThreeColMid nmaster delta ratio
|
||||||
|
@ -136,23 +144,61 @@ myManageHook =
|
||||||
resource =? "kdesktop" --> doIgnore
|
resource =? "kdesktop" --> doIgnore
|
||||||
]
|
]
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Event handling
|
||||||
|
|
||||||
|
-- * EwmhDesktops users should change this to ewmhDesktopsEventHook
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Defines a custom handler function for X Events. The function should
|
||||||
|
-- return (All True) if the default handler is to be run afterwards. To
|
||||||
|
-- combine event hooks use mappend or mconcat from Data.Monoid.
|
||||||
|
--
|
||||||
|
myEventHook = mempty
|
||||||
|
|
||||||
|
focusChangeHook (FocusChangeEvent {ev_event_type = t, ev_window = window}) = do
|
||||||
|
when (t == focusIn) $ spawn "notify-send 'focusIn'"
|
||||||
|
when (t == focusOut) $ spawn "notify-send 'focusOut'"
|
||||||
|
return $ All True
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Status bars and logging
|
||||||
|
|
||||||
|
-- Perform an arbitrary action on each internal state change or X event.
|
||||||
|
-- See the 'XMonad.Hooks.DynamicLog' extension for examples.
|
||||||
|
--
|
||||||
|
myLogHook = return ()
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
-- Startup hook
|
||||||
|
|
||||||
|
-- Perform an arbitrary action each time xmonad starts or is restarted
|
||||||
|
-- with mod-q. Used by, e.g., XMonad.Layout.PerWorkspace to initialize
|
||||||
|
-- per-workspace layout choices.
|
||||||
|
--
|
||||||
|
-- By default, do nothing.
|
||||||
myStartupHook = do
|
myStartupHook = do
|
||||||
spawn "pgrep oneko || oneko -tofocus -tora -position +-1+5 -fg palevioletred3 -bg pink -name 'Rose the desktop kitty'"
|
spawn "pgrep oneko || oneko -tofocus -tora -position +-1+5 -fg palevioletred3 -bg pink -name 'Rose the desktop kitty'"
|
||||||
spawn "pgrep volumeicon || volumeicon"
|
spawn "pgrep volumeicon || volumeicon"
|
||||||
spawn "pgrep nm-applet || nm-applet"
|
spawn "pgrep nm-applet || nm-applet"
|
||||||
spawn "pgrep mullvad-gui || mullvad-vpn"
|
spawn "pgrep mullvad-gui || mullvad-vpn"
|
||||||
spawn "feh --bg-fill ~/Pictures/wallpaper.jpg"
|
spawn "feh --bg-fill ~/Pictures/wallpaper.jpg"
|
||||||
killStatusBar "xmobar"
|
|
||||||
spawnStatusBar "xmobar"
|
|
||||||
|
|
||||||
xmeowbar = statusBarProp "xmobar" $ pure xmobarPP
|
------------------------------------------------------------------------
|
||||||
polybar = statusBarProp "polybar" $ pure xmobarPP
|
-- Now run xmonad with all the defaults we set up.
|
||||||
barSpawner 0 = pure $ xmeowbar <> polybar
|
|
||||||
barSpawner _ = mempty
|
|
||||||
|
|
||||||
main :: IO()
|
-- Run xmonad with the settings you specify. No need to modify this.
|
||||||
main = xmonad $ docks $ dynamicSBs barSpawner $ ewmh defaults
|
--
|
||||||
|
mySB = statusBarProp "polybar" (pure xmobarPP)
|
||||||
|
|
||||||
|
main = xmonad $ docks $ withSB mySB (ewmh defaults)
|
||||||
|
|
||||||
|
-- A structure containing your configuration settings, overriding
|
||||||
|
-- fields in the default config. Any you don't override, will
|
||||||
|
-- use the defaults defined in xmonad/XMonad/Config.hs
|
||||||
|
--
|
||||||
|
-- No need to modify this.
|
||||||
|
--
|
||||||
defaults =
|
defaults =
|
||||||
def
|
def
|
||||||
{ -- simple stuff
|
{ -- simple stuff
|
||||||
|
@ -164,9 +210,14 @@ defaults =
|
||||||
workspaces = ["comms", "browser"] ++ map show [3 .. 9],
|
workspaces = ["comms", "browser"] ++ map show [3 .. 9],
|
||||||
normalBorderColor = "#3c3836",
|
normalBorderColor = "#3c3836",
|
||||||
focusedBorderColor = "#504945",
|
focusedBorderColor = "#504945",
|
||||||
|
-- , clientMask = focusChangeMask .|. XMonad.clientMask
|
||||||
|
-- key bindings
|
||||||
keys = myKeys,
|
keys = myKeys,
|
||||||
mouseBindings = myMouseBindings,
|
mouseBindings = myMouseBindings,
|
||||||
layoutHook =myLayout,
|
-- hooks, layouts
|
||||||
|
layoutHook = spacingRaw True (Border 0 0 0 0) True (Border 7 7 7 7) True myLayout,
|
||||||
manageHook = myManageHook,
|
manageHook = myManageHook,
|
||||||
|
handleEventHook = myEventHook,
|
||||||
|
logHook = myLogHook,
|
||||||
startupHook = myStartupHook
|
startupHook = myStartupHook
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,17 @@ in {
|
||||||
"googletagservices.com"
|
"googletagservices.com"
|
||||||
"googlesyndication.com"
|
"googlesyndication.com"
|
||||||
];
|
];
|
||||||
|
"91.107.221.11" = [
|
||||||
|
"katzen.cafe"
|
||||||
|
"matrix.katzen.cafe"
|
||||||
|
"design.katzen.cafe"
|
||||||
|
"ck.katzen.cafe"
|
||||||
|
"forge.katzen.cafe"
|
||||||
|
"pad.katzen.cafe"
|
||||||
|
"mail.katzen.cafe"
|
||||||
|
"wolke.katzen.cafe"
|
||||||
|
"auth.katzen.cafe"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
environment.etc = with builtins; (
|
environment.etc = with builtins; (
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
};
|
};
|
||||||
"bar/status" = {
|
"bar/status" = {
|
||||||
# Style
|
# Style
|
||||||
bottom = true;
|
|
||||||
width = "100%";
|
width = "100%";
|
||||||
height = "24px";
|
height = "24px";
|
||||||
radius = 0;
|
radius = 0;
|
||||||
|
|
|
@ -1,28 +1,11 @@
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
home-manager.users.jade = {
|
with lib; {
|
||||||
config,
|
home-manager.users.jade = {pkgs, ...}: {
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
xmobarGhc = pkgs.haskellPackages.ghcWithPackages (pkgs: with pkgs; [xmobar]);
|
|
||||||
in {
|
|
||||||
home.packages = [xmobarGhc pkgs.xmonadctl];
|
|
||||||
programs.xmobar = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
home.file."xmobar.hs" = {
|
|
||||||
source = ../../haskell/xmobar/xmobar.hs;
|
|
||||||
target = ".config/xmobar/xmobar.hs";
|
|
||||||
onChange = ''
|
|
||||||
export PATH=${lib.makeBinPath [xmobarGhc]}:$PATH
|
|
||||||
${pkgs.xmobar}/bin/xmobar --recompile
|
|
||||||
${pkgs.haskellPackages.xmonad}/bin/xmonad --restart
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
xsession.windowManager.xmonad = {
|
xsession.windowManager.xmonad = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableContribAndExtras = true;
|
enableContribAndExtras = true;
|
||||||
|
|
Loading…
Reference in a new issue