niri: niphas-screenshot
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
{
|
||||
wrappers,
|
||||
pkgs,
|
||||
screenshotPath ? null,
|
||||
geolocation ? [
|
||||
52.5244
|
||||
13.4105
|
||||
@@ -17,169 +16,158 @@ let
|
||||
|
||||
niri = wrappers.wrapperModules.niri.apply {
|
||||
inherit pkgs;
|
||||
settings = builtins.foldl' lib.recursiveUpdate { } (
|
||||
[
|
||||
{
|
||||
input = {
|
||||
keyboard = {
|
||||
xkb.layout = "de";
|
||||
numlock = null;
|
||||
};
|
||||
touchpad = {
|
||||
tap = null;
|
||||
drag = true;
|
||||
};
|
||||
mouse = null;
|
||||
trackpoint = null;
|
||||
warp-mouse-to-focus = null;
|
||||
focus-follows-mouse = null;
|
||||
settings = builtins.foldl' lib.recursiveUpdate { } ([
|
||||
{
|
||||
input = {
|
||||
keyboard = {
|
||||
xkb.layout = "de";
|
||||
numlock = null;
|
||||
};
|
||||
layout = {
|
||||
gaps = 8;
|
||||
center-focused-column = "never";
|
||||
preset-column-widths = [
|
||||
{ proportion = 1. / 3.; }
|
||||
{ proportion = 1. / 2.; }
|
||||
{ proportion = 2. / 3.; }
|
||||
];
|
||||
default-column-width = {
|
||||
proportion = 1. / 2.;
|
||||
};
|
||||
focus-ring = {
|
||||
width = 2;
|
||||
active-color = colors.active-color;
|
||||
inactive-color = colors.inactive-color;
|
||||
};
|
||||
shadow = {
|
||||
on = null;
|
||||
draw-behind-window = true;
|
||||
softness = 30;
|
||||
spread = 5;
|
||||
color = colors.shadow-color;
|
||||
};
|
||||
touchpad = {
|
||||
tap = null;
|
||||
drag = true;
|
||||
};
|
||||
spawn-at-startup = [
|
||||
(lib.getExe pkgs.niphas-bar)
|
||||
(lib.getExe pkgs.niphas-set-wallpaper)
|
||||
mouse = null;
|
||||
trackpoint = null;
|
||||
warp-mouse-to-focus = null;
|
||||
focus-follows-mouse = null;
|
||||
};
|
||||
layout = {
|
||||
gaps = 8;
|
||||
center-focused-column = "never";
|
||||
preset-column-widths = [
|
||||
{ proportion = 1. / 3.; }
|
||||
{ proportion = 1. / 2.; }
|
||||
{ proportion = 2. / 3.; }
|
||||
];
|
||||
default-column-width = {
|
||||
proportion = 1. / 2.;
|
||||
};
|
||||
focus-ring = {
|
||||
width = 2;
|
||||
active-color = colors.active-color;
|
||||
inactive-color = colors.inactive-color;
|
||||
};
|
||||
shadow = {
|
||||
on = null;
|
||||
draw-behind-window = true;
|
||||
softness = 30;
|
||||
spread = 5;
|
||||
color = colors.shadow-color;
|
||||
};
|
||||
};
|
||||
spawn-at-startup = [
|
||||
(lib.getExe pkgs.niphas-bar)
|
||||
(lib.getExe pkgs.niphas-set-wallpaper)
|
||||
]
|
||||
++ lib.optional (geolocation != null) (
|
||||
let
|
||||
latitude = builtins.elemAt geolocation 0;
|
||||
longitude = builtins.elemAt geolocation 1;
|
||||
in
|
||||
[
|
||||
(lib.getExe pkgs.wlsunset)
|
||||
"-l"
|
||||
(toString latitude)
|
||||
"-L"
|
||||
(toString longitude)
|
||||
]
|
||||
++ lib.optional (geolocation != null) (
|
||||
let
|
||||
latitude = builtins.elemAt geolocation 0;
|
||||
longitude = builtins.elemAt geolocation 1;
|
||||
in
|
||||
[
|
||||
(lib.getExe pkgs.wlsunset)
|
||||
"-l"
|
||||
(toString latitude)
|
||||
"-L"
|
||||
(toString longitude)
|
||||
]
|
||||
);
|
||||
hotkey-overlay.skip-at-startup = null;
|
||||
prefer-no-csd = null;
|
||||
animations.slowdown = 0.5; # twice as fast
|
||||
binds =
|
||||
let
|
||||
wpctl = lib.getExe' pkgs.wireplumber "wpctl";
|
||||
in
|
||||
{
|
||||
"Mod+Shift+Slash".show-hotkey-overlay = null;
|
||||
"Mod+Y".spawn = lib.getExe pkgs.niphas-web-browser;
|
||||
"Mod+T".spawn = lib.getExe pkgs.niphas-file-browser;
|
||||
"Mod+Return".spawn = lib.getExe pkgs.niphas-terminal;
|
||||
"Mod+D".spawn = lib.getExe pkgs.niphas-runner;
|
||||
"Mod+Shift+W".spawn = lib.getExe pkgs.niphas-locker;
|
||||
);
|
||||
hotkey-overlay.skip-at-startup = null;
|
||||
prefer-no-csd = null;
|
||||
animations.slowdown = 0.5; # twice as fast
|
||||
binds =
|
||||
let
|
||||
wpctl = lib.getExe' pkgs.wireplumber "wpctl";
|
||||
in
|
||||
{
|
||||
"Mod+Shift+Slash".show-hotkey-overlay = null;
|
||||
"Mod+Y".spawn = lib.getExe pkgs.niphas-web-browser;
|
||||
"Mod+T".spawn = lib.getExe pkgs.niphas-file-browser;
|
||||
"Mod+Return".spawn = lib.getExe pkgs.niphas-terminal;
|
||||
"Mod+D".spawn = lib.getExe pkgs.niphas-runner;
|
||||
"Mod+Shift+W".spawn = lib.getExe pkgs.niphas-locker;
|
||||
"Print".spawn = lib.getExe pkgs.niphas-screenshot;
|
||||
|
||||
# TODO allow-when-locked
|
||||
"XF86AudioRaiseVolume".spawn-sh = "${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 0.1+ -l 1.0";
|
||||
"XF86AudioLowerVolume".spawn-sh = "${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 0.1-";
|
||||
"XF86AudioMute".spawn-sh = "${wpctl} set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
"XF86AudioMicMute".spawn-sh = "${wpctl} set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
|
||||
"XF86AudioPlay".spawn-sh = "${lib.getExe pkgs.playerctl} play-pause";
|
||||
"XF86AudioStop".spawn-sh = "${lib.getExe pkgs.playerctl} stop";
|
||||
"XF86AudioPrev".spawn-sh = "${lib.getExe pkgs.playerctl} previous";
|
||||
"XF86AudioNext".spawn-sh = "${lib.getExe pkgs.playerctl} next";
|
||||
"XF86MonBrightnessUp".spawn-sh = "${lib.getExe pkgs.brightnessctl} --class=backlight set +25%";
|
||||
"XF86MonBrightnessDown".spawn-sh = "${lib.getExe pkgs.brightnessctl} --class=backlight set 25%-";
|
||||
# TODO allow-when-locked
|
||||
"XF86AudioRaiseVolume".spawn-sh = "${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 0.1+ -l 1.0";
|
||||
"XF86AudioLowerVolume".spawn-sh = "${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 0.1-";
|
||||
"XF86AudioMute".spawn-sh = "${wpctl} set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
"XF86AudioMicMute".spawn-sh = "${wpctl} set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
|
||||
"XF86AudioPlay".spawn-sh = "${lib.getExe pkgs.playerctl} play-pause";
|
||||
"XF86AudioStop".spawn-sh = "${lib.getExe pkgs.playerctl} stop";
|
||||
"XF86AudioPrev".spawn-sh = "${lib.getExe pkgs.playerctl} previous";
|
||||
"XF86AudioNext".spawn-sh = "${lib.getExe pkgs.playerctl} next";
|
||||
"XF86MonBrightnessUp".spawn-sh = "${lib.getExe pkgs.brightnessctl} --class=backlight set +25%";
|
||||
"XF86MonBrightnessDown".spawn-sh = "${lib.getExe pkgs.brightnessctl} --class=backlight set 25%-";
|
||||
|
||||
# TODO repeat=false
|
||||
"Mod+O".toggle-overview = null;
|
||||
"Mod+Shift+Q".close-window = null;
|
||||
# TODO repeat=false
|
||||
"Mod+O".toggle-overview = null;
|
||||
"Mod+Shift+Q".close-window = null;
|
||||
|
||||
"Mod+H".focus-column-left = null;
|
||||
"Mod+J".focus-window-or-workspace-down = null;
|
||||
"Mod+K".focus-window-or-workspace-up = null;
|
||||
"Mod+L".focus-column-right = null;
|
||||
"Mod+Shift+H".move-column-left = null;
|
||||
"Mod+Shift+J".move-window-down-or-to-workspace-down = null;
|
||||
"Mod+Shift+K".move-window-up-or-to-workspace-up = null;
|
||||
"Mod+Shift+L".move-column-right = null;
|
||||
"Mod+Home".focus-column-first = null;
|
||||
"Mod+End".focus-column-last = null;
|
||||
"Mod+Shift+Home".move-column-to-first = null;
|
||||
"Mod+Shift+End".move-column-to-last = null;
|
||||
"Mod+H".focus-column-left = null;
|
||||
"Mod+J".focus-window-or-workspace-down = null;
|
||||
"Mod+K".focus-window-or-workspace-up = null;
|
||||
"Mod+L".focus-column-right = null;
|
||||
"Mod+Shift+H".move-column-left = null;
|
||||
"Mod+Shift+J".move-window-down-or-to-workspace-down = null;
|
||||
"Mod+Shift+K".move-window-up-or-to-workspace-up = null;
|
||||
"Mod+Shift+L".move-column-right = null;
|
||||
"Mod+Home".focus-column-first = null;
|
||||
"Mod+End".focus-column-last = null;
|
||||
"Mod+Shift+Home".move-column-to-first = null;
|
||||
"Mod+Shift+End".move-column-to-last = null;
|
||||
|
||||
# TODO cooldown-ms=150
|
||||
"Mod+WheelScrollDown".focus-workspace-down = null;
|
||||
"Mod+WheelScrollUp".focus-workspace-up = null;
|
||||
"Mod+Shift+WheelScrollDown".move-column-to-workspace-down = null;
|
||||
"Mod+Shift+WheelScrollUp".move-column-to-workspace-up = null;
|
||||
# TODO cooldown-ms=150
|
||||
"Mod+WheelScrollDown".focus-workspace-down = null;
|
||||
"Mod+WheelScrollUp".focus-workspace-up = null;
|
||||
"Mod+Shift+WheelScrollDown".move-column-to-workspace-down = null;
|
||||
"Mod+Shift+WheelScrollUp".move-column-to-workspace-up = null;
|
||||
|
||||
"Mod+WheelScrollRight".focus-column-right = null;
|
||||
"Mod+WheelScrollLeft".focus-column-left = null;
|
||||
"Mod+Shift+WheelScrollRight".move-column-right = null;
|
||||
"Mod+Shift+WheelScrollLeft".move-column-left = null;
|
||||
"Mod+WheelScrollRight".focus-column-right = null;
|
||||
"Mod+WheelScrollLeft".focus-column-left = null;
|
||||
"Mod+Shift+WheelScrollRight".move-column-right = null;
|
||||
"Mod+Shift+WheelScrollLeft".move-column-left = null;
|
||||
|
||||
"Mod+1".focus-workspace = 1;
|
||||
"Mod+2".focus-workspace = 2;
|
||||
"Mod+3".focus-workspace = 3;
|
||||
"Mod+4".focus-workspace = 4;
|
||||
"Mod+5".focus-workspace = 5;
|
||||
"Mod+6".focus-workspace = 6;
|
||||
"Mod+7".focus-workspace = 7;
|
||||
"Mod+8".focus-workspace = 8;
|
||||
"Mod+9".focus-workspace = 9;
|
||||
"Mod+Shift+1".move-window-to-workspace = 1;
|
||||
"Mod+Shift+2".move-window-to-workspace = 2;
|
||||
"Mod+Shift+3".move-window-to-workspace = 3;
|
||||
"Mod+Shift+4".move-window-to-workspace = 4;
|
||||
"Mod+Shift+5".move-window-to-workspace = 5;
|
||||
"Mod+Shift+6".move-window-to-workspace = 6;
|
||||
"Mod+Shift+7".move-window-to-workspace = 7;
|
||||
"Mod+Shift+8".move-window-to-workspace = 8;
|
||||
"Mod+Shift+9".move-window-to-workspace = 9;
|
||||
"Mod+Tab".focus-workspace-previous = null;
|
||||
"Mod+Comma".consume-window-into-column = null;
|
||||
"Mod+Period".expel-window-from-column = null;
|
||||
"Mod+R".switch-preset-column-width = null;
|
||||
"Mod+F".maximize-column = null;
|
||||
"Mod+Shift+F".fullscreen-window = null;
|
||||
"Mod+Ctrl+F".expand-column-to-available-width = null;
|
||||
"Mod+Minus".set-column-width = "-10%";
|
||||
"Mod+Plus".set-column-width = "+10%";
|
||||
"Mod+1".focus-workspace = 1;
|
||||
"Mod+2".focus-workspace = 2;
|
||||
"Mod+3".focus-workspace = 3;
|
||||
"Mod+4".focus-workspace = 4;
|
||||
"Mod+5".focus-workspace = 5;
|
||||
"Mod+6".focus-workspace = 6;
|
||||
"Mod+7".focus-workspace = 7;
|
||||
"Mod+8".focus-workspace = 8;
|
||||
"Mod+9".focus-workspace = 9;
|
||||
"Mod+Shift+1".move-window-to-workspace = 1;
|
||||
"Mod+Shift+2".move-window-to-workspace = 2;
|
||||
"Mod+Shift+3".move-window-to-workspace = 3;
|
||||
"Mod+Shift+4".move-window-to-workspace = 4;
|
||||
"Mod+Shift+5".move-window-to-workspace = 5;
|
||||
"Mod+Shift+6".move-window-to-workspace = 6;
|
||||
"Mod+Shift+7".move-window-to-workspace = 7;
|
||||
"Mod+Shift+8".move-window-to-workspace = 8;
|
||||
"Mod+Shift+9".move-window-to-workspace = 9;
|
||||
"Mod+Tab".focus-workspace-previous = null;
|
||||
"Mod+Comma".consume-window-into-column = null;
|
||||
"Mod+Period".expel-window-from-column = null;
|
||||
"Mod+R".switch-preset-column-width = null;
|
||||
"Mod+F".maximize-column = null;
|
||||
"Mod+Shift+F".fullscreen-window = null;
|
||||
"Mod+Ctrl+F".expand-column-to-available-width = null;
|
||||
"Mod+Minus".set-column-width = "-10%";
|
||||
"Mod+Plus".set-column-width = "+10%";
|
||||
|
||||
"Mod+V".toggle-window-floating = null;
|
||||
"Mod+Shift+V".switch-focus-between-floating-and-tiling = null;
|
||||
"Mod+V".toggle-window-floating = null;
|
||||
"Mod+Shift+V".switch-focus-between-floating-and-tiling = null;
|
||||
|
||||
# allow-inhibiting=false
|
||||
"Mod+Escape".toggle-keyboard-shortcuts-inhibit = null;
|
||||
# allow-inhibiting=false
|
||||
"Mod+Escape".toggle-keyboard-shortcuts-inhibit = null;
|
||||
|
||||
"Mod+Shift+E".quit = null;
|
||||
"Ctrl+Alt+Delete".quit = null;
|
||||
};
|
||||
}
|
||||
]
|
||||
++ lib.optional (screenshotPath != null) [
|
||||
{
|
||||
screenshot-path = screenshotPath;
|
||||
binds = {
|
||||
"Print".screenshot = null;
|
||||
"Ctrl+Print".screenshot-screen = null;
|
||||
"Alt+Print".screenshot-window = null;
|
||||
"Mod+Shift+E".quit = null;
|
||||
"Ctrl+Alt+Delete".quit = null;
|
||||
};
|
||||
}
|
||||
]
|
||||
);
|
||||
}
|
||||
]);
|
||||
};
|
||||
in
|
||||
niri.wrapper
|
||||
|
||||
Reference in New Issue
Block a user