Compare commits
12 commits
75060b71c7
...
31d20be291
| Author | SHA1 | Date | |
|---|---|---|---|
| 31d20be291 | |||
| 777ee73343 | |||
| 0b0a54a021 | |||
| 56bc6e760a | |||
| b26f6112dc | |||
| e3bc43c827 | |||
| 519ef6a5d3 | |||
| f6c5cc5834 | |||
| 88e5c2db8f | |||
| 18b00d2991 | |||
| 931b572b9a | |||
| 738f8c5b62 |
7 changed files with 136 additions and 41 deletions
|
|
@ -7,6 +7,7 @@
|
||||||
./services/polybar
|
./services/polybar
|
||||||
./services/dunst
|
./services/dunst
|
||||||
./services/udiskie
|
./services/udiskie
|
||||||
|
./services/picom
|
||||||
];
|
];
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,11 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
home.shellAliases = { suspend = "systemctl hibernate"; };
|
home.shellAliases = {
|
||||||
|
suspend = "systemctl hibernate";
|
||||||
|
nrs = "sudo nixos-rebuild switch --flake .";
|
||||||
|
nrb = "sudo nixos-rebuild build --flake .";
|
||||||
|
};
|
||||||
|
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
15
home/alex/services/picom/default.nix
Normal file
15
home/alex/services/picom/default.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
config.services.picom = {
|
||||||
|
enable = true;
|
||||||
|
activeOpacity = 1.0;
|
||||||
|
inactiveOpacity = 0.8;
|
||||||
|
backend = "glx";
|
||||||
|
fade = true;
|
||||||
|
fadeDelta = 5;
|
||||||
|
opacityRules = [ "100:name *= 'i3lock'" ];
|
||||||
|
shadow = true;
|
||||||
|
shadowOpacity = 0.75;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -52,7 +52,7 @@ font-0 = monospace;2
|
||||||
|
|
||||||
modules-left = xworkspaces xwindow
|
modules-left = xworkspaces xwindow
|
||||||
modules-center = systray
|
modules-center = systray
|
||||||
modules-right = filesystem pulseaudio xkeyboard memory cpu wlan eth date
|
modules-right = filesystem pulseaudio xkeyboard memory cpu battery wlan eth backlight date
|
||||||
|
|
||||||
cursor-click = pointer
|
cursor-click = pointer
|
||||||
cursor-scroll = ns-resize
|
cursor-scroll = ns-resize
|
||||||
|
|
@ -73,6 +73,62 @@ type = internal/tray
|
||||||
format-margin = 8pt
|
format-margin = 8pt
|
||||||
tray-spacing = 16pt
|
tray-spacing = 16pt
|
||||||
|
|
||||||
|
[module/battery]
|
||||||
|
type = internal/battery
|
||||||
|
|
||||||
|
; This is useful in case the battery never reports 100% charge
|
||||||
|
; Default: 100
|
||||||
|
full-at = 99
|
||||||
|
|
||||||
|
; format-low once this charge percentage is reached
|
||||||
|
; Default: 10
|
||||||
|
; New in version 3.6.0
|
||||||
|
low-at = 10
|
||||||
|
|
||||||
|
; Use the following command to list batteries and adapters:
|
||||||
|
; $ ls -1 /sys/class/power_supply/
|
||||||
|
battery = BAT0
|
||||||
|
adapter = ADP0
|
||||||
|
|
||||||
|
; If an inotify event haven't been reported in this many
|
||||||
|
; seconds, manually poll for new values.
|
||||||
|
;
|
||||||
|
; Needed as a fallback for systems that don't report events
|
||||||
|
; on sysfs/procfs.
|
||||||
|
;
|
||||||
|
; Disable polling by setting the interval to 0.
|
||||||
|
;
|
||||||
|
; Default: 5
|
||||||
|
poll-interval = 5
|
||||||
|
|
||||||
|
[module/backlight]
|
||||||
|
type = internal/xbacklight
|
||||||
|
|
||||||
|
; XRandR output to get get values from
|
||||||
|
; Default: the monitor defined for the running bar
|
||||||
|
;output = DP-4
|
||||||
|
|
||||||
|
; Create scroll handlers used to set the backlight value
|
||||||
|
; Default: true
|
||||||
|
enable-scroll = true
|
||||||
|
|
||||||
|
; Available tags:
|
||||||
|
; <label> (default)
|
||||||
|
; <ramp>
|
||||||
|
; <bar>
|
||||||
|
format = <ramp>
|
||||||
|
|
||||||
|
; Available tokens:
|
||||||
|
; %percentage% (default)
|
||||||
|
label = %percentage%%
|
||||||
|
|
||||||
|
; Only applies if <ramp> is used
|
||||||
|
ramp-0 = 🌕
|
||||||
|
ramp-1 = 🌔
|
||||||
|
ramp-2 = 🌓
|
||||||
|
ramp-3 = 🌒
|
||||||
|
ramp-4 = 🌑
|
||||||
|
|
||||||
[module/xworkspaces]
|
[module/xworkspaces]
|
||||||
type = internal/xworkspaces
|
type = internal/xworkspaces
|
||||||
|
|
||||||
|
|
|
||||||
22
modules/wm/light.nix
Normal file
22
modules/wm/light.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
config.programs.light = { enable = true; };
|
||||||
|
config.services.actkbd = let light = "${pkgs.light}/bin/light";
|
||||||
|
in {
|
||||||
|
enable = true;
|
||||||
|
bindings = [
|
||||||
|
{
|
||||||
|
keys = [ 232 ];
|
||||||
|
events = [ "key" ];
|
||||||
|
command = "${light} -U 10";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
keys = [ 233 ];
|
||||||
|
events = [ "key" ];
|
||||||
|
command = "${light} -A 10";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,8 +1,13 @@
|
||||||
import XMonad
|
import XMonad
|
||||||
|
import XMonad.Actions.Navigation2D (navigation2DP, windowGo, windowSwap)
|
||||||
|
import qualified XMonad.Actions.CycleWS as WS
|
||||||
import XMonad.Util.Ungrab (unGrab)
|
import XMonad.Util.Ungrab (unGrab)
|
||||||
import XMonad.Layout.ThreeColumns
|
import XMonad.Layout.ThreeColumns
|
||||||
import XMonad.Layout.Magnifier (magnifiercz')
|
import XMonad.Layout.ToggleLayouts (ToggleLayout(..), toggleLayouts)
|
||||||
|
import XMonad.Layout.BinarySpacePartition
|
||||||
|
import XMonad.Layout.BorderResize (borderResize)
|
||||||
import XMonad.Hooks.EwmhDesktops
|
import XMonad.Hooks.EwmhDesktops
|
||||||
|
import XMonad.Hooks.SetWMName
|
||||||
import qualified XMonad.Hooks.ManageDocks as Docks
|
import qualified XMonad.Hooks.ManageDocks as Docks
|
||||||
import qualified XMonad.Util.EZConfig as EZ
|
import qualified XMonad.Util.EZConfig as EZ
|
||||||
import Control.Monad (when)
|
import Control.Monad (when)
|
||||||
|
|
@ -24,10 +29,11 @@ compileRestart resume = do
|
||||||
executeFile (cacheDir dirs </> compiledConfig) False args Nothing
|
executeFile (cacheDir dirs </> compiledConfig) False args Nothing
|
||||||
)
|
)
|
||||||
|
|
||||||
myLayout = Docks.avoidStruts (tiled ||| Mirror tiled ||| Full ||| columns)
|
myLayout = borderResize $ Docks.avoidStruts $ layout
|
||||||
where
|
where
|
||||||
|
layout = (emptyBSP ||| columns ||| tiled ||| Full)
|
||||||
tiled = Tall nmaster delta ratio
|
tiled = Tall nmaster delta ratio
|
||||||
columns = magnifiercz' 1.3 $ ThreeColMid nmaster delta ratio
|
columns = ThreeColMid nmaster delta ratio
|
||||||
nmaster = 1 -- default number of windows in the master pane
|
nmaster = 1 -- default number of windows in the master pane
|
||||||
ratio = 1/2 -- default proportion occupied by master pane
|
ratio = 1/2 -- default proportion occupied by master pane
|
||||||
delta = 3/100 -- percent of screen to increment when resizing
|
delta = 3/100 -- percent of screen to increment when resizing
|
||||||
|
|
@ -35,10 +41,12 @@ myLayout = Docks.avoidStruts (tiled ||| Mirror tiled ||| Full ||| columns)
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = getDirectories >>= launch myConfig
|
main = getDirectories >>= launch myConfig
|
||||||
|
|
||||||
myConfig = ewmhFullscreen $ ewmh $ Docks.docks $ def
|
myConfig = ewmhFullscreen $ ewmh $ Docks.docks $ nav $ def
|
||||||
{ modMask = mod4Mask -- Use Super instead of Alt
|
{ modMask = mod4Mask -- Use Super instead of Alt
|
||||||
, terminal = "alacritty"
|
, terminal = "alacritty"
|
||||||
, layoutHook = myLayout
|
, layoutHook = myLayout
|
||||||
|
-- this seems to be necessary to make java gui applications work :(
|
||||||
|
, startupHook = ewmhDesktopsStartup >> setWMName "LG3D"
|
||||||
}
|
}
|
||||||
`EZ.additionalKeysP`
|
`EZ.additionalKeysP`
|
||||||
[ ("M-S-z", spawn "xscreensaver-command -lock")
|
[ ("M-S-z", spawn "xscreensaver-command -lock")
|
||||||
|
|
@ -46,7 +54,28 @@ myConfig = ewmhFullscreen $ ewmh $ Docks.docks $ def
|
||||||
, ("M-S-q", restart "xmonad" True)
|
, ("M-S-q", restart "xmonad" True)
|
||||||
, ("M-C-s", unGrab *> spawn "scrot -s")
|
, ("M-C-s", unGrab *> spawn "scrot -s")
|
||||||
, ("M-b", sendMessage Docks.ToggleStruts)
|
, ("M-b", sendMessage Docks.ToggleStruts)
|
||||||
|
, ("M-f", sendMessage (Toggle "Full"))
|
||||||
|
, ("M-p", spawn appLauncher)
|
||||||
|
, ("M-i", spawn passLauncher)
|
||||||
|
, ("M-w", kill)
|
||||||
|
, ("M-l", WS.toggleWS)
|
||||||
|
, ("M-g", WS.prevWS)
|
||||||
|
, ("M-r", WS.nextWS)
|
||||||
|
, ("<XF86MonBrightnessDown>", spawn "xbacklight -dec 5")
|
||||||
|
, ("<XF86MonBrightnessUp>", spawn "xbacklight -inc 5")
|
||||||
|
, ("M-S-c", sendMessage $ MoveSplit U)
|
||||||
|
, ("M-S-h", sendMessage $ MoveSplit L)
|
||||||
|
, ("M-S-t", sendMessage $ MoveSplit D)
|
||||||
|
, ("M-S-n", sendMessage $ MoveSplit R)
|
||||||
|
, ("M-a", sendMessage Balance)
|
||||||
|
, ("M-S-a", sendMessage Equalize)
|
||||||
|
, ("M-o", sendMessage Rotate)
|
||||||
]
|
]
|
||||||
|
where
|
||||||
|
-- navigate using dvorak bindings
|
||||||
|
nav = navigation2DP def ("c", "h", "t", "n") [("M-", windowGo), ("M-C-", windowSwap)] True
|
||||||
|
appLauncher = "rofi -show combi -modes combi -combi-modes window,drun,run,ssh"
|
||||||
|
passLauncher = "rofi-pass"
|
||||||
|
|
||||||
|
|
||||||
-- myManageHook :: ManageHook
|
-- myManageHook :: ManageHook
|
||||||
|
|
@ -54,38 +83,3 @@ myConfig = ewmhFullscreen $ ewmh $ Docks.docks $ def
|
||||||
-- [ className =? "Gimp" --> doFloat
|
-- [ className =? "Gimp" --> doFloat
|
||||||
-- , isDialog --> doFloat
|
-- , isDialog --> doFloat
|
||||||
-- ]
|
-- ]
|
||||||
|
|
||||||
-- main = xmonad
|
|
||||||
-- . ewmhFullscreen
|
|
||||||
-- . ewmh
|
|
||||||
-- . withEasySB (statusBarProp "xmobar" (pure myXmobarPP)) defToggleStrutsKey
|
|
||||||
-- $ myConfig
|
|
||||||
|
|
||||||
|
|
||||||
-- myXmobarPP :: PP
|
|
||||||
-- myXmobarPP = def
|
|
||||||
-- { ppSep = magenta " • "
|
|
||||||
-- , ppTitleSanitize = xmobarStrip
|
|
||||||
-- , ppCurrent = wrap " " "" . xmobarBorder "Top" "#8be9fd" 2
|
|
||||||
-- , ppHidden = white . wrap " " ""
|
|
||||||
-- , ppHiddenNoWindows = lowWhite . wrap " " ""
|
|
||||||
-- , ppUrgent = red . wrap (yellow "!") (yellow "!")
|
|
||||||
-- , ppOrder = \[ws, l, _, wins] -> [ws, l, wins]
|
|
||||||
-- , ppExtras = [logTitles formatFocused formatUnfocused]
|
|
||||||
-- }
|
|
||||||
-- where
|
|
||||||
-- formatFocused = wrap (white "[") (white "]") . magenta . ppWindow
|
|
||||||
-- formatUnfocused = wrap (lowWhite "[") (lowWhite "]") . blue . ppWindow
|
|
||||||
|
|
||||||
-- -- | Windows should have *some* title, which should not not exceed a
|
|
||||||
-- -- sane length.
|
|
||||||
-- ppWindow :: String -> String
|
|
||||||
-- ppWindow = xmobarRaw . (\w -> if null w then "untitled" else w) . shorten 30
|
|
||||||
|
|
||||||
-- blue, lowWhite, magenta, red, white, yellow :: String -> String
|
|
||||||
-- magenta = xmobarColor "#ff79c6" ""
|
|
||||||
-- blue = xmobarColor "#bd93f9" ""
|
|
||||||
-- white = xmobarColor "#f8f8f2" ""
|
|
||||||
-- yellow = xmobarColor "#f1fa8c" ""
|
|
||||||
-- red = xmobarColor "#ff5555" ""
|
|
||||||
-- lowWhite = xmobarColor "#bbbbbb" ""
|
|
||||||
|
|
|
||||||
|
|
@ -14,5 +14,8 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# control backlight
|
||||||
|
config.environment.systemPackages = [ pkgs.xorg.xbacklight pkgs.scrot ];
|
||||||
|
|
||||||
config.systemd.services.upower.enable = true;
|
config.systemd.services.upower.enable = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue