fixes 4 NORTH + yazi openers1

This commit is contained in:
nx2
2024-04-09 10:58:24 +02:00
parent b79ec3015a
commit cb121e283c
5 changed files with 232 additions and 66 deletions

View File

@@ -48,7 +48,7 @@
secrets = import ./secrets/passwords-and-certificates.nix; secrets = import ./secrets/passwords-and-certificates.nix;
rice = { rice = {
transparency = "0.9"; transparency = "0.8";
colors = rec { colors = rec {
main-fg = "#ffffff"; main-fg = "#ffffff";
main-bg = "#000000"; main-bg = "#000000";
@@ -56,7 +56,7 @@
bubble-bg = "#222222"; bubble-bg = "#222222";
bubble-border = "#bbbbbb"; bubble-border = "#bbbbbb";
secondary-fg = main-fg; secondary-fg = main-fg;
secondary-bg = "#222255"; secondary-bg = "#111133";
lines = "#bbbbbb"; lines = "#bbbbbb";
accent = "#ff00ff"; accent = "#ff00ff";
}; };
@@ -91,10 +91,15 @@
}; };
homeConfigurations = { homeConfigurations = {
nx2 = home-manager.lib.homeManagerConfiguration { NxXPS = home-manager.lib.homeManagerConfiguration {
inherit pkgs; inherit pkgs;
modules = [ ./home.nix ]; modules = [ ./home.nix ];
extraSpecialArgs = { inherit system user allowed secrets pkgs-unstable rice nvidia; }; extraSpecialArgs = let host = "NxXPS"; in { inherit system user host allowed secrets pkgs-unstable rice nvidia; };
};
NxNORTH = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ./home.nix ];
extraSpecialArgs = let host = "NxNORTH"; in { inherit system user host allowed secrets pkgs-unstable rice nvidia; };
}; };
}; };

View File

