Compare commits

...

2 Commits

Author SHA1 Message Date
Amir Alexander Abdelbaki 6a9d286e55 fixed workspace navigation 2026-05-19 18:26:28 +02:00
Amir Alexander Abdelbaki a8e9a4b49b fix(nvim): use coc#pum API for Enter confirmation
pumvisible() checks the native Vim pum, which coc.nvim bypasses in
favour of its own popup — so the confirm never fired. Switch to
coc#pum#visible() / coc#pum#confirm() to match the Tab/S-Tab bindings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 18:25:30 +02:00
5 changed files with 20 additions and 6 deletions

View File

@ -48,7 +48,7 @@
:orientation "h"
:space-evenly false
:halign "center"
:onclick "hyprctl eval 'hl.dsp.focus({workspace=\"r-1\"})'"
:onclick "~/.config/scripts/workspacefocus/focusleft.sh"
{""}
)
@ -78,7 +78,7 @@
:orientation "h"
:space-evenly false
:halign "center"
:onclick "hyprctl eval 'hl.dsp.focus({workspace=\"r+1\"})'"
:onclick "~/.config/scripts/workspacefocus/focusright.sh"
{""}
)

View File

@ -13,6 +13,14 @@ monitors_json=$(hyprctl monitors -j)
curmon=$(echo "$monitors_json" | jq -r '.[] | select(.focused) | .name')
currot=$(echo "$monitors_json" | jq -r '.[] | select(.focused) | .transform')
curscale=$(echo "$monitors_json" | jq -r '.[] | select(.focused) | .scale')
curwidth=$(echo "$monitors_json" | jq -r '.[] | select(.focused) | .width')
curheight=$(echo "$monitors_json" | jq -r '.[] | select(.focused) | .height')
currefresh=$(echo "$monitors_json" | jq -r '.[] | select(.focused) | .refreshRate | round')
curx=$(echo "$monitors_json" | jq -r '.[] | select(.focused) | .x')
cury=$(echo "$monitors_json" | jq -r '.[] | select(.focused) | .y')
curmode="${curwidth}x${curheight}@${currefresh}"
# Calculate new rotation
if [[ "$direction" == "cw" ]]; then
@ -33,8 +41,8 @@ fi
echo "Rotating monitor '$curmon' from $currot to $newrot ($direction)"
# Apply new rotation to monitor (hyprctl keyword doesn't work with Lua config)
hyprctl eval "hl.monitor({output='$curmon', transform=$newrot})"
# Apply new rotation while preserving current mode and scale
hyprctl eval "hl.monitor({output='$curmon', mode='$curmode', position='${curx}x${cury}', scale=$curscale, transform=$newrot})"
# Detect touchscreen device name
touchdev=$(hyprctl devices -j | jq -r '.touch[0].name // empty')

View File

@ -0,0 +1,3 @@
#!/bin/bash
hyprctl dispatch 'hl.dsp.focus({ workspace = "r-1" })'

View File

@ -0,0 +1,3 @@
#!/bin/bash
hyprctl dispatch 'hl.dsp.focus({ workspace = "r+1" })'

View File

@ -140,5 +140,5 @@ end, { expr = true, silent = true })
-- CR confirms CoC selection
vim.keymap.set("i", "<CR>", function()
return vim.fn.pumvisible() == 1 and "<C-Y>" or "<CR>"
end, { expr = true })
return vim.fn["coc#pum#visible"]() == 1 and vim.fn["coc#pum#confirm"]() or "<CR>"
end, { expr = true, silent = true })