Add Niri, a scrolling tiling window manager.

This commit is contained in:
Jimbo 2024-12-03 16:50:23 -05:00
parent 325c176464
commit b3d9d2f396
38 changed files with 758 additions and 376 deletions

View file

@ -0,0 +1,28 @@
{ config, ... }:
{
imports = [
./makotoggle
];
services.mako = {
enable = true;
borderColor = "#${config.look.colors.accent}";
backgroundColor = "#${config.look.colors.dark}D9";
output = "${config.displays.d1}";
sort = "+time";
layer = "overlay";
padding = "8";
margin = "0";
borderSize = config.look.border.int;
maxIconSize = 40;
defaultTimeout = 4500;
font = "${config.look.fonts.main} 12";
anchor = "bottom-right";
extraConfig = ''
on-button-right=dismiss-all
outer-margin=10
[mode=do-not-disturb]
invisible=1
'';
};
}

View file

@ -0,0 +1,23 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
(pkgs.writeScriptBin "makotoggle" ''
# Run makoctl mode and store the output in a variable
mode_output=$(makoctl mode)
# Extract the second line after "default"
mode_line=$(echo "$mode_output" | sed -n '/default/{n;p}')
if [[ "$mode_line" == "do-not-disturb" ]]; then
# Notifications are disabled, so we enable them
makoctl mode -r do-not-disturb
notify-send --expire-time=1500 'Notifications Enabled'
else
# Notifications are enabled, so we disable them
notify-send --expire-time=1500 'Notifications Disabled'
sleep 2
makoctl mode -a do-not-disturb
fi
'')
];
}