Further steps to a usable hyprland session

This commit is contained in:
William 2025-02-06 00:49:23 -03:00
parent b602e3ec1b
commit 259a0b6118
5 changed files with 201 additions and 17 deletions

111
flake.lock generated
View file

@ -202,6 +202,24 @@
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_4"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
@ -216,7 +234,7 @@
"type": "github"
}
},
"flake-utils_2": {
"flake-utils_3": {
"inputs": {
"systems": [
"stylix",
@ -382,6 +400,27 @@
}
},
"home-manager_3": {
"inputs": {
"nixpkgs": [
"mithrill-shell",
"nixpkgs"
]
},
"locked": {
"lastModified": 1730837930,
"narHash": "sha256-0kZL4m+bKBJUBQse0HanewWO0g8hDdCvBhudzxgehqc=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "2f607e07f3ac7e53541120536708e824acccfaa8",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_4": {
"inputs": {
"nixpkgs": [
"stylix",
@ -433,6 +472,26 @@
"type": "github"
}
},
"mithrill-shell": {
"inputs": {
"flake-utils": "flake-utils",
"home-manager": "home-manager_3",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1736076994,
"narHash": "sha256-s7G+VqOI0Sv1DS6EFqFKw2Xlk/1h568tfZgHBsr/SKc=",
"owner": "andreashgk",
"repo": "mithril-shell",
"rev": "63e213e1f644de541d3f84050a474acd5bd1511a",
"type": "github"
},
"original": {
"owner": "andreashgk",
"repo": "mithril-shell",
"type": "github"
}
},
"nix-flatpak": {
"locked": {
"lastModified": 1711997201,
@ -472,7 +531,7 @@
"nix-minecraft": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils",
"flake-utils": "flake-utils_2",
"nixpkgs": [
"nixpkgs"
]
@ -529,11 +588,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1738410390,
"narHash": "sha256-xvTo0Aw0+veek7hvEVLzErmJyQkEcRk6PSR4zsRQFEc=",
"lastModified": 1730785428,
"narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "3a228057f5b619feb3186e986dbe76278d707b6e",
"rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7",
"type": "github"
},
"original": {
@ -559,6 +618,22 @@
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1738410390,
"narHash": "sha256-xvTo0Aw0+veek7hvEVLzErmJyQkEcRk6PSR4zsRQFEc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "3a228057f5b619feb3186e986dbe76278d707b6e",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"agenix": "agenix",
@ -567,11 +642,12 @@
"home-manager-stable": "home-manager-stable",
"homepage": "homepage",
"impermanence": "impermanence",
"mithrill-shell": "mithrill-shell",
"nix-flatpak": "nix-flatpak",
"nix-index-db": "nix-index-db",
"nix-minecraft": "nix-minecraft",
"nixos-generators": "nixos-generators",
"nixpkgs": "nixpkgs",
"nixpkgs": "nixpkgs_2",
"nixpkgs-stable": "nixpkgs-stable",
"stylix": "stylix"
}
@ -584,14 +660,14 @@
"base16-vim": "base16-vim",
"firefox-gnome-theme": "firefox-gnome-theme",
"flake-compat": "flake-compat_3",
"flake-utils": "flake-utils_2",
"flake-utils": "flake-utils_3",
"git-hooks": "git-hooks",
"gnome-shell": "gnome-shell",
"home-manager": "home-manager_3",
"home-manager": "home-manager_4",
"nixpkgs": [
"nixpkgs-stable"
],
"systems": "systems_4",
"systems": "systems_5",
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty",
"tinted-tmux": "tinted-tmux",
@ -642,6 +718,21 @@
}
},
"systems_3": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"systems_4": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@ -656,7 +747,7 @@
"type": "github"
}
},
"systems_4": {
"systems_5": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",

View file

@ -52,6 +52,8 @@
url = "github:danth/stylix";
inputs.nixpkgs.follows = "nixpkgs-stable";
};
mithrill-shell.url = "github:andreashgk/mithril-shell";
};
outputs =
@ -70,6 +72,7 @@
nix-minecraft,
nixos-generators,
stylix,
mithrill-shell,
...
}:
{

View file

@ -8,6 +8,7 @@
users.user = {
imports = [
../../../users/desktops/user.nix
inputs.mithrill-shell.homeManagerModules.default
];
};
};

View file

