Add more Niri hotkeys

This commit is contained in:
Jimbo 2024-12-05 14:40:12 -05:00
parent 032439e4dc
commit 66300cae57
8 changed files with 29 additions and 37 deletions

2
.gitattributes vendored
View file

@ -1 +1 @@
variables/secrets/** filter=git-crypt diff=git-crypt modules/extras/variables/secrets/** filter=git-crypt diff=git-crypt

View file

@ -1,6 +1,5 @@
{ ... }: { ... }:
{ {
home-manager.users.jimbo = { home-manager.users.jimbo = {
}; };
} }

View file

@ -1,25 +1,5 @@
{ lib, ... }: { ... }:
{ {
options.home = {
sway.enable = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Enable SwayWM";
};
niri = {
enable = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Enable SwayWM";
};
settings = lib.mkOption {
type = lib.types.attrs;
default = {};
};
};
};
imports = [ imports = [
./niri ./niri
./programs ./programs

View file

@ -1,4 +1,4 @@
{ config, ... }: { config, lib, ... }:
{ {
imports = [ imports = [
./autostart ./autostart
@ -10,7 +10,12 @@
./theme ./theme
]; ];
home.file.".config/niri/config.kdl".text = '' options.home.niri.settings = lib.mkOption {
type = lib.types.attrs;
default = {};
};
config.home.file.".config/niri/config.kdl".text = ''
${builtins.readFile config.home.niri.settings.autostart} ${builtins.readFile config.home.niri.settings.autostart}
${builtins.readFile config.home.niri.settings.hotkeys} ${builtins.readFile config.home.niri.settings.hotkeys}
${builtins.readFile config.home.niri.settings.inputs} ${builtins.readFile config.home.niri.settings.inputs}

View file

@ -144,6 +144,7 @@
${primeMod}+Shift+f { fullscreen-window; } ${primeMod}+Shift+f { fullscreen-window; }
// Niri specific // Niri specific
${primeMod}+r { switch-preset-column-width; }
${primeMod}+Shift+r { reset-window-height; } ${primeMod}+Shift+r { reset-window-height; }
${primeMod}+Shift+c { center-column; } ${primeMod}+Shift+c { center-column; }
} }

View file

@ -4,19 +4,25 @@
prefer-no-csd prefer-no-csd
layout { layout {
gaps 7
center-focused-column "never"
default-column-width { proportion 0.5; }
focus-ring {
off
}
border { border {
width 3 width 3
active-color "#${config.look.colors.prime}" active-color "#${config.look.colors.prime}"
inactive-color "#${config.look.colors.split}" inactive-color "#${config.look.colors.split}"
} }
focus-ring {
off
}
gaps 7
center-focused-column "never"
default-column-width { proportion 0.5; }
preset-column-widths {
proportion 0.33333
proportion 0.5
proportion 0.66667
}
} }
''; '';
} }

View file

@ -87,11 +87,10 @@
# Clocks # Clocks
longClockModule = { longClockModule = {
exec = pkgs.writeScript "longClock" '' exec = pkgs.writeScript "longClock" ''
time=$(date +'%a %b %d %l:%M:%S%p' | tr -s ' ') time=$(date +'%a %b %-d %-I:%M:%S%p')
date=$(date "+%Y-%m-%d") date=$(date "+%Y-%m-%d")
echo "{\"text\":\" $time\",\"tooltip\":\"$date\"}" echo "{\"text\":\" $time\",\"tooltip\":\"$date\"}"
''; '';
on-click = ''wl-copy $(date "+%Y-%m-%d-%H%M%S"); notify-send "Date copied."'';
format = "{}"; format = "{}";
return-type = "json"; return-type = "json";
interval = 1; interval = 1;
@ -100,7 +99,6 @@
shortClockModule = { shortClockModule = {
exec = "echo ' '$(date +'%l:%M%p' | sed 's/^ //')"; exec = "echo ' '$(date +'%l:%M%p' | sed 's/^ //')";
on-click = ''wl-copy $(date "+%Y-%m-%d-%H%M%S"); notify-send "Date copied."'';
interval = 60; interval = 60;
tooltip = false; tooltip = false;
}; };
@ -251,6 +249,7 @@
"bluetooth" = bluetoothModule; "bluetooth" = bluetoothModule;
"network" = networkModule // { interface = "enp*"; }; "network" = networkModule // { interface = "enp*"; };
}; };
display2 = { display2 = {
name = "bar2"; name = "bar2";
position = "top"; position = "top";
@ -282,6 +281,7 @@
"custom/vram" = vramModule; "custom/vram" = vramModule;
"custom/clock-long" = longClockModule; "custom/clock-long" = longClockModule;
}; };
display3 = { display3 = {
name = "bar3"; name = "bar3";
position = "top"; position = "top";
@ -363,6 +363,7 @@
"network" = networkModule; "network" = networkModule;
}; };
}; };
style = '' style = ''
* { * {
border: 0; border: 0;

View file

@ -11,7 +11,7 @@
]; ];
wayland.windowManager.sway = { wayland.windowManager.sway = {
enable = config.home.sway.enable; enable = config.home.desktop.enable;
package = null; package = null;
wrapperFeatures.gtk = true; wrapperFeatures.gtk = true;
checkConfig = false; checkConfig = false;