aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/hypr/configs/Keybinds.conf2
-rw-r--r--config/hypr/lua/keybinds.lua2
-rwxr-xr-xconfig/hypr/scripts/toggle-qs-hyprview.sh15
3 files changed, 17 insertions, 2 deletions
diff --git a/config/hypr/configs/Keybinds.conf b/config/hypr/configs/Keybinds.conf
index c867b338..d7433ec6 100644
--- a/config/hypr/configs/Keybinds.conf
+++ b/config/hypr/configs/Keybinds.conf
@@ -141,7 +141,7 @@ bindd = $mainMod ALT, S, Toggle scrolling V/H, exec, bash -c '[[ $(hyprctl getop
$layout = 'smartgrid'
# Or, using XDG_CONFIG_HOME:
-bind = ctrl, tab, exec, qs -c qs-hyprview ipc call expose toggle $layout
+bind = ctrl, tab, exec, $scriptsDir/toggle-qs-hyprview.sh $layout
# Cycle windows; if floating bring to top
bindd = ALT, Tab, Cycle next window, cyclenext
diff --git a/config/hypr/lua/keybinds.lua b/config/hypr/lua/keybinds.lua
index 25c72490..82ccbfa7 100644
--- a/config/hypr/lua/keybinds.lua
+++ b/config/hypr/lua/keybinds.lua
@@ -333,7 +333,7 @@ bind(
"CTRL",
"tab",
exec_cmd(
- "qs -c qs-hyprview ipc call expose toggle "
+ "$HOME/.config/hypr/scripts/toggle-qs-hyprview.sh "
.. qs_hyprview_layout
),
{ description = "qs-hyprview toggle" }
diff --git a/config/hypr/scripts/toggle-qs-hyprview.sh b/config/hypr/scripts/toggle-qs-hyprview.sh
new file mode 100755
index 00000000..4f00762e
--- /dev/null
+++ b/config/hypr/scripts/toggle-qs-hyprview.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+layout="${1:-smartgrid}"
+config_name="qs-hyprview"
+config_path="${XDG_CONFIG_HOME:-$HOME/.config}/quickshell/${config_name}"
+
+if ! pgrep -u "${UID}" -f "qs .* -p ${config_path}($| )" >/dev/null 2>&1; then
+ qs --log-rules "qt.qpa.wayland.textinput.warning=false" -p "${config_path}" >/dev/null 2>&1 &
+ sleep 0.2
+fi
+
+if ! qs -c "${config_name}" ipc call expose toggle "${layout}" >/dev/null 2>&1; then
+ sleep 0.3
+ qs -c "${config_name}" ipc call expose toggle "${layout}"
+fi
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage