use dbus keybind for releasing super for overview

AAAAAAAAAAAAAAAA LETS FUCKING GO FINALLY A GOOD LOOKING LAUNCHER THAT POPS UP INSTANTLY
This commit is contained in:
end-4 2025-04-27 18:32:40 +02:00
parent 3b8595748c
commit 0ef575b082
4 changed files with 47 additions and 17 deletions

View file

@ -1,6 +1,9 @@
# This file sources other files in `hyprland` and `custom` folders # This file sources other files in `hyprland` and `custom` folders
# You wanna add your stuff in file in `custom` # You wanna add your stuff in file in `custom`
exec = hyprctl dispatch submap global # DO NOT REMOVE THIS OR YOU WON'T BE ABLE TO USE ANY KEYBIND
submap = global # This is required for catchall to work
# Defaults # Defaults
source=~/.config/hypr/hyprland/env.conf source=~/.config/hypr/hyprland/env.conf
source=~/.config/hypr/hyprland/execs.conf source=~/.config/hypr/hyprland/execs.conf

View file

@ -1,7 +1,7 @@
# Bar, wallpaper # Bar, wallpaper
exec-once = swww-daemon --format xrgb exec-once = swww-daemon --format xrgb
exec-once = /usr/lib/geoclue-2.0/demos/agent & gammastep exec-once = /usr/lib/geoclue-2.0/demos/agent & gammastep
exec-once = agsv1 & exec-once = qs &
# Input method # Input method
exec-once = fcitx5 exec-once = fcitx5

View file

