changes to niri
This commit is contained in:
parent
6486eb7eb7
commit
ac2c321e1c
3 changed files with 3 additions and 67 deletions
|
|
@ -1,19 +1,9 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
catppuccin-fuzzel = pkgs.fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "fuzzel";
|
||||
rev = "0af0e26901b60ada4b20522df739f032797b07c3";
|
||||
sha256 = "sha256-XpItMGsYq4XvLT+7OJ9YRILfd/9RG1GMuO6J4hSGepg=";
|
||||
};
|
||||
in {
|
||||
{pkgs, ...}: {
|
||||
imports = [
|
||||
./niri.nix
|
||||
./noctalia.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
xdg-desktop-portal
|
||||
brightnessctl
|
||||
|
|
@ -24,14 +14,6 @@ in {
|
|||
playerctl
|
||||
];
|
||||
|
||||
home.file = {
|
||||
".config/niri/scripts" = {
|
||||
source = ./scripts;
|
||||
recursive = true;
|
||||
force = true;
|
||||
};
|
||||
};
|
||||
|
||||
xsession = {
|
||||
enable = true;
|
||||
windowManager.command = "niri";
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
};
|
||||
outputs = {
|
||||
"eDP-1" = {
|
||||
scale = 1.66666;
|
||||
scale = 1.5;
|
||||
};
|
||||
"HDMI-A-1" = {
|
||||
mode = {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue