hyprland migrate exec-once to hl.exec_cmd

This commit is contained in:
tomasr committed 2026-08-13 16:13:05 +02:00
1 parent 13cdae0655
commit d7e51d1ba5
1 file changed
+40 -5
+40 -5
View File
@@ -37,12 +37,20 @@
# Enable the X11 windowing system.
services.xserver.enable = true;
};
flake.homeModules.hyprland-laptop = _: {
flake.homeModules.hyprland-laptop = {lib, ...}: {
wayland.windowManager.hyprland.settings = {
exec-once = [
"qtbatticon" # custom battery tray
"nixpkgs-notifier listen" # tracks PR merge in nixos-unstable
on = {
_args = [
"hyprland.start"
(lib.generators.mkLuaInline ''
function()
hl.exec_cmd("qtbatticon") --- custom battery tray
hl.exec_cmd("source /run/agenix/ntfy && nixpkgs-notifier listen") --- tracks PR merge in nixos-unstable
end
'')
];
};
monitor = [
"eDP-1, highres@highrr, 0x0, 1"
];
@@ -67,7 +75,7 @@
];
};
};
flake.homeModules.hyprland = {pkgs-unstable, ...}: let
flake.homeModules.hyprland = {pkgs-unstable, lib, ...}: let
wallpaper = ../../assets/wallpaper1.jpg;
in {
#refer to https://wiki.hypr.land/Nix/Hyprland-on-Home-Manager/
@@ -266,6 +274,7 @@
];
# █░░ ▄▀█ █░█ █▄░█ █▀▀ █░█
# █▄▄ █▀█ █▄█ █░▀█ █▄▄ █▀█
<<<<<<< HEAD
exec-once = [
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" # for XDPH
"dbus-update-activation-environment --systemd --all" # for XDPH
@@ -307,6 +316,32 @@
######################
*/
];
=======
on = {
_args = [
"hyprland.start"
(lib.generators.mkLuaInline ''
hl.exec_cmd("dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP") -- for XDPH
hl.exec_cmd("dbus-update-activation-environment --systemd --all") -- for XDPH
hl.exec_cmd("systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP") -- for XDPH
hl.exec_cmd("systemctl --user start xdg-desktop-portal-wlr.service")
hl.exec_cmd("blueman-applet") -- systray app for Bluetooth
hl.exec_cmd("udiskie --no-automount --smart-tray") -- front-end that allows to manage removable media
hl.exec_cmd("nm-applet --indicator") -- systray app for Network/wifi
hl.exec_cmd("rm -rf ~/.cache/cliphist/ && wl-paste --type text --watch cliphist store & wl-paste --type image --watch cliphist store")
hl.exec_cmd("custom-batterynotify")
hl.exec_cmd("custom-batterywarning")
hl.exec_cmd("awww img ${wallpaper}")
hl.exec_cmd("awww-daemon")
hl.exec_cmd("sleep 1 && custom-wallpaper")
hl.exec_cmd("custom-checkKdrive && custom-mountkdrive") -- checks if the remote works and mount it
hl.exec_cmd("custom-gitnotify")
hl.exec_cmd("sleep 4 & caelestia-shell") -- works better if it sleeps a bit before
hl.exec_cmd("sleep 20 && ngcp pull --automatic") -- see github.com/tomasriveral/nix-git-cherry-picker
'')
];
};
>>>>>>> a37174c (hyprland migrate exec-once to hl.exec_cmd)
splash = true; # remove default background on startup
# gestures (also keybindings)
gesture = [