Add Hyprlock and refactor Hyprland bindings
- Add hyprlock module and package plus hyprlock.conf XDG config - Rework bindings: introduce mkMenu, gui/term helpers and grouped menus (apps, dev, gaming, utility, system) and wire them into the main popup; change session lock to hyprlock - Simplify gaming-apps.nix: use pkgs, reorder packages and add wineWow64Packages.staging, steam-run and appimage-run
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
{
|
||||
pkgs,
|
||||
pkgs-stable,
|
||||
...
|
||||
}: {
|
||||
home.packages = (with pkgs-stable; [
|
||||
home.packages = (with pkgs; [
|
||||
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
# Game launchers
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
|
||||
lutris # Universal launcher for Wine, emulators, and native games
|
||||
#prismlauncher # Minecraft launcher with Fabric/Forge/Quilt support
|
||||
#prismlauncher # Minecraft launcher with Fabric/Forge/Quilt support
|
||||
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
# Performance & overlays
|
||||
@@ -28,18 +27,19 @@
|
||||
protonup-qt # Install and update GE-Proton, Wine-GE, Luxtorpeda, etc.
|
||||
winetricks # Install Windows runtimes into Wine prefixes
|
||||
protontricks # Winetricks for Steam Proton prefixes
|
||||
wineWow64Packages.staging # Wine (32/64-bit) with staging patches
|
||||
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
# Vulkan layers
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
|
||||
vkbasalt # Vulkan post-processing (CAS sharpening, FXAA, etc.)
|
||||
])
|
||||
|
||||
++ (with pkgs; [
|
||||
wineWow64Packages.staging # Wine (32/64-bit) with staging patches
|
||||
|
||||
steam-run # Run generic Linux binaries inside Steam's runtime
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
# Runner layers
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
steam-run # Run generic Linux binaries inside Steam's runtime
|
||||
appimage-run # Execute AppImages on NixOS
|
||||
|
||||
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -2,29 +2,226 @@
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
pkgs-nur-hadi,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
colors = config.lib.stylix.colors;
|
||||
|
||||
mkMenu = menu: let
|
||||
configFile = pkgs.writeText "config.yaml" (
|
||||
lib.generators.toYAML {} {
|
||||
anchor = "bottom-right";
|
||||
border = "#${colors.base0D}80";
|
||||
background = "#${colors.base01}EE";
|
||||
color = "#${colors.base05}";
|
||||
margin_right = 15;
|
||||
margin_bottom = 15;
|
||||
rows_per_column = 5;
|
||||
mkMenu = menu:
|
||||
let
|
||||
configFile = pkgs.writeText "config.yaml" (
|
||||
lib.generators.toYAML { } {
|
||||
anchor = "bottom-right";
|
||||
border = "#${colors.base0D}80";
|
||||
background = "#${colors.base01}EE";
|
||||
color = "#${colors.base05}";
|
||||
margin_right = 15;
|
||||
margin_bottom = 15;
|
||||
rows_per_column = 5;
|
||||
|
||||
inherit menu;
|
||||
}
|
||||
);
|
||||
in
|
||||
inherit menu;
|
||||
}
|
||||
);
|
||||
in
|
||||
pkgs.writeShellScriptBin "menu" ''
|
||||
exec ${lib.getExe pkgs.wlr-which-key} ${configFile}
|
||||
'';
|
||||
in {
|
||||
|
||||
gui = exe: "uwsm app -- ${exe}";
|
||||
term = exe: "uwsm app -- ${pkgs.ghostty}/bin/ghostty -e ${exe}";
|
||||
|
||||
appsMenu = mkMenu [
|
||||
{
|
||||
key = "f";
|
||||
desc = "Firefox";
|
||||
cmd = gui "${pkgs.firefox}/bin/firefox";
|
||||
}
|
||||
{
|
||||
key = "o";
|
||||
desc = "Obsidian";
|
||||
cmd = gui "${pkgs.obsidian}/bin/obsidian";
|
||||
}
|
||||
{
|
||||
key = "t";
|
||||
desc = "TickTick";
|
||||
cmd = gui "${pkgs.ticktick}/bin/ticktick";
|
||||
}
|
||||
{
|
||||
key = "n";
|
||||
desc = "OnlyOffice";
|
||||
cmd = gui "${pkgs.onlyoffice-desktopeditors}/bin/onlyoffice-desktopeditors";
|
||||
}
|
||||
{
|
||||
key = "v";
|
||||
desc = "Vesktop";
|
||||
cmd = gui "${pkgs.vesktop}/bin/vesktop";
|
||||
}
|
||||
{
|
||||
key = "l";
|
||||
desc = "VLC";
|
||||
cmd = gui "${pkgs.vlc}/bin/vlc";
|
||||
}
|
||||
];
|
||||
|
||||
devMenu = mkMenu [
|
||||
{
|
||||
key = "z";
|
||||
desc = "Zed";
|
||||
cmd = gui "${pkgs.zed-editor}/bin/zed";
|
||||
}
|
||||
{
|
||||
key = "c";
|
||||
desc = "VSCodium";
|
||||
cmd = gui "${pkgs.vscodium}/bin/codium";
|
||||
}
|
||||
{
|
||||
key = "g";
|
||||
desc = "Ghostty";
|
||||
cmd = gui "${pkgs.ghostty}/bin/ghostty";
|
||||
}
|
||||
{
|
||||
key = "f";
|
||||
desc = "Fastfetch";
|
||||
cmd = term "${pkgs.fastfetch}/bin/fastfetch";
|
||||
}
|
||||
{
|
||||
key = "d";
|
||||
desc = "Dysk";
|
||||
cmd = term "${pkgs.dysk}/bin/dysk";
|
||||
}
|
||||
{
|
||||
key = "w";
|
||||
desc = "Wikiman";
|
||||
cmd = term "${pkgs.wikiman}/bin/wikiman";
|
||||
}
|
||||
{
|
||||
key = "s";
|
||||
desc = "STTR";
|
||||
cmd = term "${pkgs.sttr}/bin/sttr";
|
||||
}
|
||||
];
|
||||
|
||||
gamingMenu = mkMenu [
|
||||
{
|
||||
key = "l";
|
||||
desc = "Lutris";
|
||||
cmd = gui "${pkgs.lutris}/bin/lutris";
|
||||
}
|
||||
{
|
||||
key = "p";
|
||||
desc = "ProtonUp-Qt";
|
||||
cmd = gui "${pkgs.protonup-qt}/bin/protonup-qt";
|
||||
}
|
||||
{
|
||||
key = "g";
|
||||
desc = "GOverlay";
|
||||
cmd = gui "${pkgs.goverlay}/bin/goverlay";
|
||||
}
|
||||
];
|
||||
|
||||
utilityMenu = mkMenu [
|
||||
{
|
||||
key = "B";
|
||||
desc = "Blueman";
|
||||
cmd = gui "${pkgs.blueman}/bin/blueman-manager";
|
||||
}
|
||||
{
|
||||
key = "x";
|
||||
desc = "Bluetoothctl";
|
||||
cmd = term "${pkgs.bluez}/bin/bluetoothctl";
|
||||
}
|
||||
{
|
||||
key = "w";
|
||||
desc = "WiFi TUI";
|
||||
cmd = term "${pkgs.wifitui}/bin/wifitui";
|
||||
}
|
||||
{
|
||||
key = "m";
|
||||
desc = "Wiremix";
|
||||
cmd = term "${pkgs.wiremix}/bin/wiremix";
|
||||
}
|
||||
{
|
||||
key = "u";
|
||||
desc = "USBGuard TUI";
|
||||
cmd = term "${pkgs-nur-hadi.usbguard-tui}/bin/usbguard-tui";
|
||||
}
|
||||
{
|
||||
key = "c";
|
||||
desc = "Caligula";
|
||||
cmd = term "${pkgs.caligula}/bin/caligula";
|
||||
}
|
||||
{
|
||||
key = "h";
|
||||
desc = "Browsh";
|
||||
cmd = term "${pkgs.browsh}/bin/browsh";
|
||||
}
|
||||
{
|
||||
key = "p";
|
||||
desc = "Peaclock";
|
||||
cmd = term "${pkgs.peaclock}/bin/peaclock";
|
||||
}
|
||||
{
|
||||
key = "o";
|
||||
desc = "Cbonsai";
|
||||
cmd = term "${pkgs.cbonsai}/bin/cbonsai";
|
||||
}
|
||||
{
|
||||
key = "i";
|
||||
desc = "Pipes";
|
||||
cmd = term "${pkgs.pipes}/bin/pipes";
|
||||
}
|
||||
{
|
||||
key = "t";
|
||||
desc = "Tealdeer";
|
||||
cmd = term "${pkgs.tealdeer}/bin/tldr";
|
||||
}
|
||||
{
|
||||
key = "s";
|
||||
desc = "Hyprlock";
|
||||
cmd = gui "${pkgs.hyprlock}/bin/hyprlock";
|
||||
}
|
||||
];
|
||||
|
||||
systemMenu = mkMenu [
|
||||
{
|
||||
key = "l";
|
||||
desc = "Lock";
|
||||
cmd = "hyprlock";
|
||||
}
|
||||
{
|
||||
key = "w";
|
||||
desc = "Restart Waybar";
|
||||
cmd = "pkill -x waybar; waybar";
|
||||
}
|
||||
{
|
||||
key = "r";
|
||||
desc = "Restart Walker";
|
||||
cmd = "systemctl --user restart walker.service";
|
||||
}
|
||||
{
|
||||
key = "e";
|
||||
desc = "Restart Elephant";
|
||||
cmd = "systemctl --user restart elephant.service";
|
||||
}
|
||||
{
|
||||
key = "s";
|
||||
desc = "Suspend";
|
||||
cmd = "systemctl suspend";
|
||||
}
|
||||
{
|
||||
key = "p";
|
||||
desc = "Power Off";
|
||||
cmd = "systemctl poweroff";
|
||||
}
|
||||
{
|
||||
key = "b";
|
||||
desc = "Reboot";
|
||||
cmd = "systemctl reboot";
|
||||
}
|
||||
];
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
"$mod" = "SUPER";
|
||||
"$shiftMod" = "SUPER_SHIFT";
|
||||
@@ -37,53 +234,28 @@ in {
|
||||
+ lib.getExe (mkMenu [
|
||||
{
|
||||
key = "a";
|
||||
desc = "Proton Authenticator";
|
||||
cmd = "env WEBKIT_DISABLE_COMPOSITING_MODE=1 ${pkgs.proton-authenticator}/bin/proton-authenticator";
|
||||
desc = "Apps";
|
||||
cmd = lib.getExe appsMenu;
|
||||
}
|
||||
{
|
||||
key = "p";
|
||||
desc = "Proton Pass";
|
||||
cmd = "${pkgs.proton-pass}/bin/proton-pass";
|
||||
key = "d";
|
||||
desc = "Dev";
|
||||
cmd = lib.getExe devMenu;
|
||||
}
|
||||
{
|
||||
key = "v";
|
||||
desc = "Proton VPN";
|
||||
cmd = "${pkgs.proton-vpn}/bin/protonvpn-app";
|
||||
key = "g";
|
||||
desc = "Gaming";
|
||||
cmd = lib.getExe gamingMenu;
|
||||
}
|
||||
{
|
||||
key = "c";
|
||||
desc = "Proton Calendar";
|
||||
cmd = "${config.programs.librewolf.package}/bin/helium 'https://calendar.proton.me/'";
|
||||
}
|
||||
{
|
||||
key = "m";
|
||||
desc = "Proton Mail";
|
||||
cmd = "${config.programs.librewolf.package}/bin/helium 'https://mail.proton.me/'";
|
||||
}
|
||||
{
|
||||
key = "o";
|
||||
desc = "Obsidian";
|
||||
cmd = "${pkgs.obsidian}/bin/obsidian";
|
||||
key = "u";
|
||||
desc = "Utilities";
|
||||
cmd = lib.getExe utilityMenu;
|
||||
}
|
||||
{
|
||||
key = "s";
|
||||
desc = "Signal";
|
||||
cmd = "${pkgs.signal-desktop}/bin/signal-desktop";
|
||||
}
|
||||
{
|
||||
key = "t";
|
||||
desc = "TickTick";
|
||||
cmd = "${pkgs.ticktick}/bin/ticktick";
|
||||
}
|
||||
{
|
||||
key = "b";
|
||||
desc = "Helium";
|
||||
cmd = "${config.programs.librewolf.package}/bin/helium";
|
||||
}
|
||||
{
|
||||
key = "i";
|
||||
desc = "Helium (Incognito)";
|
||||
cmd = "${config.programs.librewolf.package}/bin/helium --incognito";
|
||||
desc = "System";
|
||||
cmd = lib.getExe systemMenu;
|
||||
}
|
||||
])
|
||||
)
|
||||
@@ -97,7 +269,7 @@ in {
|
||||
{
|
||||
key = "l";
|
||||
desc = "Lock";
|
||||
cmd = "loginctl lock-session";
|
||||
cmd = "hyprlock";
|
||||
}
|
||||
{
|
||||
key = "s";
|
||||
@@ -172,23 +344,21 @@ in {
|
||||
];
|
||||
|
||||
bindl = [
|
||||
# Brightness
|
||||
", XF86MonBrightnessUp, exec, ${lib.getExe pkgs.brightnessctl} set 5%+"
|
||||
", XF86MonBrightnessDown, exec, ${lib.getExe pkgs.brightnessctl} set 5%-"
|
||||
|
||||
# Media
|
||||
", XF86AudioPlay, exec, ${lib.getExe pkgs.playerctl} play-pause"
|
||||
", XF86AudioPause, exec, ${lib.getExe pkgs.playerctl} play-pause"
|
||||
", XF86AudioNext, exec, ${lib.getExe pkgs.playerctl} next"
|
||||
", XF86AudioPrev, exec, ${lib.getExe pkgs.playerctl} previous"
|
||||
", XF86AudioStop, exec, ${lib.getExe pkgs.playerctl} stop"
|
||||
|
||||
# Sound
|
||||
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
", XF86AudioRaiseVolume, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ 0; wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"
|
||||
", XF86AudioLowerVolume, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ 0; wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||
];
|
||||
# Brightness
|
||||
", XF86MonBrightnessUp, exec, ${lib.getExe pkgs.brightnessctl} set 5%+"
|
||||
", XF86MonBrightnessDown, exec, ${lib.getExe pkgs.brightnessctl} set 5%-"
|
||||
|
||||
# Media
|
||||
", XF86AudioPlay, exec, ${lib.getExe pkgs.playerctl} play-pause"
|
||||
", XF86AudioPause, exec, ${lib.getExe pkgs.playerctl} play-pause"
|
||||
", XF86AudioNext, exec, ${lib.getExe pkgs.playerctl} next"
|
||||
", XF86AudioPrev, exec, ${lib.getExe pkgs.playerctl} previous"
|
||||
", XF86AudioStop, exec, ${lib.getExe pkgs.playerctl} stop"
|
||||
|
||||
# Sound
|
||||
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
", XF86AudioRaiseVolume, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ 0; wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"
|
||||
", XF86AudioLowerVolume, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ 0; wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ in {
|
||||
./animations.nix
|
||||
./bindings.nix
|
||||
./polkitagent.nix
|
||||
./hyprlock.nix
|
||||
./keyboard-backlight.nix # CHANGEME: This is for omen laptop only
|
||||
];
|
||||
|
||||
@@ -31,6 +32,7 @@ in {
|
||||
libxcb
|
||||
hyprland-qtutils
|
||||
adw-gtk3
|
||||
hyprlock
|
||||
hyprshot
|
||||
hyprpicker
|
||||
swappy
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
{config, ...}: let
|
||||
c = config.lib.stylix.colors;
|
||||
fontSans = config.stylix.fonts.sansSerif.name;
|
||||
in {
|
||||
xdg.configFile."hypr/hyprlock.conf".text = ''
|
||||
general {
|
||||
hide_cursor = true
|
||||
grace = 0
|
||||
}
|
||||
|
||||
background {
|
||||
monitor =
|
||||
color = rgba(${c."base00-rgb-r"}, ${c."base00-rgb-g"}, ${c."base00-rgb-b"}, 0.90)
|
||||
blur_passes = 2
|
||||
blur_size = 8
|
||||
noise = 0.01
|
||||
}
|
||||
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:1000] date +"%A, %d %B %Y"
|
||||
color = rgba(${c."base05-rgb-r"}, ${c."base05-rgb-g"}, ${c."base05-rgb-b"}, 1.0)
|
||||
font_size = 30
|
||||
font_family = "${fontSans}"
|
||||
position = 0, 140
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:1000] date +"%H:%M"
|
||||
color = rgba(${c."base0D-rgb-r"}, ${c."base0D-rgb-g"}, ${c."base0D-rgb-b"}, 1.0)
|
||||
font_size = 54
|
||||
font_family = "${fontSans}"
|
||||
position = 0, 60
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
input-field {
|
||||
monitor =
|
||||
size = 320, 52
|
||||
outline_thickness = 2
|
||||
outer_color = rgba(${c."base03-rgb-r"}, ${c."base03-rgb-g"}, ${c."base03-rgb-b"}, 0.60)
|
||||
inner_color = rgba(${c."base01-rgb-r"}, ${c."base01-rgb-g"}, ${c."base01-rgb-b"}, 0.92)
|
||||
font_color = rgba(${c."base05-rgb-r"}, ${c."base05-rgb-g"}, ${c."base05-rgb-b"}, 1.0)
|
||||
fail_color = rgba(${c."base08-rgb-r"}, ${c."base08-rgb-g"}, ${c."base08-rgb-b"}, 1.0)
|
||||
check_color = rgba(${c."base0B-rgb-r"}, ${c."base0B-rgb-g"}, ${c."base0B-rgb-b"}, 1.0)
|
||||
dots_spacing = 0.3
|
||||
dots_center = true
|
||||
hide_input = false
|
||||
position = 0, -20
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user