151 lines
4.6 KiB
Nix
151 lines
4.6 KiB
Nix
{pkgs, lib, config, ...}:
|
|
let
|
|
mod = "Mod4";
|
|
left = "h";
|
|
right = "l";
|
|
up = "k";
|
|
down = "j";
|
|
|
|
launcher = "${pkgs.rofi}/bin/rofi -config ${config.xdg.configHome}/rofi/launcher.rasi -theme ${config.xdg.dataHome}/rofi/themes/launcher.rasi -show drun -show-icons";
|
|
|
|
in {
|
|
home.packages = with pkgs; [
|
|
brightnessctl
|
|
wmctrl
|
|
wireplumber
|
|
alacritty
|
|
waybar
|
|
sway
|
|
rofi-wayland
|
|
];
|
|
wayland = {
|
|
windowManager = {
|
|
sway = {
|
|
enable = true;
|
|
systemd = {
|
|
enable = true;
|
|
};
|
|
|
|
config = {
|
|
modifier = "${mod}";
|
|
|
|
gaps = {
|
|
inner = 8;
|
|
};
|
|
|
|
bars = [{
|
|
command = "${pkgs.waybar}/bin/waybar";
|
|
}];
|
|
|
|
window = {
|
|
border = 3;
|
|
titlebar = false;
|
|
};
|
|
|
|
input = {
|
|
"type:pointer" = {
|
|
pointer_accel = "-1";
|
|
};
|
|
|
|
"type:keyboard" = {
|
|
xkb_layout = "gb,dk";
|
|
xkb_options =
|
|
"caps:escape,grp:menu_toggle,grp:rctrl_toggle";
|
|
repeat_delay = "250";
|
|
repeat_rate = "25";
|
|
};
|
|
|
|
"type:touchpad" = {
|
|
natural_scroll = "enabled";
|
|
tap = "enabled";
|
|
tap_button_map = "lrm";
|
|
pointer_accel = "0";
|
|
};
|
|
};
|
|
|
|
keybindings = with pkgs; {
|
|
"Print" = "exec screenshot";
|
|
"${mod}+Print" = "exec screenshot --area";
|
|
"${mod}+Shift+Print" = "exec screenshot --current-window";
|
|
|
|
"XF86AudioRaiseVolume" = "exec ${wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+";
|
|
"XF86AudioLowerVolume" = "exec ${wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-";
|
|
"XF86AudioMute" = "exec ${wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
|
"XF86AudioMicMute" = "exec ${wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
|
|
|
|
"XF86AudioPlay" = "mpc toggle";
|
|
"XF86AudioNext" = "mpc next";
|
|
"XF86AudioPrev" = "mpc prev";
|
|
|
|
"XF86MonBrightnessUp" = "exec ${brightnessctl}/bin/brightnessctl set +10%";
|
|
"XF86MonBrightnessDown" = "exec ${brightnessctl}/bin/brightnessctl set 10%-";
|
|
|
|
"${mod}+Shift+Return" = "exec ${alacritty}/bin/alacritty";
|
|
"${mod}+q" = "kill";
|
|
"${mod}+p" = "exec ${launcher}";
|
|
"${mod}+Shift+e" = "exec ${pkgs.emacs}/bin/emacsclient -c -a ''";
|
|
"${mod}+Shift+b" = "exec ${pkgs.firefox}/bin/firefox";
|
|
"${mod}+Shift+c" = "reload";
|
|
"${mod}+Shift+q" = "exec ${pkgs.sway}/bin/swaymsg exit";
|
|
|
|
"${mod}+${left}" = "focus left";
|
|
"${mod}+${right}" = "focus right";
|
|
"${mod}+${up}" = "focus up";
|
|
"${mod}+${down}" = "focus down";
|
|
|
|
"${mod}+Shift+${left}" = "move left";
|
|
"${mod}+Shift+${right}" = "move right";
|
|
"${mod}+Shift+${up}" = "move up";
|
|
"${mod}+Shift+${down}" = "move down";
|
|
|
|
"${mod}+Ctrl+${left}" = "move workspace to output left";
|
|
"${mod}+Ctrl+${right}" = "move workspace to output right";
|
|
|
|
"${mod}+b" = "splith";
|
|
"${mod}+v" = "splitv";
|
|
|
|
"${mod}+s" = "layout stacking";
|
|
"${mod}+w" = "layout tabbed";
|
|
"${mod}+e" = "layout toggle split";
|
|
|
|
"${mod}+Shift+space" = "layout toggle floating";
|
|
"${mod}+space" = "focus mode_toggle";
|
|
"${mod}+Shift+f" = "fullscreen";
|
|
|
|
} // lib.attrsets.mergeAttrsList (map
|
|
(n: let workspace = toString n; in {
|
|
"${mod}+${workspace}" = "workspace ${workspace}";
|
|
"${mod}+Shift+${workspace}" = "move container to workspace ${workspace}";
|
|
})
|
|
[1 2 3 4 5 6 7 8 9 0]
|
|
);
|
|
|
|
colors = {
|
|
focused = {
|
|
background = "#A7C080";
|
|
text = "#272E33";
|
|
indicator = "#A7C080";
|
|
border = "#A7C080";
|
|
childBorder = "#A7C080";
|
|
};
|
|
unfocused = {
|
|
background = "#9DA9A0";
|
|
text = "#272E33";
|
|
indicator = "#9DA9A0";
|
|
border = "#9DA9A0";
|
|
childBorder = "#9DA9A0";
|
|
};
|
|
urgent = {
|
|
background = "#E67E80";
|
|
text = "#272E33";
|
|
indicator = "#E67E80";
|
|
border = "#E67E80";
|
|
childBorder = "#E67E80";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|