sway: update config

This commit is contained in:
Julien Malka 2023-11-09 10:50:10 +01:00
parent 07cf03e85e
commit f835376156
Signed by: Luj
GPG key ID: 6FC74C847011FD83

View file

@ -1,8 +1,8 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let let
cfg = config.luj.programs.sway; cfg = config.luj.programs.sway;
modifier = "Mod4"; modifier = "Mod1";
terminal = "alacritty"; terminal = "kitty";
in in
with lib; with lib;
{ {
@ -13,13 +13,13 @@ with lib;
config = mkIf cfg.enable { config = mkIf cfg.enable {
wayland.windowManager.sway = { wayland.windowManager.sway = {
enable = true; enable = true;
package = pkgs.swayfx;
config = { config = {
terminal = terminal; terminal = terminal;
modifier = modifier; modifier = modifier;
input = { input = {
"*" = { "*" = {
xkb_layout = "fr"; xkb_layout = "fr";
xkb_variant = "mac";
}; };
}; };
@ -31,6 +31,7 @@ with lib;
inner = 7; inner = 7;
}; };
bars = [ ];
keybindings = lib.mkOptionDefault { keybindings = lib.mkOptionDefault {
"${modifier}+ampersand" = "workspace 1"; "${modifier}+ampersand" = "workspace 1";
"${modifier}+eacute" = "workspace 2"; "${modifier}+eacute" = "workspace 2";
@ -72,16 +73,46 @@ with lib;
"XF86MonBrightnessUp" = "exec brightnessctl s +10"; "XF86MonBrightnessUp" = "exec brightnessctl s +10";
"XF86MonBrightnessDown" = "exec brightnessctl s 10-"; "XF86MonBrightnessDown" = "exec brightnessctl s 10-";
"${modifier}+w" = "exec swaylock";
}; };
}; };
extraConfig = '' extraConfig = ''
exec_always nm-applet --indicator set $laptop eDP-1
bindswitch lid:on output $laptop disable
bindswitch lid:off output $laptop enable
''; '';
extraOptions = [ "--unsupported-gpu" ];
}; };
services.swayidle.enable = true; programs.swaylock =
programs.waybar.enable = true; {
enable = true;
package = pkgs.swaylock-effects;
settings = {
screenshots = true;
clock = true;
indicator = true;
indicator-radius = 200;
indicator-thickness = 20;
grace = 0;
grace-no-mouse = true;
grace-no-touch = true;
line-uses-ring = false;
ignore-empty-password = true;
show-failed-attempts = false;
font = "Fira Code";
timestr = "%H:%M";
datestr = "";
effect-blur = "8x5";
effect-vignette = "0.5:0.5";
color = "00000000";
};
};
}; };