fix sway config and fix boot on encrypted drive

This commit is contained in:
chaos 2023-09-18 14:55:36 +01:00
parent 599122d3af
commit 5e362bbbd8
No known key found for this signature in database
2 changed files with 28 additions and 26 deletions

View file

@ -55,10 +55,11 @@ in {
wrapperFeatures.base = true; wrapperFeatures.base = true;
wrapperFeatures.gtk = true; wrapperFeatures.gtk = true;
config = let config = let
modifier = "Mod1";
terminal = "${pkgs.kitty}/bin/kitty"; terminal = "${pkgs.kitty}/bin/kitty";
menu = "${pkgs.rofi}/bin/rofi -show run"; menu = "${pkgs.rofi}/bin/rofi -show run";
cfg = config.wayland.windowManager.sway.config; pactl = "${pkgs.pulseaudio}/bin/pactsl";
pactl = "${pkgs.pulseaudio}/bin/pactl";
in { in {
bars = [ bars = [
{ {
@ -85,8 +86,8 @@ in {
size = 18.0; size = 18.0;
}; };
modifier = "Mod1"; inherit modifier;
terminal = "${pkgs.kitty}/bin/kitty"; inherit terminal;
startup = [ startup = [
# gets blueman applet working for some reason # gets blueman applet working for some reason
@ -117,22 +118,22 @@ in {
titlebar = false; titlebar = false;
}; };
keybindings = keybindings = mkMerge [
{ {
"${cfg.modifier}+Return" = "exec ${cfg.terminal}"; "${modifier}+Return" = "exec ${terminal}";
"${cfg.modifier}+Left" = "focus left"; "${modifier}+Left" = "focus left";
"${cfg.modifier}+Down" = "focus down"; "${modifier}+Down" = "focus down";
"${cfg.modifier}+Up" = "focus up"; "${modifier}+Up" = "focus up";
"${cfg.modifier}+Right" = "focus right"; "${modifier}+Right" = "focus right";
"${cfg.modifier}+Shift+Left" = "move left"; "${modifier}+Shift+Left" = "move left";
"${cfg.modifier}+Shift+Down" = "move down"; "${modifier}+Shift+Down" = "move down";
"${cfg.modifier}+Shift+Up" = "move up"; "${modifier}+Shift+Up" = "move up";
"${cfg.modifier}+Shift+Right" = "move right"; "${modifier}+Shift+Right" = "move right";
"${cfg.modifier}+Shift+space" = "floating toggle"; "${modifier}+Shift+space" = "floating toggle";
"${cfg.modifier}+space" = "focus mode_toggle"; "${modifier}+space" = "focus mode_toggle";
"XF86AudioRaiseVolume" = "exec ${pactl} set-sink-volume @DEFAULT_SINK@ +5%"; "XF86AudioRaiseVolume" = "exec ${pactl} set-sink-volume @DEFAULT_SINK@ +5%";
"XF86AudioLowerVolume" = "exec ${pactl} set-sink-volume @DEFAULT_SINK@ -5%"; "XF86AudioLowerVolume" = "exec ${pactl} set-sink-volume @DEFAULT_SINK@ -5%";
@ -144,18 +145,19 @@ in {
exec ${pkgs.grim}/bin/grim -t png -g "$(${pkgs.slurp}/bin/slurp -d)" - | ${pkgs.wl-clipboard}/bin/wl-copy -t image/png''; exec ${pkgs.grim}/bin/grim -t png -g "$(${pkgs.slurp}/bin/slurp -d)" - | ${pkgs.wl-clipboard}/bin/wl-copy -t image/png'';
"Shift+Print" = "exec ${pkgs.grim}/bin/grim -t png - | ${pkgs.wl-clipboard}/bin/wl-copy -t image/png"; "Shift+Print" = "exec ${pkgs.grim}/bin/grim -t png - | ${pkgs.wl-clipboard}/bin/wl-copy -t image/png";
"${cfg.modifier}+d" = "exec ${menu}"; "${modifier}+d" = "exec ${menu}";
"${cfg.modifier}+f" = "fullscreen"; "${modifier}+f" = "fullscreen";
"${cfg.modifier}+Shift+q" = "kill"; "${modifier}+Shift+q" = "kill";
"${cfg.modifier}+Shift+c" = "reload"; "${modifier}+Shift+c" = "reload";
"${cfg.modifier}+r" = "mode resize"; "${modifier}+r" = "mode resize";
} }
// (mkMerge (map (workspace: { (mkMerge (map (workspace: {
"${cfg.modifier}+${workspace}" = "workspace ${workspace}"; "${modifier}+${workspace}" = "workspace ${workspace}";
"${cfg.modifier}+Shift+${workspace}" = "move container to workspace ${workspace}"; "${modifier}+Shift+${workspace}" = "move container to workspace ${workspace}";
}) ["1" "2" "3" "4" "5" "6" "7" "8" "9"])); }) ["1" "2" "3" "4" "5" "6" "7" "8" "9"]))
];
}; };
}; };
} }

View file

@ -48,7 +48,7 @@ in {
${pkgs.plymouth}/bin/plymouth ask-for-password \ ${pkgs.plymouth}/bin/plymouth ask-for-password \
--prompt="Please Decrypt USB" \ --prompt="Please Decrypt USB" \
--command="cryptsetup -T1 open ${encryptedUSB.encryptedPath} ${encryptedUSB.mapperName}" \ --command="cryptsetup -T1 open ${encryptedUSB.encryptedPath} ${encryptedUSB.preBootMapperName}" \
--number-of-tries=3 --number-of-tries=3
'' ''
else '' else ''