@@ -1,9 +1,12 @@
{ config, pkgs, pkgs-unstable, rice, lib, ... }: { config, pkgs, pkgs-unstable, host, nvidia, rice, lib, ... }:
let let
animation-speed = "2"; animation-speed = "2";
transparency = rice.transparency; transparency = rice.transparency;
gap-size = 10; gap-size = 20;
rounding = 10;
border-width = 2;
monitors = { monitors = {
xps = {
main = { main = {
name = "eDP-1"; name = "eDP-1";
resolution = "1920x1200"; resolution = "1920x1200";
@@ -17,6 +20,27 @@ let
scale = "1.0"; scale = "1.0";
}; };
}; };
north = {
main = {
name = "DP-4";
resolution = "2560x1440";
position = "1920x0";
scale = "1.0";
};
left = {
name = "HDME-A-3";
resolution = "1920x1080";
position = "0x180";
scale = "1.0";
};
right = {
name = "HDMI-A-3";
resolution = "1920x1080";
position = "4480x80";
scale = "1.0";
};
};
};
in in
{ {
home.packages = [ home.packages = [
@@ -73,33 +97,55 @@ in
settings = { settings = {
# source = /home/nx2/.config/hypr/hyprland-nosync.conf; # source = /home/nx2/.config/hypr/hyprland-nosync.conf;
monitor = [ monitor =
"${monitors.main.name}, ${monitors.main.resolution}, ${monitors.main.position}, ${monitors.main.scale}" if host == "NxXPS" then [
"${monitors.xps.main.name}, ${monitors.xps.main.resolution}, ${monitors.xps.main.position}, ${monitors.xps.main.scale}"
"${monitors.xps.second.name}, ${monitors.xps.second.resolution}, ${monitors.xps.second.position}, ${monitors.xps.second.scale}"
] else [
"${monitors.north.main.name}, ${monitors.north.main.resolution}, ${monitors.north.main.position}, ${monitors.north.main.scale}"
"${monitors.north.left.name}, ${monitors.north.left.resolution}, ${monitors.north.left.position}, ${monitors.north.left.scale}"
"${monitors.north.right.name}, ${monitors.north.right.resolution}, ${monitors.north.right.position}, ${monitors.north.right.scale}"
]; ];
workspace = [ workspace =
"${monitors.main.name}, 11" let
"${monitors.main.name}, 12" d1 = if host == "NxXPS" then monitors.xps.main.name else monitors.north.main.name;
"${monitors.main.name}, 13" d3 = if host == "NxXPS" then monitors.xps.second.name else monitors.north.left.name;
"${monitors.main.name}, 14" d2 = if host == "NxXPS" then monitors.xps.main.name else monitors.north.right.name;
"${monitors.main.name}, 15" compact = ",gapsin:0,gapsout:0,rounding:0,bordersize:0";
"${monitors.main.name}, 16" in
"${monitors.main.name}, 17" [
"${monitors.main.name}, 18" "${d1}, 11"
"${monitors.main.name}, 19" "${d1}, 12"
"${monitors.main.name}, 10,gapsin:0,gapsout:0" "${d1}, 13"
"${monitors.main.name}, 100" "${d1}, 14"
"${monitors.second.name}, 21,gapsin:0,gapsout:0" "${d1}, 15"
"${monitors.second.name}, 21" "${d1}, 16"
"${monitors.second.name}, 22" "${d1}, 17"
"${monitors.second.name}, 23" "${d1}, 18"
"${monitors.second.name}, 24" "${d1}, 19"
"${monitors.second.name}, 25" "${d1}, 10${compact}"
"${monitors.second.name}, 26" "${d1}, 100${compact}"
"${monitors.second.name}, 27" "${d2}, 21${compact}"
"${monitors.second.name}, 28" "${d2}, 22"
"${monitors.second.name}, 29" "${d2}, 23"
"${monitors.second.name}, 20" "${d2}, 24"
"${d2}, 25"
"${d2}, 26"
"${d2}, 27"
"${d2}, 28"
"${d2}, 29"
"${d2}, 20"
"${d3}, 31"
"${d3}, 32"
"${d3}, 33"
"${d3}, 34"
"${d3}, 35"
"${d3}, 36"
"${d3}, 37"
"${d3}, 38"
"${d3}, 39"
"${d3}, 30"
]; ];
"device:logitech-wireless-mouse-mx-master-1" = { "device:logitech-wireless-mouse-mx-master-1" = {
@@ -107,16 +153,18 @@ in
}; };
# env = XCURSOR_SIZE,18 env = if nvidia.enable == true then [
"LIBVA_DRIVER_NAME,nvidia"
# env = GTK_IM_MODULE,ibus "XDG_SESSION_TYPE,wayland"
# env = QT_IM_MODULE,ibus "GBM_BACKEND,nvidia-drm"
# env = XMODIFIERS,@im=ibus "__GLX_VENDOR_LIBRARY_NAME,nvidia"
"WLR_NO_HARDWARE_CURSORS,1"
] else [];
input = { input = {
sensitivity = 0.1; sensitivity = 0.1;
kb_layout = "de"; kb_layout = "de";
follow_mouse = "2"; follow_mouse = "1";
touchpad = { touchpad = {
natural_scroll = true; natural_scroll = true;
scroll_factor = "0.9"; scroll_factor = "0.9";
@@ -126,7 +174,7 @@ in
general = { general = {
gaps_in = builtins.div gap-size 2; gaps_in = builtins.div gap-size 2;
gaps_out = gap-size; gaps_out = gap-size;
border_size = "1"; border_size = border-width;
"col.active_border" = "rgba(888888ff)"; "col.active_border" = "rgba(888888ff)";
"col.inactive_border" = "rgba(000000ff)"; "col.inactive_border" = "rgba(000000ff)";
@@ -136,9 +184,7 @@ in
}; };
decoration = { decoration = {
rounding = rounding;
rounding = "0";
drop_shadow = false; drop_shadow = false;
shadow_range = "20"; shadow_range = "20";
shadow_offset = "0 0"; shadow_offset = "0 0";
@@ -162,7 +208,6 @@ in
}; };
}; };
animations = { animations = {
enabled = true; enabled = true;
# bezier = "myBezier, 0.01, 0.9, 0.1, 1.0"; #o # bezier = "myBezier, 0.01, 0.9, 0.1, 1.0"; #o
@@ -379,12 +424,13 @@ in
# "SUPER, <," # "SUPER, <,"
"SUPER, Y, execr, waybar_mode set '󰹑 '" "SUPER, Y, execr, waybar_mode set '󰹑 '"
"SUPER, Y, submap, scrR" "SUPER, Y, submap, scrR"
"SUPER, X, exec, pkill wlogout || wlogout --protocol layer-shell -b 5 -T 450 -B 450" "SUPER, X, exec, pkill wlogout || wlogout --protocol layer-shell -b 3"
"SUPER, C, exec, /home/nx2/scripts/quickconfig/quickconfig.sh " # "SUPER, C, exec, /home/nx2/scripts/quickconfig/quickconfig.sh "
"SUPER, C, exec, codium,"
"SUPER, V, togglefloating, " "SUPER, V, togglefloating, "
"SUPER, B, exec, bitwarden-desktop" "SUPER, B, exec, bitwarden-desktop"
"SUPER, N, togglesplit" "SUPER, N, togglesplit"
"SUPER, M, exec, /home/nx2/scripts/meme-full-screen/meme-full-screen.sh " # "SUPER, M, exec, /home/nx2/scripts/meme-full-screen/meme-full-screen.sh "
# "SUPER, comma, exec, /home/nx2/scripts/change-language.sh" # "SUPER, comma, exec, /home/nx2/scripts/change-language.sh"
"SUPER, ., exec, echo key x:Prior | dotool" "SUPER, ., exec, echo key x:Prior | dotool"
"SUPER, -, exec, echo key x:Next | dotool" "SUPER, -, exec, echo key x:Next | dotool"
@@ -442,9 +488,14 @@ in
"SUPER, mouse:272, movewindow" "SUPER, mouse:272, movewindow"
"SUPER, mouse:273, resizewindow" "SUPER, mouse:273, resizewindow"
]; ];
bindl = [
# ",switch:on:Lid Switch, exec, hyprlock &"
];
}; };
# .d8888. db db d8888b. 88b d88 d8b d88888b. .d8888. # .d8888. db db d8888b. 88b d88 d8b d88888b. .d8888.
# 88' YP 88 88 88 '8D 88YbdP88 dP'Yb 88' '8b 88' YP # 88' YP 88 88 88 '8D 88YbdP88 dP'Yb 88' '8b 88' YP
# '8bo. 88 88 88oooY' 88 YP 88 d8. .8b 88. .8P '8bo. # '8bo. 88 88 88oooY' 88 YP 88 d8. .8b 88. .8P '8bo.
@@ -736,11 +787,14 @@ in
''; '';
}; };
home.file = { home.file =
let
m = if host == "NxXPS" then monitors.xps.main.name else monitors.north.main.name;
in
{
".config/hypr/hyprlock.conf".text = '' ".config/hypr/hyprlock.conf".text = ''
background { background {
monitor = ${monitors.main.name} monitor = ${m}
# all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations # all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations
path = /home/nx2/Pictures/nix-wall.png path = /home/nx2/Pictures/nix-wall.png

View File

@@ -37,6 +37,7 @@
image = [ image = [
{ exec = ''imv "$@"''; desc = "imv";} { exec = ''imv "$@"''; desc = "imv";}
{ exec = ''gimp "$@"''; desc = "gimp";} { exec = ''gimp "$@"''; desc = "gimp";}
{ exec = ''swww img "$@"''; desc = "swww wallpaper";}
]; ];
font = [ font = [
{ exec = ''fontpreview "$@"''; desc = "fontpreview"; } { exec = ''fontpreview "$@"''; desc = "fontpreview"; }
@@ -46,6 +47,10 @@
{ exec = ''firefox "$@"''; desc = "firefox"; } { exec = ''firefox "$@"''; desc = "firefox"; }
]; ];
}; };
open.rules = [
{ mime = "text/*"; use = "edit"; }
{ mime = "image/*"; use = "image"; }
];
}; };
}; };
} }

