Compare commits
8 commits
e08af2559b
...
fa0e0fe86b
| Author | SHA1 | Date | |
|---|---|---|---|
| fa0e0fe86b | |||
| 0057dcb19f | |||
| e18ca72c20 | |||
| 76b89f8ea8 | |||
| 4a4e9cc30f | |||
| d8de5ac7d3 | |||
| 35aad1c28e | |||
| 87773282fc |
2 changed files with 28 additions and 4 deletions
|
|
@ -47,7 +47,7 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
logind.lidSwitch = "ignore";
|
logind.lidSwitch = "suspend";
|
||||||
|
|
||||||
printing = {
|
printing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,9 @@ in {
|
||||||
(pkgs)
|
(pkgs)
|
||||||
ansel
|
ansel
|
||||||
chromium # some websites only work there :(
|
chromium # some websites only work there :(
|
||||||
hyprlock
|
|
||||||
nwg-displays
|
nwg-displays
|
||||||
shikane # output autoconfig
|
shikane # output autoconfig
|
||||||
|
swaybg
|
||||||
zotero
|
zotero
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
@ -45,6 +45,7 @@ in {
|
||||||
|
|
||||||
wayland.windowManager.sway = let
|
wayland.windowManager.sway = let
|
||||||
logoutMode = "[L]ogout, [S]uspend, [P]oweroff, [R]eboot";
|
logoutMode = "[L]ogout, [S]uspend, [P]oweroff, [R]eboot";
|
||||||
|
lock = "swaylock --daemonize --image ~/.wallpaper --scaling fill";
|
||||||
in {
|
in {
|
||||||
enable = true;
|
enable = true;
|
||||||
swaynag.enable = true;
|
swaynag.enable = true;
|
||||||
|
|
@ -75,18 +76,21 @@ in {
|
||||||
bars = [];
|
bars = [];
|
||||||
|
|
||||||
keybindings = mkOptionDefault {
|
keybindings = mkOptionDefault {
|
||||||
|
"Mod4+Shift+a" = "exec shikanectl reload";
|
||||||
"Mod4+Shift+e" = ''mode "${logoutMode}"'';
|
"Mod4+Shift+e" = ''mode "${logoutMode}"'';
|
||||||
"Mod4+i" = "exec emacsclient --create-frame";
|
"Mod4+i" = "exec emacsclient --create-frame";
|
||||||
"Mod4+Control+l" = "exec hyprlock";
|
"Mod4+Control+l" = "exec ${lock}";
|
||||||
"XF86AudioMute" = "exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
"XF86AudioMute" = "exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||||
"XF86AudioLowerVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- -l 1.2";
|
"XF86AudioLowerVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- -l 1.2";
|
||||||
"XF86AudioRaiseVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ -l 1.2";
|
"XF86AudioRaiseVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ -l 1.2";
|
||||||
|
"XF86MonBrightnessUp" = "exec light -A 5";
|
||||||
|
"XF86MonBrightnessDown" = "exec light -U 5";
|
||||||
};
|
};
|
||||||
|
|
||||||
modes = mkOptionDefault {
|
modes = mkOptionDefault {
|
||||||
"${logoutMode}" = {
|
"${logoutMode}" = {
|
||||||
"l" = "exec --no-startup-id swaymsg exit, mode default";
|
"l" = "exec --no-startup-id swaymsg exit, mode default";
|
||||||
#"s" = "exec --no-startup-id betterlockscreen --suspend, mode default";
|
"s" = "exec --no-startup-id systemctl suspend, mode default";
|
||||||
"p" = "exec --no-startup-id systemctl poweroff, mode default";
|
"p" = "exec --no-startup-id systemctl poweroff, mode default";
|
||||||
"r" = "exec --no-startup-id systemctl reboot, mode default";
|
"r" = "exec --no-startup-id systemctl reboot, mode default";
|
||||||
"Escape" = "mode default";
|
"Escape" = "mode default";
|
||||||
|
|
@ -99,8 +103,15 @@ in {
|
||||||
startup = [
|
startup = [
|
||||||
{command = "shikane";}
|
{command = "shikane";}
|
||||||
{command = "waybar";}
|
{command = "waybar";}
|
||||||
|
{command = "swaybg --image ~/.wallpaper --mode fill"; always = true; }
|
||||||
|
{command = "swayidle -w idlehint 1 before-sleep \"${lock}\"";}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraConfig = ''
|
||||||
|
bindswitch --reload --locked lid:off output eDP-1 enable;
|
||||||
|
bindswitch --reload --locked lid:on output eDP-1 disable;
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
programs = {
|
programs = {
|
||||||
fuzzel.enable = true;
|
fuzzel.enable = true;
|
||||||
|
|
@ -110,4 +121,17 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# FIXME: belongs elsewhere
|
||||||
|
services = {
|
||||||
|
logind = {
|
||||||
|
lidSwitch = "suspend";
|
||||||
|
lidSwitchExternalPower = "ignore";
|
||||||
|
extraConfig = ''
|
||||||
|
IdleAction=suspend
|
||||||
|
IdleActionSec=10min
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
upower.enable = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue