Compare commits

...

2 commits

Author SHA1 Message Date
Evie Litherland-Smith 30df2bfc4b Add extra binds for function keys, add cursor config
Add monitor config for Vanguard in sway
2024-04-13 07:29:06 +01:00
Evie Litherland-Smith 91bdb9694a Fix typo 2024-04-13 07:28:53 +01:00
3 changed files with 59 additions and 20 deletions

View file

@ -203,7 +203,7 @@
Vanguard = systemConfig {
hostName = "Vanguard";
systemModules = [
./system/desktop
./system/desktop.nix
./system/games.nix
./system/sway.nix
];

View file

@ -25,6 +25,11 @@
natural_scroll = "enabled";
};
};
seat = {
"seat0" = {
xcursor_theme = with config.gtk.cursorTheme; "${name} ${toString size}";
};
};
modifier = "Mod4";
terminal = "${config.programs.alacritty.package}/bin/alacritty";
menu = "${config.programs.rofi.finalPackage}/bin/rofi -show drun";
@ -68,14 +73,14 @@
{command = "${pkgs.protonmail-bridge}/bin/protonmail-bridge -n";}
];
assigns = {
"3: Files" = [
"3" = [
{class = "^(libreoffice|soffice)(.*)$";}
];
"4: Chat" = [
"4" = [
{class = "^WebCord$";}
{class = "^Signal$";}
];
"5: Games" = [
"5" = [
{class = "^steam$";}
{class = "^org.prismlauncher.PrismLauncher$";}
];
@ -108,15 +113,47 @@
}
];
};
keybindings = let
modifier = config.wayland.windowManager.sway.config.modifier;
keybindings = with config; let
modifier = wayland.windowManager.sway.config.modifier;
withTerm = {
term ? "alacritty",
package ? config.programs.${term}.package,
progname,
args ? "",
}: "${package}/bin/${term} -T ${progname} -e ${progname} ${args}";
in
lib.mkOptionDefault {
"${modifier}+F1" = "exec swaylock";
"${modifier}+z" = "exec swaync-client -t -sw";
"${modifier}+e" = "exec emacsclient -c";
"${modifier}+w" = "exec firefox";
"${modifier}+f" = "exec thunar";
# Function keys
## Sound
"XF86AudioMute" = "exec ${services.avizo.package}/bin/volumectl %";
"XF86AudioMicMute" = "exec ${services.avizo.package}/bin/volumectl -m %";
"XF86AudioRaiseVolume" = "exec ${services.avizo.package}/bin/volumectl -u + 5";
"XF86AudioLowerVolume" = "exec ${services.avizo.package}/bin/volumectl -u - 5";
## Playback
"XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
"XF86AudioStop" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
"XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
"XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next";
## Brightness
"XF86MonBrightnessUp" = "exec ${services.avizo.package}/bin/lightctl + 5";
"XF86MonBrightnessDown" = "exec ${services.avizo.package}/bin/lightctl - 5";
# System utilities
"${modifier}+F1" = "exec ${programs.swaylock.package}/bin/swaylock --screenshots --clock --indicator --grace-no-mouse";
"${modifier}+z" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw";
"${modifier}+Shift+z" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -d -sw";
# "${modifier}+s" = "exec ${withTerm {
# progname = "btm";
# args = "--autohide_time --battery --celsius --enable_cache_memory --enable_gpu_memory --group --hide_avg_cpu --hide_table_gap --retention=3m --show_table_scroll_position";
# }}";
# "${modifier}+c" = "exec ${withTerm {progname = "cava";}}"
# Program shortcuts
"${modifier}+e" = "exec ${programs.emacs.finalPackage}/bin/emacsclient -c";
"${modifier}+w" = "exec ${programs.firefox.package}/bin/firefox";
"${modifier}+f" = "exec ${pkgs.xfce.thunar}/bin/thunar";
};
};
extraConfig = ''

View file

@ -1,12 +1,14 @@
{...}: {
wayland.windowManager.hyprland.settings = {
workspace = [
"4, monitor:desc:Ancor Communications Inc VS278 FALMQS032358"
"5, monitor:desc:Acer Technologies ED270R TJMEE0043W01"
];
monitor = [
"desc:Acer Technologies ED270R TJMEE0043W01,highrr,0x0,1.00,vrr,2"
"desc:Ancor Communications Inc VS278 FALMQS032358,preferred,-1920x0,1.00,vrr,0"
];
wayland.windowManager.sway.config = {
output = {
"Acer Technologies ED270R TJMEE0043W01" = {
mode = "1920x1080@165Hz";
pos = "1920 0";
adaptive_sync = "off";
};
"Ancor Communications Inc VS278 FALMQS032358" = {
pos = "0 0";
};
};
};
}