simplified workspaces
This commit is contained in:
@@ -58,12 +58,12 @@ bind = $mainMod, F4, exec, $soundctl
|
||||
bind = $mainMod, A, submap, quickws
|
||||
|
||||
submap = quickws
|
||||
bind = , a, exec, hypr-element-toggle
|
||||
bind = , s, exec, hypr-steam-toggle
|
||||
bind = , d, exec, hypr-comms-toggle
|
||||
bind = , z, exec, hypr-mail-toggle
|
||||
bind = , x, exec, hypr-joplin-toggle
|
||||
bind = , c, exec, hypr-spotify-toggle
|
||||
bind = , a, exec, hyprctl dispatch workspace name:element && hyprctl dispatch submap reset
|
||||
bind = , s, exec, hyprctl dispatch workspace name:steam && hyprctl dispatch submap reset
|
||||
bind = , d, exec, hyprctl dispatch workspace name:comms && hyprctl dispatch submap reset
|
||||
bind = , z, exec, hyprctl dispatch workspace name:mail && hyprctl dispatch submap reset
|
||||
bind = , x, exec, hyprctl dispatch workspace name:joplin && hyprctl dispatch submap reset
|
||||
bind = , c, exec, hyprctl dispatch workspace name:spotify && hyprctl dispatch submap reset
|
||||
bind = , Escape, submap, reset
|
||||
bind = , Return, submap, reset
|
||||
submap = reset
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
comms_ws="name:comms"
|
||||
comms_name="comms"
|
||||
|
||||
active_name=""
|
||||
if json="$(hyprctl -j activeworkspace 2>/dev/null)"; then
|
||||
if command -v jq >/dev/null 2>&1; then
|
||||
active_name="$(printf '%s' "$json" | jq -r '.name // empty')"
|
||||
else
|
||||
active_name="$(printf '%s' "$json" | sed -n 's/.*"name":"\\([^"]*\\)".*/\\1/p')"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z "$active_name" ]]; then
|
||||
active_name="$(hyprctl activeworkspace 2>/dev/null | sed -n 's/.*(\\(.*\\)).*/\\1/p' | head -n1)"
|
||||
fi
|
||||
|
||||
if [[ "$active_name" == "$comms_name" || "$active_name" == "$comms_ws" ]]; then
|
||||
hyprctl dispatch workspace previous
|
||||
else
|
||||
hyprctl dispatch moveworkspacetomonitor "$comms_ws" current
|
||||
hyprctl dispatch workspace "$comms_ws"
|
||||
fi
|
||||
@@ -1,25 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
element_ws="name:element"
|
||||
element_name="element"
|
||||
|
||||
active_name=""
|
||||
if json="$(hyprctl -j activeworkspace 2>/dev/null)"; then
|
||||
if command -v jq >/dev/null 2>&1; then
|
||||
active_name="$(printf '%s' "$json" | jq -r '.name // empty')"
|
||||
else
|
||||
active_name="$(printf '%s' "$json" | sed -n 's/.*"name":"\\([^"]*\\)".*/\\1/p')"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z "$active_name" ]]; then
|
||||
active_name="$(hyprctl activeworkspace 2>/dev/null | sed -n 's/.*(\\(.*\\)).*/\\1/p' | head -n1)"
|
||||
fi
|
||||
|
||||
if [[ "$active_name" == "$element_name" || "$active_name" == "$element_ws" ]]; then
|
||||
hyprctl dispatch workspace previous
|
||||
else
|
||||
hyprctl dispatch moveworkspacetomonitor "$element_ws" current
|
||||
hyprctl dispatch workspace "$element_ws"
|
||||
fi
|
||||
@@ -1,25 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
joplin_ws="name:joplin"
|
||||
joplin_name="joplin"
|
||||
|
||||
active_name=""
|
||||
if json="$(hyprctl -j activeworkspace 2>/dev/null)"; then
|
||||
if command -v jq >/dev/null 2>&1; then
|
||||
active_name="$(printf '%s' "$json" | jq -r '.name // empty')"
|
||||
else
|
||||
active_name="$(printf '%s' "$json" | sed -n 's/.*"name":"\\([^"]*\\)".*/\\1/p')"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z "$active_name" ]]; then
|
||||
active_name="$(hyprctl activeworkspace 2>/dev/null | sed -n 's/.*(\\(.*\\)).*/\\1/p' | head -n1)"
|
||||
fi
|
||||
|
||||
if [[ "$active_name" == "$joplin_name" || "$active_name" == "$joplin_ws" ]]; then
|
||||
hyprctl dispatch workspace previous
|
||||
else
|
||||
hyprctl dispatch moveworkspacetomonitor "$joplin_ws" current
|
||||
hyprctl dispatch workspace "$joplin_ws"
|
||||
fi
|
||||
@@ -1,25 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
mail_ws="name:mail"
|
||||
mail_name="mail"
|
||||
|
||||
active_name=""
|
||||
if json="$(hyprctl -j activeworkspace 2>/dev/null)"; then
|
||||
if command -v jq >/dev/null 2>&1; then
|
||||
active_name="$(printf '%s' "$json" | jq -r '.name // empty')"
|
||||
else
|
||||
active_name="$(printf '%s' "$json" | sed -n 's/.*"name":"\\([^"]*\\)".*/\\1/p')"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z "$active_name" ]]; then
|
||||
active_name="$(hyprctl activeworkspace 2>/dev/null | sed -n 's/.*(\\(.*\\)).*/\\1/p' | head -n1)"
|
||||
fi
|
||||
|
||||
if [[ "$active_name" == "$mail_name" || "$active_name" == "$mail_ws" ]]; then
|
||||
hyprctl dispatch workspace previous
|
||||
else
|
||||
hyprctl dispatch moveworkspacetomonitor "$mail_ws" current
|
||||
hyprctl dispatch workspace "$mail_ws"
|
||||
fi
|
||||
@@ -1,25 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
spotify_ws="name:spotify"
|
||||
spotify_name="spotify"
|
||||
|
||||
active_name=""
|
||||
if json="$(hyprctl -j activeworkspace 2>/dev/null)"; then
|
||||
if command -v jq >/dev/null 2>&1; then
|
||||
active_name="$(printf '%s' "$json" | jq -r '.name // empty')"
|
||||
else
|
||||
active_name="$(printf '%s' "$json" | sed -n 's/.*"name":"\\([^"]*\\)".*/\\1/p')"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z "$active_name" ]]; then
|
||||
active_name="$(hyprctl activeworkspace 2>/dev/null | sed -n 's/.*(\\(.*\\)).*/\\1/p' | head -n1)"
|
||||
fi
|
||||
|
||||
if [[ "$active_name" == "$spotify_name" || "$active_name" == "$spotify_ws" ]]; then
|
||||
hyprctl dispatch workspace previous
|
||||
else
|
||||
hyprctl dispatch moveworkspacetomonitor "$spotify_ws" current
|
||||
hyprctl dispatch workspace "$spotify_ws"
|
||||
fi
|
||||
@@ -1,25 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
steam_ws="name:steam"
|
||||
steam_name="steam"
|
||||
|
||||
active_name=""
|
||||
if json="$(hyprctl -j activeworkspace 2>/dev/null)"; then
|
||||
if command -v jq >/dev/null 2>&1; then
|
||||
active_name="$(printf '%s' "$json" | jq -r '.name // empty')"
|
||||
else
|
||||
active_name="$(printf '%s' "$json" | sed -n 's/.*"name":"\\([^"]*\\)".*/\\1/p')"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z "$active_name" ]]; then
|
||||
active_name="$(hyprctl activeworkspace 2>/dev/null | sed -n 's/.*(\\(.*\\)).*/\\1/p' | head -n1)"
|
||||
fi
|
||||
|
||||
if [[ "$active_name" == "$steam_name" || "$active_name" == "$steam_ws" ]]; then
|
||||
hyprctl dispatch workspace previous
|
||||
else
|
||||
hyprctl dispatch moveworkspacetomonitor "$steam_ws" current
|
||||
hyprctl dispatch workspace "$steam_ws"
|
||||
fi
|
||||
Reference in New Issue
Block a user