2023-07-03 22:35:58 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
2024-01-28 15:14:26 +01:00
|
|
|
inputs,
|
|
|
|
system,
|
2024-10-15 04:03:50 +02:00
|
|
|
lib,
|
2023-07-03 22:35:58 +02:00
|
|
|
...
|
2024-01-28 12:53:43 +01:00
|
|
|
}: let
|
|
|
|
cliphist_sway = pkgs.writeShellScriptBin "cliphist_sway" ''
|
|
|
|
${pkgs.cliphist}/bin/cliphist list | \
|
|
|
|
${pkgs.wofi}/bin/wofi --dmenu --insensitive | \
|
|
|
|
${pkgs.cliphist}/bin/cliphist decode | \
|
|
|
|
${pkgs.wl-clipboard}/bin/wl-copy
|
|
|
|
'';
|
2024-02-13 14:19:52 +01:00
|
|
|
screenshot_clip = pkgs.writeShellScriptBin "screenshot_clip" ''
|
|
|
|
GEOM="$(${pkgs.slurp}/bin/slurp -d)"
|
|
|
|
${pkgs.grim}/bin/grim -g "$GEOM" - | ${pkgs.wl-clipboard}/bin/wl-copy
|
|
|
|
'';
|
2024-01-28 15:14:26 +01:00
|
|
|
swaysw = inputs.swaysw.packages.${system}.swaysw;
|
|
|
|
viber = pkgs.callPackage ../packages/viber/default.nix {};
|
2024-01-28 15:47:24 +01:00
|
|
|
term = "${pkgs.foot}/bin/footclient";
|
2024-01-28 12:53:43 +01:00
|
|
|
in {
|
2023-07-03 22:35:58 +02:00
|
|
|
wayland.windowManager.sway = {
|
|
|
|
enable = true;
|
|
|
|
extraSessionCommands = "";
|
2024-10-15 04:03:50 +02:00
|
|
|
extraConfigEarly = '''';
|
2023-07-03 22:35:58 +02:00
|
|
|
|
|
|
|
config = {
|
|
|
|
fonts = {
|
|
|
|
names = ["JetBrainsMono"];
|
|
|
|
style = "Bold Semi-Condensed";
|
|
|
|
size = 11.0;
|
|
|
|
};
|
|
|
|
|
|
|
|
window.commands = [
|
|
|
|
{
|
|
|
|
command = "move scratchpad, resize set 1152 648";
|
2023-10-29 12:15:51 +01:00
|
|
|
criteria = {app_id = "pulsemixer|python3|com.rtosta.zapzap|whatsapp-for-linux|com.viber";};
|
2023-07-03 22:35:58 +02:00
|
|
|
}
|
|
|
|
{
|
|
|
|
command = "move scratchpad, resize set 1502 845";
|
2023-10-29 12:15:51 +01:00
|
|
|
criteria = {app_id = "com.viber";};
|
2023-07-03 22:35:58 +02:00
|
|
|
}
|
|
|
|
{
|
|
|
|
command = "floating enable";
|
|
|
|
criteria = {app_id = "sws_cli";};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
modifier = "Mod4";
|
|
|
|
output = {
|
|
|
|
eDP-1 = {
|
2023-09-29 20:54:23 +02:00
|
|
|
/*
|
2024-04-29 13:15:45 +02:00
|
|
|
bg = "~/pic/wallpaper stretch";
|
2023-07-03 22:35:58 +02:00
|
|
|
scale = "1.4";
|
|
|
|
*/
|
|
|
|
};
|
2023-09-07 10:57:18 +02:00
|
|
|
|
2023-09-30 12:45:55 +02:00
|
|
|
HDMI-A-4 = {
|
|
|
|
res = "1920x1080";
|
|
|
|
};
|
2023-07-03 22:35:58 +02:00
|
|
|
};
|
2023-09-07 10:57:18 +02:00
|
|
|
|
2023-07-03 22:35:58 +02:00
|
|
|
input = {
|
2023-09-30 12:45:55 +02:00
|
|
|
"type:keyboard" = {repeat_delay = "150";};
|
|
|
|
"type:keyboard" = {repeat_rate = "70";};
|
|
|
|
"type:touchpad" = {tap = "enabled";};
|
2023-07-03 22:35:58 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
bars = [
|
|
|
|
{
|
2023-10-29 18:41:23 +01:00
|
|
|
position = "top";
|
|
|
|
fonts = {
|
|
|
|
names = ["Iosevka" "FontAwesome"];
|
|
|
|
style = "Bold Semi-Condensed";
|
|
|
|
size = 12.0;
|
|
|
|
};
|
2024-01-28 15:14:26 +01:00
|
|
|
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ~/.config/i3status-rust/config-top.toml";
|
2023-07-03 22:35:58 +02:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
keybindings = {
|
|
|
|
"Alt+Shift+q" = "kill";
|
2024-01-28 15:47:24 +01:00
|
|
|
"Alt+Shift+Return" = "exec ${term}";
|
2024-04-29 13:15:45 +02:00
|
|
|
"Alt+p" = "exec ${pkgs.bemenu}/bin/bemenu-run";
|
2024-01-28 12:53:43 +01:00
|
|
|
"Alt+c" = "exec ${pkgs.moreutils}/bin/lckdo cliphist_sway ${cliphist_sway}/bin/cliphist_sway";
|
2024-02-13 14:19:52 +01:00
|
|
|
"Print" = "exec ${pkgs.moreutils}/bin/lckdo screenshot_clip ${screenshot_clip}/bin/screenshot_clip";
|
2023-07-03 22:35:58 +02:00
|
|
|
|
|
|
|
"Alt+Shift+space" = "floating toggle";
|
|
|
|
"Alt+space" = "focus mode_toggle";
|
|
|
|
|
|
|
|
"Alt+m" = "layout toggle splith tabbed";
|
|
|
|
"Alt+t" = "split toggle";
|
|
|
|
"Alt+s" = "layout toggle split";
|
|
|
|
|
|
|
|
"Alt+1" = "workspace 1";
|
|
|
|
"Alt+2" = "workspace 2";
|
|
|
|
"Alt+3" = "workspace 3";
|
|
|
|
"Alt+4" = "workspace 4";
|
|
|
|
"Alt+5" = "workspace 5";
|
|
|
|
"Alt+6" = "workspace 6";
|
|
|
|
"Alt+7" = "workspace 7";
|
|
|
|
"Alt+8" = "workspace 8";
|
|
|
|
"Alt+9" = "workspace 9";
|
|
|
|
"Alt+0" = "workspace 10";
|
|
|
|
|
|
|
|
"Alt+Shift+1" = "move container to workspace 1";
|
|
|
|
"Alt+Shift+2" = "move container to workspace 2";
|
|
|
|
"Alt+Shift+3" = "move container to workspace 3";
|
|
|
|
"Alt+Shift+4" = "move container to workspace 4";
|
|
|
|
"Alt+Shift+5" = "move container to workspace 5";
|
|
|
|
"Alt+Shift+6" = "move container to workspace 6";
|
|
|
|
"Alt+Shift+7" = "move container to workspace 7";
|
|
|
|
"Alt+Shift+8" = "move container to workspace 8";
|
|
|
|
"Alt+Shift+9" = "move container to workspace 9";
|
|
|
|
"Alt+Shift+0" = "move container to workspace 10";
|
|
|
|
|
|
|
|
"Alt+h" = "focus left";
|
|
|
|
"Alt+j" = "focus down";
|
|
|
|
"Alt+k" = "focus up";
|
|
|
|
"Alt+l" = "focus right";
|
2024-01-28 15:14:26 +01:00
|
|
|
"Alt+slash" = "exec ${pkgs.moreutils}/bin/lckdo swaysw ${swaysw}/bin/swaysw";
|
2023-07-03 22:35:58 +02:00
|
|
|
"Alt+Escape" = "workspace back_and_forth";
|
|
|
|
"Alt+f" = "fullscreen enable";
|
2024-09-09 00:35:59 +02:00
|
|
|
"Alt+bracketright" = "focus output right";
|
|
|
|
"Alt+bracketleft" = "focus output left";
|
2023-07-03 22:35:58 +02:00
|
|
|
|
|
|
|
"Mod4+l" = ''
|
2024-01-28 15:47:24 +01:00
|
|
|
exec ${pkgs.sway}/bin/swaymsg [app_id="python3"] scratchpad show || exec ${term} -a python3 ${pkgs.python3}/bin/python3'';
|
2024-03-23 17:50:07 +01:00
|
|
|
"Mod4+h" = "exec ${pkgs.sway}/bin/swaymsg [app_id=com.rtosta.zapzap] scratchpad show || exec ${pkgs.zapzap}/bin/zapzap";
|
2024-01-28 15:14:26 +01:00
|
|
|
"Mod4+j" = "exec ${pkgs.sway}/bin/swaymsg [app_id=com.viber] scratchpad show || exec ${viber}/bin/viber";
|
2023-07-03 22:35:58 +02:00
|
|
|
"Mod4+y" = ''
|
2024-01-28 15:47:24 +01:00
|
|
|
exec ${pkgs.sway}/bin/swaymsg [app_id="pulsemixer"] scratchpad show || exec ${term} -a pulsemixer ${pkgs.pulsemixer}/bin/pulsemixer'';
|
2024-10-15 04:03:50 +02:00
|
|
|
"Mod4+p" = "exec ${lib.getExe pkgs.tessen} -a copy";
|
2023-07-03 22:35:58 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|