Anthony Rodriguez
d0466f96da
commit75cf6a4d67
Author: Anthony Rodriguez <anthony@nezia.dev> Date: Fri Oct 11 15:34:14 2024 +0200 home/programs/niri: use gtk portals for most things, and gnome for screencast commit5ccb424079
Author: Anthony Rodriguez <anthony@nezia.dev> Date: Thu Oct 10 21:19:33 2024 +0200 home/programs/niri: add play/pause, add settings button on fn key f12 commit8b7164739d
Author: Anthony Rodriguez <anthony@nezia.dev> Date: Thu Oct 10 00:32:40 2024 +0200 home/programs/niri: replace desktop-portal-gtk with gnome commitfe40c6c72c
Author: Anthony Rodriguez <anthony@nezia.dev> Date: Thu Oct 10 00:21:31 2024 +0200 home/programs/niri: add xdg-desktop-portal-gtk commit74b7df1245
Author: Anthony Rodriguez <anthony@nezia.dev> Date: Thu Oct 10 00:21:14 2024 +0200 home/programs: add fractal commit3773095069
Author: Anthony Rodriguez <anthony@nezia.dev> Date: Thu Oct 10 00:21:05 2024 +0200 home/programs/gtk: use color-scheme for gtk4.0 commit8fef768f4f
Author: Anthony Rodriguez <anthony@nezia.dev> Date: Wed Oct 9 19:22:43 2024 +0200 system/services/regreet: ensure that regreet starts dbus session commitfcd88bfa8e
Author: Anthony Rodriguez <anthony@nezia.dev> Date: Wed Oct 9 19:22:20 2024 +0200 repo: implement ags Implement ags, a wayland bar / GTK shell. Also added a few dependencies required for it to work properly.
159 lines
7.8 KiB
Nix
159 lines
7.8 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}: let
|
|
appLauncher = "fuzzel";
|
|
terminal = "foot";
|
|
prefix = "Alt";
|
|
in {
|
|
programs.niri.settings.binds = {
|
|
"${prefix}+D".action.spawn = appLauncher;
|
|
"${prefix}+Return".action.spawn = terminal;
|
|
"${prefix}+Shift+E".action.quit.skip-confirmation = true;
|
|
"${prefix}+Shift+Slash".action = config.lib.niri.actions.show-hotkey-overlay;
|
|
"${prefix}+Q".action = config.lib.niri.actions.close-window;
|
|
"${prefix}+F".action = config.lib.niri.actions.maximize-column;
|
|
"${prefix}+Shift+F".action = config.lib.niri.actions.fullscreen-window;
|
|
"${prefix}+C".action = config.lib.niri.actions.center-column;
|
|
|
|
# Focus
|
|
"${prefix}+Left".action = config.lib.niri.actions.focus-column-left;
|
|
"${prefix}+Down".action = config.lib.niri.actions.focus-window-down;
|
|
"${prefix}+Up".action = config.lib.niri.actions.focus-window-up;
|
|
"${prefix}+Right".action = config.lib.niri.actions.focus-column-right;
|
|
"${prefix}+H".action = config.lib.niri.actions.focus-column-left;
|
|
"${prefix}+J".action = config.lib.niri.actions.focus-window-down;
|
|
"${prefix}+K".action = config.lib.niri.actions.focus-window-up;
|
|
"${prefix}+L".action = config.lib.niri.actions.focus-column-right;
|
|
"${prefix}+Home".action = config.lib.niri.actions.focus-column-first;
|
|
"${prefix}+End".action = config.lib.niri.actions.focus-column-last;
|
|
|
|
# Move
|
|
"${prefix}+Ctrl+Left".action = config.lib.niri.actions.move-column-left;
|
|
"${prefix}+Ctrl+Down".action = config.lib.niri.actions.move-window-down;
|
|
"${prefix}+Ctrl+Up".action = config.lib.niri.actions.move-window-up;
|
|
"${prefix}+Ctrl+Right".action = config.lib.niri.actions.move-column-right;
|
|
"${prefix}+Ctrl+H".action = config.lib.niri.actions.move-column-left;
|
|
"${prefix}+Ctrl+J".action = config.lib.niri.actions.move-window-down;
|
|
"${prefix}+Ctrl+K".action = config.lib.niri.actions.move-window-up;
|
|
"${prefix}+Ctrl+L".action = config.lib.niri.actions.move-column-right;
|
|
"${prefix}+Ctrl+Home".action = config.lib.niri.actions.move-column-to-first;
|
|
"${prefix}+Ctrl+End".action = config.lib.niri.actions.move-column-to-last;
|
|
|
|
# Monitor focus
|
|
"${prefix}+Shift+Left".action = config.lib.niri.actions.focus-monitor-left;
|
|
"${prefix}+Shift+Down".action = config.lib.niri.actions.focus-monitor-down;
|
|
"${prefix}+Shift+Up".action = config.lib.niri.actions.focus-monitor-up;
|
|
"${prefix}+Shift+Right".action = config.lib.niri.actions.focus-monitor-right;
|
|
"${prefix}+Shift+H".action = config.lib.niri.actions.focus-monitor-left;
|
|
"${prefix}+Shift+J".action = config.lib.niri.actions.focus-monitor-down;
|
|
"${prefix}+Shift+K".action = config.lib.niri.actions.focus-monitor-up;
|
|
"${prefix}+Shift+L".action = config.lib.niri.actions.focus-monitor-right;
|
|
|
|
# Move to monitor
|
|
"${prefix}+Shift+Ctrl+Left".action = config.lib.niri.actions.move-column-to-monitor-left;
|
|
"${prefix}+Shift+Ctrl+Down".action = config.lib.niri.actions.move-column-to-monitor-down;
|
|
"${prefix}+Shift+Ctrl+Up".action = config.lib.niri.actions.move-column-to-monitor-up;
|
|
"${prefix}+Shift+Ctrl+Right".action = config.lib.niri.actions.move-column-to-monitor-right;
|
|
"${prefix}+Shift+Ctrl+H".action = config.lib.niri.actions.move-column-to-monitor-left;
|
|
"${prefix}+Shift+Ctrl+J".action = config.lib.niri.actions.move-column-to-monitor-down;
|
|
"${prefix}+Shift+Ctrl+K".action = config.lib.niri.actions.move-column-to-monitor-up;
|
|
"${prefix}+Shift+Ctrl+L".action = config.lib.niri.actions.move-column-to-monitor-right;
|
|
|
|
# Workspace navigation
|
|
"${prefix}+Page_Down".action = config.lib.niri.actions.focus-workspace-down;
|
|
"${prefix}+Page_Up".action = config.lib.niri.actions.focus-workspace-up;
|
|
"${prefix}+U".action = config.lib.niri.actions.focus-workspace-down;
|
|
"${prefix}+I".action = config.lib.niri.actions.focus-workspace-up;
|
|
"${prefix}+Ctrl+Page_Down".action = config.lib.niri.actions.move-column-to-workspace-down;
|
|
"${prefix}+Ctrl+Page_Up".action = config.lib.niri.actions.move-column-to-workspace-up;
|
|
"${prefix}+Ctrl+U".action = config.lib.niri.actions.move-column-to-workspace-down;
|
|
"${prefix}+Ctrl+I".action = config.lib.niri.actions.move-column-to-workspace-up;
|
|
"${prefix}+Shift+Page_Down".action = config.lib.niri.actions.move-workspace-down;
|
|
"${prefix}+Shift+Page_Up".action = config.lib.niri.actions.move-workspace-up;
|
|
"${prefix}+Shift+U".action = config.lib.niri.actions.move-workspace-down;
|
|
|
|
# Workspace focus
|
|
"${prefix}+1".action.focus-workspace = 1;
|
|
"${prefix}+2".action.focus-workspace = 2;
|
|
"${prefix}+3".action.focus-workspace = 3;
|
|
"${prefix}+4".action.focus-workspace = 4;
|
|
"${prefix}+5".action.focus-workspace = 5;
|
|
"${prefix}+6".action.focus-workspace = 6;
|
|
"${prefix}+7".action.focus-workspace = 7;
|
|
"${prefix}+8".action.focus-workspace = 8;
|
|
"${prefix}+9".action.focus-workspace = 9;
|
|
|
|
# Move to workspace
|
|
"${prefix}+Ctrl+1".action.move-column-to-workspace = 1;
|
|
"${prefix}+Ctrl+2".action.move-column-to-workspace = 2;
|
|
"${prefix}+Ctrl+3".action.move-column-to-workspace = 3;
|
|
"${prefix}+Ctrl+4".action.move-column-to-workspace = 4;
|
|
"${prefix}+Ctrl+5".action.move-column-to-workspace = 5;
|
|
"${prefix}+Ctrl+6".action.move-column-to-workspace = 6;
|
|
"${prefix}+Ctrl+7".action.move-column-to-workspace = 7;
|
|
"${prefix}+Ctrl+8".action.move-column-to-workspace = 8;
|
|
"${prefix}+Ctrl+9".action.move-column-to-workspace = 9;
|
|
"${prefix}+Shift+I".action = config.lib.niri.actions.move-workspace-up;
|
|
|
|
# Window management
|
|
"${prefix}+Comma".action = config.lib.niri.actions.consume-window-into-column;
|
|
"${prefix}+Period".action = config.lib.niri.actions.expel-window-from-column;
|
|
"${prefix}+BracketLeft".action = config.lib.niri.actions.consume-or-expel-window-left;
|
|
"${prefix}+BracketRight".action = config.lib.niri.actions.consume-or-expel-window-right;
|
|
|
|
# Column management
|
|
"${prefix}+R".action = config.lib.niri.actions.switch-preset-column-width;
|
|
"${prefix}+Shift+R".action = config.lib.niri.actions.switch-preset-window-height;
|
|
"${prefix}+Ctrl+R".action = config.lib.niri.actions.reset-window-height;
|
|
"${prefix}+Minus".action = config.lib.niri.actions.set-column-width "-10%";
|
|
"${prefix}+Equal".action = config.lib.niri.actions.set-column-width "+10%";
|
|
"${prefix}+Shift+Minus".action = config.lib.niri.actions.set-window-height "-10%";
|
|
"${prefix}+Shift+Equal".action = config.lib.niri.actions.set-window-height "+10%";
|
|
|
|
# Screenshots
|
|
"Print".action = config.lib.niri.actions.screenshot-screen;
|
|
"Ctrl+Print".action = config.lib.niri.actions.screenshot;
|
|
|
|
# System
|
|
"${prefix}+Mod+L".action.spawn = [
|
|
"${lib.getExe' pkgs.systemd "loginctl"}"
|
|
"lock-session"
|
|
];
|
|
|
|
# Media keys
|
|
"XF86AudioRaiseVolume" = {
|
|
action.spawn = ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"];
|
|
allow-when-locked = true;
|
|
};
|
|
"XF86AudioLowerVolume" = {
|
|
action.spawn = ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"];
|
|
allow-when-locked = true;
|
|
};
|
|
"XF86AudioMute" = {
|
|
action.spawn = ["wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"];
|
|
allow-when-locked = true;
|
|
};
|
|
"XF86AudioMicMute" = {
|
|
action.spawn = ["wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"];
|
|
allow-when-locked = true;
|
|
};
|
|
"XF86AudioPlay" = {
|
|
action.spawn = ["playerctl" "play-pause"];
|
|
};
|
|
"XF86MonBrightnessUp" = {
|
|
action.spawn = ["brillo" "-q" "-u 300000" "-A 5"];
|
|
allow-when-locked = true;
|
|
};
|
|
"XF86MonBrightnessDown" = {
|
|
action.spawn = ["brillo" "-q" "-u 300000" "-U 5"];
|
|
allow-when-locked = true;
|
|
};
|
|
# set on media key since framework laptops have a gear as the button label
|
|
"XF86AudioMedia" = {
|
|
action.spawn = ["sh" "-c" "env XDG_CURRENT_DESKTOP=gnome gnome-control-center"];
|
|
};
|
|
};
|
|
}
|