@ -4,8 +4,8 @@
stylix = {
enable = true;
image = pkgs.fetchurl {
url = "https://images.unsplash.com/photo-1701453831008-ea11046da960?ixlib=rb-4.0.3&q=85&fm=jpg&crop=entropy&cs=srgb&dl=nat-uN9OSpSsw4A-unsplash.jpg";
sha256 = "sha256-89o5VYI4cMP/O33oCaHi61hUYmIWEdyr8uGf/b2DMUk=";
url = "https://w.wallhaven.cc/full/dp/wallhaven-dpwvl3.jpg";
sha256 = "sha256-h9UeYj8jSRgSv8XL+zgds4KtooLlJ+IqwxZbQEXdCh4=";
};
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
cursor = {

View file

@ -23,6 +23,20 @@ let
done
'';
};
scrollermodetoggle = pkgs.writeShellApplication {
name = "scrollermodetoggle";
runtimeInputs = with pkgs; [ hyprland ];
text = ''
if [ -f "$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/colmode" ]; then
rm "$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/colmode"
hyprctl --batch 'dispatch scroller:setmode row; notify 2 1000 0 "Row Mode"'
else
touch "$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/colmode"
hyprctl --batch 'dispatch scroller:setmode col; notify 2 1000 0 "Column Mode"'
fi
'';
};
in
{
@ -40,8 +54,6 @@ in
#################
exec-once = ulauncher --hide-window
exec-once = ${lib.getExe heightfittr}
# exec-once = ${pkgs.swaynotificationcenter}/bin/swaync
# exec-once = ${pkgs.ironbar}/bin/ironbar
env = XCURSOR_SIZE,24
env = HYPRCURSOR_SIZE,24
@ -154,6 +166,7 @@ in
bindl = , XF86AudioPause, exec, playerctl play-pause
bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = , XF86AudioPrev, exec, playerctl previous
bind = CTRL ALT SHIFT, a, exec, bash /home/user/.local/bin/toggle-audio-output.sh
# WINDOW MANAGEMENT
bind = ALT, F4, killactive,
bind = $mainMod, space, togglefloating,
@ -168,8 +181,7 @@ in
bind = $mainMod CTRL, l, movewindow, r
bind = $mainMod CTRL, k, movewindow, u
bind = $mainMod CTRL, j, movewindow, d
bind = $mainMod, bracketleft, scroller:setmode, row
bind = $mainMod CTRL, bracketleft, scroller:setmode, col
bind = $mainMod, v, exec, ${lib.getExe scrollermodetoggle}
bind = $mainMod, r, scroller:cyclewidth, next
bind = $mainMod CTRL, r, scroller:cyclewidth, prev
bind = $mainMod, p, scroller:pin,
@ -194,10 +206,87 @@ in
'';
};
services = {
# mithril-shell = {
# enable = true;
# integrations.hyprland.enable = true;
# settings = {
# animations.activeWorkspace = "smooth";
# minWorkspaces = 2;
# lockCommand = "hyprlock";
# };
# };
swaync = {
enable = true;
settings = {
positionX = "left";
positionY = "top";
layer = "overlay";
control-center-layer = "top";
layer-shell = true;
cssPriority = "application";
control-center-margin-top = 20;
control-center-margin-bottom = 20;
control-center-margin-right = 20;
control-center-margin-left = 20;
notification-2fa-action = true;
notification-inline-replies = false;
notification-icon-size = 64;
notification-body-image-height = 100;
notification-body-image-width = 200;
timeout = 10;
timeout-low = 5;
timeout-critical = 0;
fit-to-screen = true;
relative-timestamps = true;
control-center-width = 500;
control-center-height = 600;
notification-window-width = 500;
keyboard-shortcuts = true;
image-visibility = "when-available";
transition-time = 200;
hide-on-clear = false;
hide-on-action = true;
script-fail-notify = true;
widgets = [
"inhibitors"
"title"
"dnd"
"notifications"
"mpris"
];
widget-config = {
inhibitors = {
text = "Inhibitors";
button-text = "Clear All";
clear-all-button = true;
};
title = {
text = "Notifications";
clear-all-button = true;
button-text = "Clear All";
};
dnd = {
text = "Do Not Disturb";
};
mpris = {
image-size = 96;
image-radius = 12;
};
};
};
};
};
programs = {
hyprlock.enable = true;
};
home.packages = with pkgs; [
brightnessctl
hyprnome
playerctl
brightnessctl
swaynotificationcenter
ulauncher
];
}