Use alejandra formatter / fix warnings
This commit is contained in:
parent
c5b1041bbb
commit
693d4e3c70
70 changed files with 1424 additions and 1547 deletions
|
|
@ -5,8 +5,7 @@
|
|||
options,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
}: {
|
||||
options.mods = {
|
||||
hyprland = {
|
||||
anyrun = {
|
||||
|
|
@ -25,8 +24,8 @@
|
|||
'';
|
||||
};
|
||||
customConfig = lib.mkOption {
|
||||
default = { };
|
||||
example = { };
|
||||
default = {};
|
||||
example = {};
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = ''
|
||||
Custom anyrun configuration.
|
||||
|
|
@ -63,7 +62,8 @@
|
|||
programs.anyrun = {
|
||||
enable = true;
|
||||
config =
|
||||
if config.mods.hyprland.anyrun.useDefaultConfig then
|
||||
if config.mods.hyprland.anyrun.useDefaultConfig
|
||||
then
|
||||
{
|
||||
plugins = [
|
||||
inputs.anyrun.packages.${pkgs.system}.applications
|
||||
|
|
@ -84,15 +84,15 @@
|
|||
closeOnClick = true;
|
||||
}
|
||||
// config.mods.hyprland.anyrun.customConfig
|
||||
else
|
||||
config.mods.hyprland.anyrun.customConfig;
|
||||
else config.mods.hyprland.anyrun.customConfig;
|
||||
|
||||
extraCss =
|
||||
if config.mods.hyprland.anyrun.useDefaultCss then
|
||||
if config.mods.hyprland.anyrun.useDefaultCss
|
||||
then
|
||||
''
|
||||
#window {
|
||||
border-radius: 10px;
|
||||
background-color: none;
|
||||
background-color: none;
|
||||
}
|
||||
|
||||
box#main {
|
||||
|
|
@ -138,8 +138,7 @@
|
|||
}
|
||||
''
|
||||
+ config.mods.hyprland.anyrun.customCss
|
||||
else
|
||||
config.mods.hyprland.anyrun.customCss;
|
||||
else config.mods.hyprland.anyrun.customCss;
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -5,19 +5,14 @@
|
|||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
}: let
|
||||
browserName =
|
||||
if (builtins.isString config.mods.homePackages.browser) then
|
||||
config.mods.homePackages.browser
|
||||
else if
|
||||
config.mods.homePackages.browser ? meta && config.mods.homePackages.browser.meta ? mainProgram
|
||||
then
|
||||
config.mods.homePackages.browser.meta.mainProgram
|
||||
else
|
||||
config.mods.homePackages.browser.pname;
|
||||
in
|
||||
{
|
||||
if (builtins.isString config.mods.homePackages.browser)
|
||||
then config.mods.homePackages.browser
|
||||
else if config.mods.homePackages.browser ? meta && config.mods.homePackages.browser.meta ? mainProgram
|
||||
then config.mods.homePackages.browser.meta.mainProgram
|
||||
else config.mods.homePackages.browser.pname;
|
||||
in {
|
||||
options.mods = {
|
||||
hyprland = {
|
||||
enable = lib.mkOption {
|
||||
|
|
@ -35,15 +30,15 @@ in
|
|||
# all others
|
||||
",highrr,auto,1"
|
||||
];
|
||||
example = [ "DP-1,3440x1440@180,2560x0,1,vrr,0" ];
|
||||
example = ["DP-1,3440x1440@180,2560x0,1,vrr,0"];
|
||||
type = with lib.types; listOf str;
|
||||
description = ''
|
||||
The monitor configuration for hyprland.
|
||||
'';
|
||||
};
|
||||
workspace = lib.mkOption {
|
||||
default = [ ];
|
||||
example = [ "2,monitor:DP-1, default:true" ];
|
||||
default = [];
|
||||
example = ["2,monitor:DP-1, default:true"];
|
||||
type = with lib.types; listOf str;
|
||||
description = ''
|
||||
The workspace configuration for hyprland.
|
||||
|
|
@ -58,8 +53,8 @@ in
|
|||
'';
|
||||
};
|
||||
extraAutostart = lib.mkOption {
|
||||
default = [ ];
|
||||
example = [ "your application" ];
|
||||
default = [];
|
||||
example = ["your application"];
|
||||
type = lib.types.listOf lib.types.str;
|
||||
description = ''
|
||||
Extra exec_once.
|
||||
|
|
@ -74,8 +69,8 @@ in
|
|||
'';
|
||||
};
|
||||
customConfig = lib.mkOption {
|
||||
default = { };
|
||||
example = { };
|
||||
default = {};
|
||||
example = {};
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = ''
|
||||
Custom Hyprland configuration.
|
||||
|
|
@ -83,16 +78,16 @@ in
|
|||
'';
|
||||
};
|
||||
plugins = lib.mkOption {
|
||||
default = [ ];
|
||||
example = [ ];
|
||||
default = [];
|
||||
example = [];
|
||||
type = with lib.types; listOf package;
|
||||
description = ''
|
||||
Plugins to be added to Hyprland.
|
||||
'';
|
||||
};
|
||||
pluginConfig = lib.mkOption {
|
||||
default = { };
|
||||
example = { };
|
||||
default = {};
|
||||
example = {};
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = ''
|
||||
Plugin configuration to be added to Hyprland.
|
||||
|
|
@ -129,7 +124,8 @@ in
|
|||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
settings =
|
||||
if config.mods.hyprland.useDefaultConfig then
|
||||
if config.mods.hyprland.useDefaultConfig
|
||||
then
|
||||
{
|
||||
"$mod" = "SUPER";
|
||||
|
||||
|
|
@ -366,34 +362,39 @@ in
|
|||
"immediate,class:^(.*)(needforspeedheat.exe)$"
|
||||
];
|
||||
|
||||
exec-once = [
|
||||
# environment
|
||||
"systemctl --user import-environment"
|
||||
"dbus-update-activation-environment --systemd --all"
|
||||
"hyprctl setcursor Bibata-Modern-Classic 24"
|
||||
exec-once =
|
||||
[
|
||||
# environment
|
||||
"systemctl --user import-environment"
|
||||
"dbus-update-activation-environment --systemd --all"
|
||||
"hyprctl setcursor Bibata-Modern-Classic 24"
|
||||
|
||||
# other programs
|
||||
"hyprpaper"
|
||||
"ironbar"
|
||||
"${browserName}"
|
||||
"oxipaste_daemon"
|
||||
"oxinoti"
|
||||
] ++ config.mods.hyprland.extraAutostart;
|
||||
# other programs
|
||||
"hyprpaper"
|
||||
"ironbar"
|
||||
"${browserName}"
|
||||
"oxipaste_daemon"
|
||||
"oxinoti"
|
||||
]
|
||||
++ config.mods.hyprland.extraAutostart;
|
||||
|
||||
plugin = {
|
||||
hyprspace = lib.mkIf config.mods.hyprland.hyprspaceEnable {
|
||||
bind = [
|
||||
"SUPER, W, overview:toggle, toggle"
|
||||
];
|
||||
};
|
||||
} // config.mods.hyprland.pluginConfig;
|
||||
plugin =
|
||||
{
|
||||
hyprspace = lib.mkIf config.mods.hyprland.hyprspaceEnable {
|
||||
bind = [
|
||||
"SUPER, W, overview:toggle, toggle"
|
||||
];
|
||||
};
|
||||
}
|
||||
// config.mods.hyprland.pluginConfig;
|
||||
}
|
||||
// config.mods.hyprland.customConfig
|
||||
else
|
||||
lib.mkForce config.mods.hyprland.customConfig;
|
||||
plugins = [
|
||||
(lib.mkIf config.mods.hyprland.hyprspaceEnable inputs.Hyprspace.packages.${pkgs.system}.Hyprspace)
|
||||
] ++ config.mods.hyprland.plugins;
|
||||
else lib.mkForce config.mods.hyprland.customConfig;
|
||||
plugins =
|
||||
[
|
||||
(lib.mkIf config.mods.hyprland.hyprspaceEnable inputs.Hyprspace.packages.${pkgs.system}.Hyprspace)
|
||||
]
|
||||
++ config.mods.hyprland.plugins;
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@
|
|||
options,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
}: {
|
||||
options.mods = {
|
||||
hyprland.hyprlock = {
|
||||
enable = lib.mkOption {
|
||||
|
|
@ -22,7 +21,7 @@
|
|||
stylix.targets.hyprlock = {
|
||||
enable = false;
|
||||
};
|
||||
home.packages = with pkgs; [ hyprlock ];
|
||||
home.packages = with pkgs; [hyprlock];
|
||||
programs.hyprlock = lib.mkIf config.mods.hyprland.hyprlock.enable {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@
|
|||
options,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
}: {
|
||||
options.mods = {
|
||||
hyprland.hyprpaper = {
|
||||
enable = lib.mkOption {
|
||||
|
|
@ -17,7 +16,7 @@
|
|||
config = lib.mkOption {
|
||||
default = "";
|
||||
example = ''
|
||||
preload = path/to/wallpaper
|
||||
preload = path/to/wallpaper
|
||||
wallpaper = YOURMONITOR,path/to/wallpaper
|
||||
'';
|
||||
type = lib.types.lines;
|
||||
|
|
@ -30,7 +29,7 @@
|
|||
|
||||
config = lib.mkIf config.mods.hyprland.hyprpaper.enable (
|
||||
lib.optionalAttrs (options ? xdg.configFile) {
|
||||
home.packages = with pkgs; [ hyprpaper ];
|
||||
home.packages = with pkgs; [hyprpaper];
|
||||
xdg.configFile."hypr/hyprpaper.conf" = lib.mkIf config.mods.hyprland.hyprpaper.enable {
|
||||
text = config.mods.hyprland.hyprpaper.config;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,11 +3,9 @@
|
|||
config,
|
||||
options,
|
||||
...
|
||||
}:
|
||||
let
|
||||
}: let
|
||||
username = config.conf.username;
|
||||
in
|
||||
{
|
||||
in {
|
||||
options.mods = {
|
||||
hyprland.ironbar = {
|
||||
enable = lib.mkOption {
|
||||
|
|
@ -25,8 +23,8 @@ in
|
|||
'';
|
||||
};
|
||||
customConfig = lib.mkOption {
|
||||
default = { };
|
||||
example = { };
|
||||
default = {};
|
||||
example = {};
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = ''
|
||||
Custom ironbar configuration.
|
||||
|
|
@ -61,7 +59,8 @@ in
|
|||
programs.ironbar = {
|
||||
enable = true;
|
||||
style =
|
||||
if config.mods.hyprland.ironbar.useDefaultCss then
|
||||
if config.mods.hyprland.ironbar.useDefaultCss
|
||||
then
|
||||
''
|
||||
@import url("/home/${username}/.config/gtk-3.0/gtk.css");
|
||||
|
||||
|
|
@ -197,106 +196,108 @@ in
|
|||
}
|
||||
''
|
||||
+ config.mods.hyprland.ironbar.customCss
|
||||
else
|
||||
config.mods.hyprland.ironbar.customCss;
|
||||
else config.mods.hyprland.ironbar.customCss;
|
||||
features = [
|
||||
#"another_feature"
|
||||
];
|
||||
config = {
|
||||
monitors."${config.conf.defaultMonitor}" =
|
||||
if config.mods.hyprland.ironbar.useDefaultConfig then
|
||||
if config.mods.hyprland.ironbar.useDefaultConfig
|
||||
then
|
||||
{
|
||||
end = config.conf.ironbar.modules ++ [
|
||||
{
|
||||
type = "sys_info";
|
||||
format = [ " {memory_percent}" ];
|
||||
interval.memory = 30;
|
||||
class = "memory-usage";
|
||||
}
|
||||
{
|
||||
type = "custom";
|
||||
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 = (lib.mkIf config.mods.scripts.audioControl "!audioControl bluetooth");
|
||||
}
|
||||
{
|
||||
type = "button";
|
||||
class = "audio-button";
|
||||
label = "";
|
||||
on_click = (lib.mkIf config.mods.scripts.audioControl "!audioControl 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";
|
||||
}
|
||||
];
|
||||
class = "popup-button-box";
|
||||
}
|
||||
{
|
||||
type = "clock";
|
||||
format = "%I:%M";
|
||||
format_popup = "%I:%M:%S";
|
||||
locale = "en_US";
|
||||
}
|
||||
{ type = "tray"; }
|
||||
];
|
||||
end =
|
||||
config.conf.ironbar.modules
|
||||
++ [
|
||||
{
|
||||
type = "sys_info";
|
||||
format = [" {memory_percent}"];
|
||||
interval.memory = 30;
|
||||
class = "memory-usage";
|
||||
}
|
||||
{
|
||||
type = "custom";
|
||||
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 = lib.mkIf config.mods.scripts.audioControl "!audioControl bluetooth";
|
||||
}
|
||||
{
|
||||
type = "button";
|
||||
class = "audio-button";
|
||||
label = "";
|
||||
on_click = lib.mkIf config.mods.scripts.audioControl "!audioControl 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";
|
||||
}
|
||||
];
|
||||
class = "popup-button-box";
|
||||
}
|
||||
{
|
||||
type = "clock";
|
||||
format = "%I:%M";
|
||||
format_popup = "%I:%M:%S";
|
||||
locale = "en_US";
|
||||
}
|
||||
{type = "tray";}
|
||||
];
|
||||
position = "top";
|
||||
height = 10;
|
||||
anchor_to_edges = true;
|
||||
|
|
@ -317,8 +318,7 @@ in
|
|||
];
|
||||
}
|
||||
// config.mods.hyprland.ironbar.customConfig
|
||||
else
|
||||
config.mods.hyprland.ironbar.customConfig;
|
||||
else config.mods.hyprland.ironbar.customConfig;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue