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 = {
};
}

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 = [
./niri
./programs

View file

@ -1,4 +1,4 @@
{ config, ... }:
{ config, lib, ... }:
{
imports = [
./autostart
@ -10,7 +10,12 @@
./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.hotkeys}
${builtins.readFile config.home.niri.settings.inputs}

View file

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

View file

@ -4,19 +4,25 @@
prefer-no-csd
layout {
gaps 7
center-focused-column "never"
default-column-width { proportion 0.5; }
focus-ring {
off
}
border {
width 3
active-color "#${config.look.colors.prime}"
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
longClockModule = {
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")
echo "{\"text\":\" $time\",\"tooltip\":\"$date\"}"
'';
on-click = ''wl-copy $(date "+%Y-%m-%d-%H%M%S"); notify-send "Date copied."'';
format = "{}";
return-type = "json";
interval = 1;
@ -100,7 +99,6 @@
shortClockModule = {
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;
tooltip = false;
};
@ -251,6 +249,7 @@
"bluetooth" = bluetoothModule;
"network" = networkModule // { interface = "enp*"; };
};
display2 = {
name = "bar2";
position = "top";
@ -282,6 +281,7 @@
"custom/vram" = vramModule;
"custom/clock-long" = longClockModule;
};
display3 = {
name = "bar3";
position = "top";
@ -363,6 +363,7 @@
"network" = networkModule;
};
};
style = ''
* {
border: 0;

View file

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