Format with nixfmt-rfc

This commit is contained in:
DashieTM 2024-08-25 19:10:41 +02:00
parent 8c9f699269
commit a90a9c3a8e
60 changed files with 1756 additions and 1039 deletions

View file

@ -1,4 +1,12 @@
{ lib, config, pkgs, options, inputs, ... }: {
{
lib,
config,
pkgs,
options,
inputs,
...
}:
{
options.mods = {
hyprland.anyrun = {
enable = lib.mkOption {
@ -10,8 +18,8 @@
};
};
config = lib.mkIf config.mods.hyprland.anyrun.enable
(lib.optionalAttrs (options ? programs.anyrun) {
config = lib.mkIf config.mods.hyprland.anyrun.enable (
lib.optionalAttrs (options ? programs.anyrun) {
programs.anyrun = {
enable = true;
config = {
@ -23,8 +31,12 @@
];
#position = "center";
hideIcons = false;
width = { fraction = 0.3; };
y = { fraction = 0.5; };
width = {
fraction = 0.3;
};
y = {
fraction = 0.5;
};
layer = "overlay";
hidePluginInfo = true;
closeOnClick = true;
@ -79,5 +91,6 @@
}
'';
};
});
}
);
}

View file

@ -1,4 +1,11 @@
{ config, lib, options, pkgs, ... }: {
{
config,
lib,
options,
pkgs,
...
}:
{
options.mods = {
hyprland = {
enable = lib.mkOption {
@ -61,8 +68,8 @@
};
};
config = lib.mkIf config.mods.hyprland.enable
(lib.optionalAttrs (options ? wayland.windowManager.hyprland) {
config = lib.mkIf config.mods.hyprland.enable (
lib.optionalAttrs (options ? wayland.windowManager.hyprland) {
# install Hyprland related packages
home.packages = with pkgs; [
xorg.xprop
@ -82,15 +89,16 @@
lib.mkIf config.mods.hyprland.use_default_config {
"$mod" = "SUPER";
bindm =
[ "$mod, mouse:272, movewindow" "$mod, mouse:273, resizewindow" ];
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
];
bind = [
# screenshots
''$mod SUPER,S,exec,grim -g "$(slurp)" - | wl-copy''
''$mod SUPERSHIFT,S,exec,grim -g "$(slurp)" - | satty -f -''
''
$mod SUPERSHIFTALT,S,exec,grim -c -g "2560,0 3440x1440" - | wl-copy''
''$mod SUPERSHIFTALT,S,exec,grim -c -g "2560,0 3440x1440" - | wl-copy''
# regular programs
"$mod SUPER,F,exec,firefox"
@ -108,19 +116,14 @@
"$mod SUPERSHIFT,K,exec, playerctl -a pause & hyprlock & systemctl hibernate"
# media keys
(lib.mkIf config.mods.scripts.audio-control
",XF86AudioMute,exec, audio-control mute")
(lib.mkIf config.mods.scripts.audio-control
",XF86AudioLowerVolume,exec, audio-control sink -5%")
(lib.mkIf config.mods.scripts.audio-control
",XF86AudioRaiseVolume,exec, audio-control sink +5%")
(lib.mkIf config.mods.scripts.audio-control ",XF86AudioMute,exec, audio-control mute")
(lib.mkIf config.mods.scripts.audio-control ",XF86AudioLowerVolume,exec, audio-control sink -5%")
(lib.mkIf config.mods.scripts.audio-control ",XF86AudioRaiseVolume,exec, audio-control sink +5%")
",XF86AudioPlay,exec, playerctl play-pause"
",XF86AudioNext,exec, playerctl next"
",XF86AudioPrev,exec, playerctl previous"
(lib.mkIf config.mods.scripts.change-brightness
",XF86MonBrightnessDown,exec, change-brightness brightness 10%-")
(lib.mkIf config.mods.scripts.change-brightness
",XF86MonBrightnessUp,exec, change-brightness brightness +10%")
(lib.mkIf config.mods.scripts.change-brightness ",XF86MonBrightnessDown,exec, change-brightness brightness 10%-")
(lib.mkIf config.mods.scripts.change-brightness ",XF86MonBrightnessUp,exec, change-brightness brightness +10%")
# hyprland keybinds
# misc
@ -199,13 +202,14 @@
general = {
gaps_out = "3,5,5,5";
border_size = 3;
"col.active_border" =
lib.mkForce "0xFFFF0000 0xFF00FF00 0xFF0000FF 45deg";
"col.active_border" = lib.mkForce "0xFFFF0000 0xFF00FF00 0xFF0000FF 45deg";
# "col.inactive_border" = "0x66333333";
allow_tearing = lib.mkIf config.mods.hyprland.no_atomic true;
};
decoration = { rounding = 4; };
decoration = {
rounding = 4;
};
animations = {
bezier = "penguin,0.05,0.9,0.1,1.0";
@ -254,7 +258,9 @@
# no_break_fs_vrr = true;
};
gestures = { workspace_swipe = true; };
gestures = {
workspace_swipe = true;
};
monitor = config.mods.hyprland.monitor;
workspace = config.mods.hyprland.workspace;
@ -265,10 +271,10 @@
"XDG_CURRENT_DESKTOP=Hyprland"
"XDG_SESSION_TYPE=wayland"
"XDG_SESSION_DESKTOP=Hyprland"
"HYPRCURSOR_THEME,Bibata-Modern-Classic"
"HYPRCURSOR_SIZE,24"
"XCURSOR_THEME,Bibata-Modern-Classic"
"XCURSOR_SIZE,24"
"HYPRCURSOR_THEME,${config.mods.stylix.cursor.name}"
"HYPRCURSOR_SIZE,${config.mods.stylix.cursor.size}"
"XCURSOR_THEME,${config.mods.stylix.cursor.name}"
"XCURSOR_SIZE,${config.mods.stylix.cursor.size}"
"QT_QPA_PLATFORM,wayland"
"QT_QPA_PLATFORMTHEME,qt5ct"
"QT_WAYLAND_FORCE_DPI,96"
@ -282,8 +288,7 @@
(lib.mkIf config.mods.nvidia.enable "LIBVA_DRIVER_NAME,nvidia")
(lib.mkIf config.mods.nvidia.enable "XDG_SESSION_TYPE,wayland")
(lib.mkIf config.mods.nvidia.enable "GBM_BACKEND,nvidia-drm")
(lib.mkIf config.mods.nvidia.enable
"__GLX_VENDOR_LIBRARY_NAME,nvidia")
(lib.mkIf config.mods.nvidia.enable "__GLX_VENDOR_LIBRARY_NAME,nvidia")
];
layerrule = [
@ -338,9 +343,11 @@
# ];
# };
# };
} // config.mods.hyprland.custom_config;
}
// config.mods.hyprland.custom_config;
# wayland.windowManager.hyprland.plugins = [
# inputs.Hyprspace.packages.${pkgs.system}.Hyprspace
# ];
});
}
);
}

View file

@ -1,4 +1,11 @@
{ config, lib, options, pkgs, ... }: {
{
config,
lib,
options,
pkgs,
...
}:
{
options.mods = {
hyprland.hyprlock = {
enable = lib.mkOption {
@ -10,33 +17,40 @@
};
};
config = lib.mkIf config.mods.hyprland.hyprlock.enable
(lib.optionalAttrs (options ? xdg.configFile) {
config = lib.mkIf config.mods.hyprland.hyprlock.enable (
lib.optionalAttrs (options ? xdg.configFile) {
home.packages = with pkgs; [ hyprlock ];
programs.hyprlock = lib.mkIf config.mods.hyprland.hyprlock.enable {
enable = true;
settings = {
background = [{
monitor = "";
path = "";
color = "rgba(26, 27, 38, 1.0)";
}];
background = [
{
monitor = "";
path = "";
color = "rgba(26, 27, 38, 1.0)";
}
];
input-field = [{
monitor = "${config.conf.monitor}";
input-field = [
{
monitor = "${config.conf.monitor}";
placeholder_text = "password or something";
}];
placeholder_text = "password or something";
}
];
label = [{
monitor = "${config.conf.monitor}";
text = "$TIME";
font_size = 50;
position = "0, 200";
valign = "center";
halign = "center";
}];
label = [
{
monitor = "${config.conf.monitor}";
text = "$TIME";
font_size = 50;
position = "0, 200";
valign = "center";
halign = "center";
}
];
};
};
});
}
);
}

View file

@ -1,4 +1,11 @@
{ config, lib, options, pkgs, ... }: {
{
config,
lib,
options,
pkgs,
...
}:
{
options.mods = {
hyprland.hyprpaper = {
enable = lib.mkOption {
@ -20,12 +27,12 @@
};
};
config = lib.mkIf config.mods.hyprland.hyprpaper.enable
(lib.optionalAttrs (options ? xdg.configFile) {
config = lib.mkIf config.mods.hyprland.hyprpaper.enable (
lib.optionalAttrs (options ? xdg.configFile) {
home.packages = with pkgs; [ hyprpaper ];
xdg.configFile."hypr/hyprpaper.conf" =
lib.mkIf config.mods.hyprland.hyprpaper.enable {
text = config.mods.hyprland.hyprpaper.config;
};
});
xdg.configFile."hypr/hyprpaper.conf" = lib.mkIf config.mods.hyprland.hyprpaper.enable {
text = config.mods.hyprland.hyprpaper.config;
};
}
);
}

View file

@ -1,6 +1,14 @@
{ lib, config, pkgs, options, ... }:
let username = config.conf.username;
in {
{
lib,
config,
pkgs,
options,
...
}:
let
username = config.conf.username;
in
{
options.mods = {
hyprland.ironbar = {
enable = lib.mkOption {
@ -11,8 +19,8 @@ in {
};
};
};
config = lib.mkIf config.mods.hyprland.ironbar.enable
(lib.optionalAttrs (options ? programs.ironbar) {
config = lib.mkIf config.mods.hyprland.ironbar.enable (
lib.optionalAttrs (options ? programs.ironbar) {
programs.ironbar = {
enable = true;
@ -164,78 +172,78 @@ in {
}
{
type = "custom";
bar = [{
type = "button";
class = "popup-button";
label = "";
on_click = "popup:toggle";
}];
bar = [
{
type = "button";
class = "popup-button";
label = "";
on_click = "popup:toggle";
}
];
class = "popup-button-box";
popup = [{
type = "box";
orientation = "vertical";
class = "audio-box";
widgets = [
{
type = "box";
orientation = "horizontal";
widgets = [
{
type = "button";
class = "audio-button";
label = "";
on_click =
"!/home/${username}/.config/eww/scripts/audio_control.sh bluetooth";
}
{
type = "button";
class = "audio-button";
label = "󰋋";
on_click =
"!/home/${username}/.config/eww/scripts/audio_control.sh internal";
}
];
class = "audio-button-box";
}
{
type = "label";
label = "Output";
}
{
type = "slider";
class = "audio-slider";
step = 1.0;
length = 200;
value =
"pactl get-sink-volume @DEFAULT_SINK@ | awk -F'/' '{ print $2 }' | tr -d ' %'";
on_change = "!pactl set-sink-volume @DEFAULT_SINK@ $0%";
}
{
type = "label";
label = "Input";
}
{
type = "slider";
class = "audio-slider";
step = 1.0;
length = 200;
value =
"pactl get-source-volume @DEFAULT_SOURCE@ | awk -F'/' '{ print $2 }' | tr -d ' %'";
on_change =
"!pactl set-source-volume @DEFAULT_SOURCE@ $0%";
}
];
}];
popup = [
{
type = "box";
orientation = "vertical";
class = "audio-box";
widgets = [
{
type = "box";
orientation = "horizontal";
widgets = [
{
type = "button";
class = "audio-button";
label = "";
on_click = "!/home/${username}/.config/eww/scripts/audio_control.sh bluetooth";
}
{
type = "button";
class = "audio-button";
label = "󰋋";
on_click = "!/home/${username}/.config/eww/scripts/audio_control.sh internal";
}
];
class = "audio-button-box";
}
{
type = "label";
label = "Output";
}
{
type = "slider";
class = "audio-slider";
step = 1.0;
length = 200;
value = "pactl get-sink-volume @DEFAULT_SINK@ | awk -F'/' '{ print $2 }' | tr -d ' %'";
on_change = "!pactl set-sink-volume @DEFAULT_SINK@ $0%";
}
{
type = "label";
label = "Input";
}
{
type = "slider";
class = "audio-slider";
step = 1.0;
length = 200;
value = "pactl get-source-volume @DEFAULT_SOURCE@ | awk -F'/' '{ print $2 }' | tr -d ' %'";
on_change = "!pactl set-source-volume @DEFAULT_SOURCE@ $0%";
}
];
}
];
}
{
type = "custom";
bar = [{
type = "button";
class = "popup-button";
label = "";
on_click =
"!oxidash --css /home/${username}/gits/oxidash/style.css";
}];
bar = [
{
type = "button";
class = "popup-button";
label = "";
on_click = "!oxidash --css /home/${username}/gits/oxidash/style.css";
}
];
class = "popup-button-box";
}
{
@ -249,19 +257,24 @@ in {
position = "top";
height = 10;
anchor_to_edges = true;
start = [{
type = "workspaces";
all_monitors = true;
}];
center = [{
type = "focused";
show_icon = true;
show_title = true;
icon_size = 20;
truncate = "end";
}];
start = [
{
type = "workspaces";
all_monitors = true;
}
];
center = [
{
type = "focused";
show_icon = true;
show_title = true;
icon_size = 20;
truncate = "end";
}
];
};
};
};
});
}
);
}