98
home-modules/wlogout.nix Normal file
View File

@@ -0,0 +1,98 @@
{ config, pkgs, rice,... }:
{
home.packages = with pkgs; [
wlogout
];
home.file.".config/wlogout/style.css".text = ''
* { all: unset; }
window {
font-family: ${rice.font.code.name}, monospace;
font-size: 12pt;
color: ${rice.colors.main-fg};
background-color: rgba(0, 0, 0, ${rice.transparency});
}
button {
transition: box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out;
text-shadow: none;
border: none;
color: ${rice.colors.main-fg};
background-color: ${rice.colors.secondary-bg};
margin: 5px;
}
button:hover {
color: ${rice.colors.accent} ;
}
button:focus {
color: ${rice.colors.accent} ;
}
'';
home.file.".config/wlogout/layout".text = ''
{
"label": "lock",
"action": "hyprlock",
"text": "[L]ock",
"height": 0,
"width": 0,
"keybind": "l"
}
{
"label": "reboot",
"action": "systemctl reboot",
"text": "[R]eboot",
"height": 0,
"width": 0,
"keybind": "r"
}
{
"label": "shutdown",
"action": "systemctl poweroff",
"text": "[S]hutdown",
"height": 0,
"width": 0,
"keybind": "s"
}
{
"label": "logout",
"action": "hyprctl dispatch exit 0",
"text": "Lo[g]out",
"height": 0,
"width": 0,
"keybind": "g"
}
{
"label": "suspend",
"action": "systemctl suspend",
"text": "S[u]spend",
"height": 0,
"width": 0,
"keybind": "u"
}
{
"label": "hibernate",
"action": "systemctl hibernate",
"text": "[H]ibernate",
"height": 0,
"width": 0,
"keybind": "h"
}
'';
# lock { background-image: image(url("./lock.png")); }
# lock:focus { background-image: image(url("./lock-hover.png")); }
# logout { background-image: image(url("./logout.png")); }
# logout:focus { background-image: image(url("./logout-hover.png")); }
# suspend { background-image: image(url("./suspend.png")); }
# suspend:focus { background-image: image(url("./suspend-hover.png")); }
# shutdown { background-image: image(url("./power.png")); }
# shutdown:focus { background-image: image(url("./power-hover.png")); }
# reboot { background-image: image(url("./restart.png")); }
# reboot:focus { background-image: image(url("./restart-hover.png")); }
# hibernate { background-image: image(url("./hibernate.png")); }
# hibernate:hover { background-image: image(url("./hibernate-hover.png"));}
}

