Compare commits
2 Commits
40b7db2c00
...
f7ab887ed0
| Author | SHA1 | Date | |
|---|---|---|---|
| f7ab887ed0 | |||
| fe0d006f2e |
@@ -74,7 +74,7 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
wayland.windowManager.hyprland.settings.exec-once = [
|
wayland.windowManager.hyprland.settings.exec-once = [
|
||||||
"[workspace 1] uwsm app -- ghostty -e bash -c 'fastfetch; exec $SHELL'" # TODO: must be xdg-terminal-exec, or default user terminal
|
|
||||||
"[workspace special:preload silent] uwsm app -- xdg-terminal-exec"
|
"[workspace special:preload silent] uwsm app -- xdg-terminal-exec"
|
||||||
|
"[workspace 1] uwsm app -- ghostty -e bash -c 'fastfetch; exec $SHELL'" # TODO: must be xdg-terminal-exec, or default user terminal
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-33
@@ -18,39 +18,13 @@
|
|||||||
# Close special workspace on gaming monitor if open
|
# Close special workspace on gaming monitor if open
|
||||||
special=$(${pkgs.hyprland}/bin/hyprctl monitors -j | ${pkgs.jq}/bin/jq -r '.[] | select(.name == "${gamingMonitor}") | .specialWorkspace.name')
|
special=$(${pkgs.hyprland}/bin/hyprctl monitors -j | ${pkgs.jq}/bin/jq -r '.[] | select(.name == "${gamingMonitor}") | .specialWorkspace.name')
|
||||||
if [[ -n "$special" ]]; then
|
if [[ -n "$special" ]]; then
|
||||||
${pkgs.hyprland}/bin/hyprctl --batch "dispatch focusmonitor ${gamingMonitor};dispatch togglespecialworkspace ''${special#special:};dispatch focusmonitor ${gamingMonitor};dispatch workspace name:gaming"
|
# Gaming workspace is already underneath — just close the special overlay
|
||||||
|
${pkgs.hyprland}/bin/hyprctl --batch "dispatch focusmonitor ${gamingMonitor};dispatch togglespecialworkspace ''${special#special:}"
|
||||||
else
|
else
|
||||||
${pkgs.hyprland}/bin/hyprctl --batch "dispatch focusmonitor ${gamingMonitor};dispatch workspace name:gaming"
|
${pkgs.hyprland}/bin/hyprctl --batch "dispatch focusmonitor ${gamingMonitor};dispatch workspace name:gaming"
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
game-focus-watcher = pkgs.writeShellScriptBin "game-focus-watcher" ''
|
|
||||||
handle() {
|
|
||||||
case $1 in
|
|
||||||
openwindow*)
|
|
||||||
data="''${1#openwindow>>}"
|
|
||||||
class=$(echo "$data" | cut -d',' -f3)
|
|
||||||
if [[ "$class" =~ ^steam_app_[0-9]+ ]] || \
|
|
||||||
[[ "$class" == "gamescope" ]] || \
|
|
||||||
[[ "$class" =~ ^wine- ]] || \
|
|
||||||
[[ "$class" == "lutris" ]] || \
|
|
||||||
[[ "$class" == "heroic" ]]; then
|
|
||||||
special=$(${pkgs.hyprland}/bin/hyprctl monitors -j | ${pkgs.jq}/bin/jq -r '.[] | select(.name == "${gamingMonitor}") | .specialWorkspace.name')
|
|
||||||
if [[ -n "$special" ]]; then
|
|
||||||
${pkgs.hyprland}/bin/hyprctl --batch "dispatch focusmonitor ${gamingMonitor};dispatch togglespecialworkspace ''${special#special:};dispatch focusmonitor ${gamingMonitor};dispatch workspace name:gaming"
|
|
||||||
else
|
|
||||||
${pkgs.hyprland}/bin/hyprctl --batch "dispatch focusmonitor ${gamingMonitor};dispatch workspace name:gaming"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
${pkgs.socat}/bin/socat - "UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" | while read -r line; do
|
|
||||||
handle "$line"
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Games that should have `stayfocused` applied (to avoid multi-monitor focus issues)
|
# Games that should have `stayfocused` applied (to avoid multi-monitor focus issues)
|
||||||
stayFocusedGames = [
|
stayFocusedGames = [
|
||||||
# "Deadlock"
|
# "Deadlock"
|
||||||
@@ -78,7 +52,6 @@ in {
|
|||||||
protontricks
|
protontricks
|
||||||
mangohud
|
mangohud
|
||||||
gaming-focus
|
gaming-focus
|
||||||
game-focus-watcher
|
|
||||||
# via
|
# via
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -101,7 +74,6 @@ in {
|
|||||||
|
|
||||||
exec-once = [
|
exec-once = [
|
||||||
"[workspace special:steam silent] uwsm app -- steam"
|
"[workspace special:steam silent] uwsm app -- steam"
|
||||||
"game-focus-watcher"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
bindd = [
|
bindd = [
|
||||||
@@ -126,9 +98,7 @@ in {
|
|||||||
# --- STEAM CLIENT OVERRIDE ---
|
# --- STEAM CLIENT OVERRIDE ---
|
||||||
# Override the float for the main Steam client, tile it, and move it to the special workspace.
|
# Override the float for the main Steam client, tile it, and move it to the special workspace.
|
||||||
"tile, class:^(steam)$, title:^(Steam)$"
|
"tile, class:^(steam)$, title:^(Steam)$"
|
||||||
# All steam class windows go to special:steam (dialogs, store, friends, etc.)
|
"workspace special:steam, class:^(steam)$, title:^(Steam)$"
|
||||||
# Game overrides below take precedence for actual games.
|
|
||||||
"workspace special:steam, class:^(steam)$"
|
|
||||||
|
|
||||||
# --- STEAM GAME OVERRIDES ---
|
# --- STEAM GAME OVERRIDES ---
|
||||||
# Override the float for actual games and move them to the gaming workspace.
|
# Override the float for actual games and move them to the gaming workspace.
|
||||||
|
|||||||
Reference in New Issue
Block a user