@ -1,3 +1,23 @@
# These absolutely need to be the first, or they won't work consistently
bindid = Super, Super_L, Toggle overview, global, quickshell:overviewToggleRelease
binditn = Super, catchall, global, quickshell:overviewToggleReleaseInterrupt
bind = Super, mouse:272, global, quickshell:overviewToggleReleaseInterrupt
bind = Super, mouse:273, global, quickshell:overviewToggleReleaseInterrupt
bind = Super, mouse:274, global, quickshell:overviewToggleReleaseInterrupt
bind = Super, mouse:275, global, quickshell:overviewToggleReleaseInterrupt
bind = Super, mouse:276, global, quickshell:overviewToggleReleaseInterrupt
bind = Super, mouse:277, global, quickshell:overviewToggleReleaseInterrupt
bind = Super, mouse_up, global, quickshell:overviewToggleReleaseInterrupt
bind = Super, mouse_down,global, quickshell:overviewToggleReleaseInterrupt
bindit = ,Super_L, global, quickshell:workspaceNumber
bind = Super, Tab, global, quickshell:overviewToggle
bind = Super, B, global, quickshell:sidebarLeftToggle
bind = Super, A, global, quickshell:sidebarLeftToggle
bind = Super, O, global, quickshell:sidebarLeftToggle
bind = Super, N, global, quickshell:sidebarRightToggle
bind = Ctrl+Alt, Delete, global, quickshell:sessionToggle
# Lines ending with `# [hidden]` won't be shown on cheatsheet # Lines ending with `# [hidden]` won't be shown on cheatsheet
# Lines starting with #! are section headings # Lines starting with #! are section headings
@ -160,13 +180,7 @@ bind = Alt, Tab, bringactivetotop, # [hidden] bring it to the top
bindr = Ctrl+Super, R, exec, killall ags agsv1 gjs ydotool; agsv1 & # Restart widgets bindr = Ctrl+Super, R, exec, killall ags agsv1 gjs ydotool; agsv1 & # Restart widgets
bindr = Ctrl+Super+Alt, R, exec, hyprctl reload; killall agsv1 ydotool; agsv1 & # [hidden] bindr = Ctrl+Super+Alt, R, exec, hyprctl reload; killall agsv1 ydotool; agsv1 & # [hidden]
bind = Ctrl+Alt, Slash, exec, agsv1 run-js 'cycleMode();' # Cycle bar mode (normal, focus) bind = Ctrl+Alt, Slash, exec, agsv1 run-js 'cycleMode();' # Cycle bar mode (normal, focus)
bindr = Super, Super_L, exec, qs ipc call overview toggle || agsv1 -t 'overview' # Toggle overview/launcher
# bind = Super, Tab, exec, qs ipc call overview toggle || agsv1 -t 'overview' # [hidden]
bind = Super, Slash, exec, for ((i=0; i<$(hyprctl monitors -j | jq length); i++)); do agsv1 -t "cheatsheet""$i"; done # Show cheatsheet bind = Super, Slash, exec, for ((i=0; i<$(hyprctl monitors -j | jq length); i++)); do agsv1 -t "cheatsheet""$i"; done # Show cheatsheet
bind = Super, B, exec, qs ipc call sidebarLeft toggle || agsv1 -t 'sideleft' # Toggle left sidebar
bind = Super, A, exec, qs ipc call sidebarLeft toggle || agsv1 -t 'sideleft' # [hidden]
bind = Super, O, exec, qs ipc call sidebarLeft toggle || agsv1 -t 'sideleft' # [hidden]
# bind = Super, N, exec, qs ipc call sidebarRight toggle || agsv1 -t 'sideright' # Toggle right sidebar
bind = Super, M, exec, agsv1 run-js 'openMusicControls.value = (!mpris.getPlayer() ? false : !openMusicControls.value);' # Toggle music controls bind = Super, M, exec, agsv1 run-js 'openMusicControls.value = (!mpris.getPlayer() ? false : !openMusicControls.value);' # Toggle music controls
bind = Super, Comma, exec, agsv1 run-js 'openColorScheme.value = true; Utils.timeout(2000, () => openColorScheme.value = false);' # View color scheme and options bind = Super, Comma, exec, agsv1 run-js 'openColorScheme.value = true; Utils.timeout(2000, () => openColorScheme.value = false);' # View color scheme and options
bind = Super, K, exec, for ((i=0; i<$(hyprctl monitors -j | jq length); i++)); do agsv1 -t "osk""$i"; done # Toggle on-screen keyboard bind = Super, K, exec, for ((i=0; i<$(hyprctl monitors -j | jq length); i++)); do agsv1 -t "osk""$i"; done # Toggle on-screen keyboard
@ -175,11 +189,6 @@ bind = Ctrl+Super, G, exec, for ((i=0; i<$(hyprctl monitors -j | jq length); i++
bindle=, XF86MonBrightnessUp, exec, qs ipc call brightness increment || agsv1 run-js 'brightness.screen_value += 0.05; indicator.popup(1);' # [hidden] bindle=, XF86MonBrightnessUp, exec, qs ipc call brightness increment || agsv1 run-js 'brightness.screen_value += 0.05; indicator.popup(1);' # [hidden]
bindle=, XF86MonBrightnessDown, exec, qs ipc call brightness decrement || agsv1 run-js 'brightness.screen_value -= 0.05; indicator.popup(1);' # [hidden] bindle=, XF86MonBrightnessDown, exec, qs ipc call brightness decrement || agsv1 run-js 'brightness.screen_value -= 0.05; indicator.popup(1);' # [hidden]
# bind = Super, Super_L, global, quickshell:overviewToggleRelease
bindit = ,Super_L, global, quickshell:workspaceNumber
bind = Super, Tab, global, quickshell:overviewToggle
bind = Super, N, global, quickshell:sidebarRightToggle
bind = Ctrl+Alt, Delete, global, quickshell:sessionToggle
# Testing # Testing
bind = Super+Alt, f11, exec, bash -c 'RANDOM_IMAGE=$(find ~/Pictures -type f | grep -v -i "nipple" | grep -v -i "pussy" | shuf -n 1); ACTION=$(notify-send "Test notification with body image" "This notification should contain your user account <b>image</b> and <a href=\"https://discord.com/app\">Discord</a> <b>icon</b>. Oh and here is a random image in your Pictures folder: <img src=\"$RANDOM_IMAGE\" alt=\"Testing image\"/>" -p -h "string:image-path:/var/lib/AccountsService/icons/$USER" -t 6000 -i "discord" -A "openImage=Open profile image" -A "action2=Open the random image" -A "action3=Useless button"); [[ $ACTION == *openImage ]] && xdg-open "/var/lib/AccountsService/icons/$USER"; [[ $ACTION == *action2 ]] && xdg-open \"$RANDOM_IMAGE\"' # [hidden] bind = Super+Alt, f11, exec, bash -c 'RANDOM_IMAGE=$(find ~/Pictures -type f | grep -v -i "nipple" | grep -v -i "pussy" | shuf -n 1); ACTION=$(notify-send "Test notification with body image" "This notification should contain your user account <b>image</b> and <a href=\"https://discord.com/app\">Discord</a> <b>icon</b>. Oh and here is a random image in your Pictures folder: <img src=\"$RANDOM_IMAGE\" alt=\"Testing image\"/>" -p -h "string:image-path:/var/lib/AccountsService/icons/$USER" -t 6000 -i "discord" -A "openImage=Open profile image" -A "action2=Open the random image" -A "action3=Useless button"); [[ $ACTION == *openImage ]] && xdg-open "/var/lib/AccountsService/icons/$USER"; [[ $ACTION == *action2 ]] && xdg-open \"$RANDOM_IMAGE\"' # [hidden]
@ -218,7 +227,3 @@ bind = Super+Alt, Slash, exec, pkill fuzzel || fuzzel # Toggle fallback launcher
# Cursed stuff # Cursed stuff
## Make window not amogus large ## Make window not amogus large
bind = Ctrl+Super, Backslash, resizeactive, exact 640 480 # [hidden] bind = Ctrl+Super, Backslash, resizeactive, exact 640 480 # [hidden]

View file

@ -10,7 +10,8 @@ import Quickshell.Wayland
import Quickshell.Hyprland import Quickshell.Hyprland
Scope { Scope {
id: overview id: root
property bool overviewReleaseMightTrigger: true
Variants { Variants {
model: Quickshell.screens model: Quickshell.screens
@ -111,6 +112,9 @@ Scope {
function open() { function open() {
GlobalStates.overviewOpen = true GlobalStates.overviewOpen = true
} }
function toggleReleaseInterrupt() {
root.overviewReleaseMightTrigger = false
}
} }
GlobalShortcut { GlobalShortcut {
@ -125,9 +129,27 @@ Scope {
name: "overviewToggleRelease" name: "overviewToggleRelease"
description: "Toggles overview on release" description: "Toggles overview on release"
onPressed: {
root.overviewReleaseMightTrigger = true
}
onReleased: { onReleased: {
if (!root.overviewReleaseMightTrigger) {
root.overviewReleaseMightTrigger = true
return
}
GlobalStates.overviewOpen = !GlobalStates.overviewOpen GlobalStates.overviewOpen = !GlobalStates.overviewOpen
} }
} }
GlobalShortcut {
name: "overviewToggleReleaseInterrupt"
description: "Interrupts possibility of overview being toggled on release" +
"This is necessary because onReleased triggers whether or not you press something else while holding the key." +
"To make sure this works consistently, use binditn = MODKEYS, catchall in an automatically triggered submap that includes everything."
onPressed: {
root.overviewReleaseMightTrigger = false
}
}
} }