diff --git a/dot_config/hypr/hyprland.d/70-keybinds.conf.tmpl b/dot_config/hypr/hyprland.d/70-keybinds.conf.tmpl index 9a2ac14..fca66cd 100644 --- a/dot_config/hypr/hyprland.d/70-keybinds.conf.tmpl +++ b/dot_config/hypr/hyprland.d/70-keybinds.conf.tmpl @@ -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 diff --git a/dot_local/bin/executable_hypr-comms-toggle b/dot_local/bin/executable_hypr-comms-toggle deleted file mode 100644 index 093634e..0000000 --- a/dot_local/bin/executable_hypr-comms-toggle +++ /dev/null @@ -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 diff --git a/dot_local/bin/executable_hypr-element-toggle b/dot_local/bin/executable_hypr-element-toggle deleted file mode 100644 index 6840c7f..0000000 --- a/dot_local/bin/executable_hypr-element-toggle +++ /dev/null @@ -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 diff --git a/dot_local/bin/executable_hypr-joplin-toggle b/dot_local/bin/executable_hypr-joplin-toggle deleted file mode 100644 index cdb3606..0000000 --- a/dot_local/bin/executable_hypr-joplin-toggle +++ /dev/null @@ -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 diff --git a/dot_local/bin/executable_hypr-mail-toggle b/dot_local/bin/executable_hypr-mail-toggle deleted file mode 100644 index 39619fd..0000000 --- a/dot_local/bin/executable_hypr-mail-toggle +++ /dev/null @@ -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 diff --git a/dot_local/bin/executable_hypr-spotify-toggle b/dot_local/bin/executable_hypr-spotify-toggle deleted file mode 100644 index 964cb55..0000000 --- a/dot_local/bin/executable_hypr-spotify-toggle +++ /dev/null @@ -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 diff --git a/dot_local/bin/executable_hypr-steam-toggle b/dot_local/bin/executable_hypr-steam-toggle deleted file mode 100644 index efb0428..0000000 --- a/dot_local/bin/executable_hypr-steam-toggle +++ /dev/null @@ -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