View File

@@ -1,4 +1,4 @@
{ config, pkgs, lib, system, user, allowed, secrets, ... }: { config, pkgs, lib, system, host, user, allowed, secrets, ... }:
{ {
imports = [ imports = [
./home-modules/vscode.nix ./home-modules/vscode.nix
@@ -14,6 +14,7 @@
./home-modules/hyprland/hyprland.nix ./home-modules/hyprland/hyprland.nix
./home-modules/hyprland/hyprland-autoname-workspaces.nix ./home-modules/hyprland/hyprland-autoname-workspaces.nix
./home-modules/hyprland/waybar.nix ./home-modules/hyprland/waybar.nix
./home-modules/wlogout.nix
./home-modules/kitty.nix ./home-modules/kitty.nix
./home-modules/shell/fish.nix ./home-modules/shell/fish.nix
@@ -49,7 +50,7 @@
spotify spicetify-cli spotify spicetify-cli
obs-studio bitwarden obs-studio bitwarden
waybar swww rofi wlogout waybar swww rofi
imv mpv mediainfo exiftool ffmpeg imv mpv mediainfo exiftool ffmpeg
pavucontrol fontpreview gtk2fontsel pavucontrol fontpreview gtk2fontsel
@@ -90,6 +91,9 @@
"x-scheme-handler/about" = [ "firefox.desktop" ]; "x-scheme-handler/about" = [ "firefox.desktop" ];
"x-scheme-handler/unknown" = [ "firefox.desktop" ]; "x-scheme-handler/unknown" = [ "firefox.desktop" ];
"image/png" = "imv.desktop"; "image/png" = "imv.desktop";
"image/jpg" = "imv.desktop";
"image/jpeg" = "imv.desktop";
"image/webp" = "imv.desktop";
"image/gif" = "imv.desktop"; "image/gif" = "imv.desktop";
}; };
}; };