Added powermenu
This commit is contained in:
+350
-324
File diff suppressed because it is too large
Load Diff
@@ -1636,6 +1636,7 @@ This module will import all necessities.
|
|||||||
./desktop/hyprlock.nix
|
./desktop/hyprlock.nix
|
||||||
./desktop/hyprscrolling.nix
|
./desktop/hyprscrolling.nix
|
||||||
./desktop/hyprshell.nix
|
./desktop/hyprshell.nix
|
||||||
|
./desktop/powermenu.nix
|
||||||
#./desktop/animated_wallpaper.nix
|
#./desktop/animated_wallpaper.nix
|
||||||
#./desktop/rotating_wallpaper.nix
|
#./desktop/rotating_wallpaper.nix
|
||||||
./desktop/workspace_wallpaper.nix
|
./desktop/workspace_wallpaper.nix
|
||||||
@@ -1657,6 +1658,24 @@ This module will import all necessities.
|
|||||||
}
|
}
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
** Powermenu
|
||||||
|
Creates a script for a powermenu
|
||||||
|
#+begin_src nix :tangle home/desktop/powermenu.nix :noweb tangle :mkdirp yes
|
||||||
|
{ config, lib, pkgs, flakeRoot, ... }:
|
||||||
|
let
|
||||||
|
repoScript =
|
||||||
|
flakeRoot + "/assets/conf/desktop/hypr/scripts/powermenu.sh";
|
||||||
|
targetRel = "hypr/scripts/powermenu.sh";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# Ensure script exists in ~/.config/hypr/scripts/
|
||||||
|
xdg.configFile."${targetRel}" = {
|
||||||
|
source = repoScript;
|
||||||
|
executable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** Animated Wallpaper
|
** Animated Wallpaper
|
||||||
userRelRoot = "nixos_conf/wallpaperstuff";
|
userRelRoot = "nixos_conf/wallpaperstuff";
|
||||||
animated_wallpaper.nix installs mpvpaper and deploys your wallpaper files from the repo (./assets/conf/desktop/wallpaper) into ~/conf/desktop/wallpaper/pictures.
|
animated_wallpaper.nix installs mpvpaper and deploys your wallpaper files from the repo (./assets/conf/desktop/wallpaper) into ~/conf/desktop/wallpaper/pictures.
|
||||||
|
|||||||
@@ -157,6 +157,7 @@ bind = , XF86Sleep, exec, systemctl suspend
|
|||||||
bind = , XF86PowerOff, exec, systemctl poweroff
|
bind = , XF86PowerOff, exec, systemctl poweroff
|
||||||
bind = , XF86WakeUp, exec, systemctl suspend
|
bind = , XF86WakeUp, exec, systemctl suspend
|
||||||
bind = $mainMod, L, exec, loginctl lock-session
|
bind = $mainMod, L, exec, loginctl lock-session
|
||||||
|
bind = $mainMod, X, exec, ~/.config/hypr/scripts/powermenu.sh
|
||||||
|
|
||||||
#########################
|
#########################
|
||||||
# Laptop lid settings
|
# Laptop lid settings
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
OPTIONS=" Lock
|
||||||
|
Logout (Hyprland)
|
||||||
|
Suspend
|
||||||
|
Hibernate
|
||||||
|
Reboot
|
||||||
|
Shutdown
|
||||||
|
Cancel"
|
||||||
|
|
||||||
|
CHOICE=$(printf "%s" "$OPTIONS" | walker --dmenu )
|
||||||
|
|
||||||
|
case "$CHOICE" in
|
||||||
|
"Lock")
|
||||||
|
loginctl lock-session
|
||||||
|
;;
|
||||||
|
"Logout (Hyprland)")
|
||||||
|
hyprctl dispatch exit
|
||||||
|
;;
|
||||||
|
"Suspend")
|
||||||
|
loginctl lock-session && systemctl suspend
|
||||||
|
;;
|
||||||
|
"Hibernate")
|
||||||
|
loginctl lock-session && systemctl hibernate
|
||||||
|
;;
|
||||||
|
"Reboot")
|
||||||
|
systemctl reboot
|
||||||
|
;;
|
||||||
|
"Shutdown")
|
||||||
|
systemctl poweroff
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
@@ -10,6 +10,7 @@
|
|||||||
./desktop/hyprlock.nix
|
./desktop/hyprlock.nix
|
||||||
./desktop/hyprscrolling.nix
|
./desktop/hyprscrolling.nix
|
||||||
./desktop/hyprshell.nix
|
./desktop/hyprshell.nix
|
||||||
|
./desktop/powermenu.nix
|
||||||
#./desktop/animated_wallpaper.nix
|
#./desktop/animated_wallpaper.nix
|
||||||
#./desktop/rotating_wallpaper.nix
|
#./desktop/rotating_wallpaper.nix
|
||||||
./desktop/workspace_wallpaper.nix
|
./desktop/workspace_wallpaper.nix
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{ config, lib, pkgs, flakeRoot, ... }:
|
||||||
|
let
|
||||||
|
repoScript =
|
||||||
|
flakeRoot + "/assets/conf/desktop/hypr/scripts/powermenu.sh";
|
||||||
|
targetRel = "hypr/scripts/powermenu.sh";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# Ensure script exists in ~/.config/hypr/scripts/
|
||||||
|
xdg.configFile."${targetRel}" = {
|
||||||
|
source = repoScript;
|
||||||
|
executable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user