changes to niri

This commit is contained in:
Sean Kovacs 2026-01-15 17:06:17 -05:00
commit ac2c321e1c
Signed by: sckova
GPG key ID: 00F325187C68651A
3 changed files with 3 additions and 67 deletions

View file

@ -1,19 +1,9 @@
{ {pkgs, ...}: {
config,
pkgs,
...
}: let
catppuccin-fuzzel = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "fuzzel";
rev = "0af0e26901b60ada4b20522df739f032797b07c3";
sha256 = "sha256-XpItMGsYq4XvLT+7OJ9YRILfd/9RG1GMuO6J4hSGepg=";
};
in {
imports = [ imports = [
./niri.nix ./niri.nix
./noctalia.nix ./noctalia.nix
]; ];
home.packages = with pkgs; [ home.packages = with pkgs; [
xdg-desktop-portal xdg-desktop-portal
brightnessctl brightnessctl
@ -24,14 +14,6 @@ in {
playerctl playerctl
]; ];
home.file = {
".config/niri/scripts" = {
source = ./scripts;
recursive = true;
force = true;
};
};
xsession = { xsession = {
enable = true; enable = true;
windowManager.command = "niri"; windowManager.command = "niri";

View file

@ -50,7 +50,7 @@
}; };
outputs = { outputs = {
"eDP-1" = { "eDP-1" = {
scale = 1.66666; scale = 1.5;
}; };
"HDMI-A-1" = { "HDMI-A-1" = {
mode = { mode = {

View file

@ -1,46 +0,0 @@
#!/usr/bin/env bash
WAYBAR_SIGNAL=8 # SIGRTMIN+8
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <integer -100..100>" >&2
exit 1
fi
value="$1"
# Validate integer range
if ! [[ "$value" =~ ^-?[0-9]+$ ]] || [ "$value" -lt -100 ] || [ "$value" -gt 100 ]; then
echo "Error: argument must be an integer between -100 and 100" >&2
exit 1
fi
# Determine which brightness control tool to use
if command -v ddcutil >/dev/null 2>&1; then
# Get current brightness
current=$(ddcutil getvcp 10 | grep -oP 'current value =\s+\K\d+')
if [ -z "$current" ]; then
echo "Error: failed to read current brightness from ddcutil" >&2
exit 1
fi
# Calculate new brightness (ddcutil uses absolute 0-100 scale)
new=$((current + value))
# Clamp to valid range
[ "$new" -lt 0 ] && new=0
[ "$new" -gt 100 ] && new=100
# Set new brightness
ddcutil setvcp 10 "$new" >/dev/null 2>&1
else
# Fallback to brightnessctl
if [ "$value" -gt 0 ]; then
brightnessctl s "+${value}%" >/dev/null
elif [ "$value" -lt 0 ]; then
brightnessctl s "${value#-}%-" >/dev/null
fi
fi
# Notify Waybar to refresh
pkill -RTMIN+"$WAYBAR_SIGNAL" waybar