Refines Hyprland configuration and scripts

- Updates monitor identifiers for consistency (DP-3 to DP-1)
- Enhances brightness script with dynamic bus list and ddcutil integration
- Adds new window rules for specific overlay dialogs
- Fixes font package reference for better maintainability
- Consolidates firmware handling to enable all types
- Improves configuration clarity and functionality across multiple components.
This commit is contained in:
Chris Toph 2025-04-20 13:29:50 -04:00
parent 0d58cef9d8
commit a36fc85699
8 changed files with 24 additions and 22 deletions

View file

@ -27,7 +27,7 @@ let
launcher = "${pkgs.walker}/bin/walker --modules applications,ssh"; launcher = "${pkgs.walker}/bin/walker --modules applications,ssh";
pactl = lib.getExe' pkgs.pulseaudio "pactl"; pactl = lib.getExe' pkgs.pulseaudio "pactl";
terminal = exec (import ./scripts/terminal.nix { inherit pkgs; }); terminal = exec (import ./scripts/terminal.nix { inherit pkgs; });
brightness = exec (import ./scripts/brightness.nix { inherit pkgs; }); brightness = exec (import ./scripts/brightness.nix { inherit pkgs lib; });
## Long ass keys ## ## Long ass keys ##
lowerVol = "XF86AudioLowerVolume"; lowerVol = "XF86AudioLowerVolume";

View file

@ -45,7 +45,7 @@
jump_labels_keys = "qwfpgarstd"; jump_labels_keys = "qwfpgarstd";
# monitor_options = '' # monitor_options = ''
# ( # (
# DP-3 = ( # DP-1 = (
# mode = row; # mode = row;
# column_default_width = onehalf; # column_default_width = onehalf;
# column_widths = onehalf onethird twothirds threefourths; # column_widths = onehalf onethird twothirds threefourths;
@ -60,7 +60,7 @@
# window_heights = seveneighths onehalf onethird twothirds # window_heights = seveneighths onehalf onethird twothirds
# ), # ),
# )''; # )'';
monitor_options = "(DP-3 = (mode = row;column_default_width = onehalf;column_widths = seveneighths threequarters twothirds onehalf onethird;window_default_height = one;window_heights = one seveneighths twothirds onehalf onethird),HDMI-A-2 = (mode = col; column_default_width = one;column_widths = one onehalf;window_default_height = twothirds;window_heights = seveneighths twothirds onehalf onethird),)"; monitor_options = "(DP-1 = (mode = row;column_default_width = onehalf;column_widths = seveneighths threequarters twothirds onehalf onethird;window_default_height = one;window_heights = one seveneighths twothirds onehalf onethird),HDMI-A-2 = (mode = col; column_default_width = one;column_widths = one onehalf;window_default_height = twothirds;window_heights = seveneighths twothirds onehalf onethird),)";
}; };
}; };
}; };

View file

@ -100,6 +100,8 @@ in
"opaque, initialClass:^(Ryujinx)$" "opaque, initialClass:^(Ryujinx)$"
"immediate, initialClass:^(Ryujinx)$" "immediate, initialClass:^(Ryujinx)$"
"workspace 3, initialClass:^(Ryujinx)$" "workspace 3, initialClass:^(Ryujinx)$"
"float, initialTitle:^(ContentDialogOverlayWindow)$"
"center, initialTitle:^(ContentDialogOverlayWindow)$"
## Steam rules ## ## Steam rules ##
"opaque, initialClass:^([Gg]amescope)$" "opaque, initialClass:^([Gg]amescope)$"

View file

@ -1,7 +1,15 @@
{ { pkgs, lib, ... }:
pkgs,
... let
}: # Define your I2C bus numbers
# Couldnt find a non hardcoded way to get the bus numbers :(
busesList = [
6
9
];
busesStr = lib.concatStringsSep " " (map toString busesList);
in
pkgs.writeScript "brightness-control" '' pkgs.writeScript "brightness-control" ''
#!/usr/bin/env fish #!/usr/bin/env fish
@ -17,7 +25,7 @@ pkgs.writeScript "brightness-control" ''
end end
set option $argv[1] set option $argv[1]
set value $argv[2] set value $argv[2]
if test "$option" = "--up" -o "$option" = "+" if test "$option" = "--up" -o "$option" = "+"
set op "+" set op "+"
@ -28,11 +36,11 @@ pkgs.writeScript "brightness-control" ''
exit 1 exit 1
end end
# Hardcoded bus numbers from ddcutil detect. Adjust if necessary. # Hard-coded bus list:
set buses 10 11 set buses ${busesStr}
for bus in $buses for bus in $buses
echo "Changing brightness on bus $bus: ddcutil setvcp 10 $op $value --bus $bus" echo "Changing brightness on bus $bus: ddcutil setvcp 10 $op $value --bus $bus"
ddcutil setvcp 10 $op $value --bus $bus ${pkgs.ddcutil}/bin/ddcutil setvcp 10 $op $value --bus $bus
end end
'' ''

View file

@ -5,9 +5,6 @@
... ...
}: }:
let let
path = lib.custom.relativeToRoot "pkgs/common/monocraft-nerd-fonts/package.nix";
monocraft-nerd-fonts = pkgs.callPackage path { inherit pkgs; };
qogir = pkgs.qogir-icon-theme.override { qogir = pkgs.qogir-icon-theme.override {
colorVariants = [ colorVariants = [
"dark" "dark"
@ -42,7 +39,7 @@ in
}; };
monospace = { monospace = {
package = monocraft-nerd-fonts; package = pkgs.monocraft-nerd-fonts;
name = "Monocraft"; name = "Monocraft";
}; };

View file

@ -50,7 +50,7 @@
monitors = [ monitors = [
{ {
name = "DP-3"; name = "DP-1";
x = 900; x = 900;
y = 0; y = 0;
width = 3840; width = 3840;

View file

@ -66,8 +66,7 @@ in
## SUDO and Terminal ## ## SUDO and Terminal ##
# Database for aiding terminal-based programs # Database for aiding terminal-based programs
environment.enableAllTerminfo = true; environment.enableAllTerminfo = true;
# Enable firmware with a license allowing redistribution hardware.enableAllFirmware = true;
hardware.enableRedistributableFirmware = true;
security.sudo = { security.sudo = {
extraRules = [ extraRules = [

View file

@ -1,8 +1,4 @@
{ pkgs, lib, ... }: { pkgs, lib, ... }:
let
path = lib.custom.relativeToRoot "pkgs/common/monocraft-nerd-fonts/package.nix";
monocraft-nerd-fonts = pkgs.callPackage path { inherit pkgs; };
in
{ {
fonts = { fonts = {
packages = with pkgs; [ packages = with pkgs; [