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

View file

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