🔧 chore(hypr): add $exec variable, use uwsm everywhere

This commit is contained in:
retrozinndev
2025-06-15 23:37:04 -03:00
parent a669e1acc3
commit 171d6408d1
5 changed files with 36 additions and 16 deletions
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
# This script executes the provided program with UWSM
# if in usage or launches it normally with hyprctl.
# ---------------
# Licensed under the MIT License
# Made by retrozinndev (João Dias)
# From: https://github.com/retrozinndev/colorshell
if uwsm check is-active; then
hyprctl dispatch exec "uwsm app -- $@" > /dev/null
exit 0
fi
hyprctl dispatch exec "$@" > /dev/null
+5 -5
View File
@@ -6,16 +6,16 @@
exec-once = systemctl enable --user --now hyprpolkitagent # Hyprland's PolKit
exec-once = systemctl enable --user --now hypridle
exec-once = systemctl enable --user --now gnome-keyring-daemon
exec-once = uwsm app -- wl-paste --type text --watch cliphist store
exec-once = uwsm app -- wl-paste --type image --watch cliphist store
exec-once = $exec wl-paste --type text --watch cliphist store
exec-once = $exec wl-paste --type image --watch cliphist store
# Tools
exec-once = systemctl enable --user --now hyprsunset
exec-once = systemctl enable --user --now hyprpaper
# Scripts
exec-once = uwsm app -- sh $XDG_CONFIG_HOME/hypr/scripts/gen-pywal.sh
exec-once = uwsm app -- sleep 3 && sh $XDG_CONFIG_HOME/hypr/scripts/load-hyprsunset.sh # wait some time to actually set the filters
exec-once = $exec sh $XDG_CONFIG_HOME/hypr/scripts/gen-pywal.sh
exec-once = $exec sleep 3 && sh $XDG_CONFIG_HOME/hypr/scripts/load-hyprsunset.sh # wait some time to actually set the filters
# Shell
exec-once = uwsm app -- ags run
exec-once = $exec ags run
+10 -8
View File
@@ -1,26 +1,28 @@
# color-shell specific configuration, please don't modify unless you know what you're doing!
# `astal` and some `.*ctl` commands don't need $exec (uwsm), since it's just some process communication
bind = $mainMod, SPACE, exec, $menu
bind = $mainMod, F11, fullscreen
bind = , Print, exec, sh $XDG_CONFIG_HOME/hypr/scripts/screenshot.sh
bind = $mainMod, Print, exec, sh $XDG_CONFIG_HOME/hypr/scripts/screenshot.sh full
bind = , Print, exec, $exec sh $XDG_CONFIG_HOME/hypr/scripts/screenshot.sh
bind = $mainMod, Print, exec, $exec sh $XDG_CONFIG_HOME/hypr/scripts/screenshot.sh full
# Test-only bind, restarts colorshell
bind = $mainMod, F7, exec, ags request reload
# restarts colorshell
bind = $mainMod, F7, exec, astal reload
bind = $mainMod, K, exec, $terminal
bind = $mainMod, K, exec, $exec $terminal
bind = $mainMod, Q, killactive
bind = $mainMod, E, exec, $fm
bind = $mainMod, E, exec, $exec $fm
bind = $mainMod, F, togglefloating
bind = $mainMod, P, pseudo,
bind = $mainMod, J, togglesplit
bind = $mainMod, N, exec, astal toggle control-center
bind = $mainMod, M, exec, astal toggle center-window
bind = $mainMod, L, exec, hyprlock
bind = $mainMod, V, exec, astal runner '>' || sh $XDG_CONFIG_HOME/hypr/scripts/clipboard-menu.sh
bind = $mainMod, L, exec, $exec hyprlock
bind = $mainMod, V, exec, astal runner '>' || $exec sh $XDG_CONFIG_HOME/hypr/scripts/clipboard-menu.sh
bind = $mainMod, W, exec, astal runner '##'
# bind = $mainMod, $mainMod_L, exec, astal toggle apps-window
+1 -1
View File
@@ -25,5 +25,5 @@ env = QT_QPA_PLATFORMTHEME, qt5ct
env = QT_AUTO_SCREEN_SCALE_FACTOR, 1
# Others
env = ADW_DISABLE_PORTAL, 1 # Fixes prefer-dark theme setting in some flatpak apps
env = ADW_DISABLE_PORTAL, 1 # Fixes prefer-dark setting in some gtk flatpak apps
env = WALLPAPERS, $HOME/wallpapers
+4 -2
View File
@@ -6,8 +6,10 @@
###############
# Wiki: https://wiki.hyprland.org/Hypr-Ecosystem/hyprlang#defining-variables
# Use this variable to execute apps dinamically (runs with uwsm if being used by compositor)
$exec = sh $XDG_CONFIG_HOME/hypr/scripts/exec.sh
$mainMod = SUPER
$terminal = kitty
$fm = nautilus
$menu = astal runner || anyrun
$dmenu = anyrun --plugins libstdin.so
$menu = astal runner