1
1
Fork 0

Compare commits

..

No commits in common. "e5c0983fe7e44e504212ddc6caec7407ce62611d" and "f54e78b4ff1da42786f70a643d6d2943c7ff4df5" have entirely different histories.

3 changed files with 18 additions and 26 deletions

View file

@ -28,7 +28,7 @@ in {
"special:android, on-created-empty:${waydroid} app launch com.YoStarEN.Arknights" "special:android, on-created-empty:${waydroid} app launch com.YoStarEN.Arknights"
"special:music, on-created-empty:${youtube-music}" "special:music, on-created-empty:${youtube-music}"
"special:office, on-created-empty:[tile] ${onlyoffice}" "special:office, on-created-empty:${onlyoffice}"
"special:steam, on-created-empty:${steam}" "special:steam, on-created-empty:${steam}"
"special:terminal, on-created-empty:${kitty}" "special:terminal, on-created-empty:${kitty}"
"special:vm, on-created-empty:${pgrep} -x vm || ${virt-manager}" "special:vm, on-created-empty:${pgrep} -x vm || ${virt-manager}"
@ -209,7 +209,7 @@ in {
(tag.files ["size 1000 625"]) (tag.files ["size 1000 625"])
(tag.game ["fullscreen" "group barred" "idleinhibit always" "noborder" "noshadow" "renderunfocused" "workspace name:game"]) (tag.game ["fullscreen" "group barred" "idleinhibit always" "noborder" "noshadow" "renderunfocused" "workspace name:game"])
(tag.music ["tile" "workspace special:music"]) (tag.music ["tile" "workspace special:music"])
(tag.office ["workspace special:office"]) (tag.office ["tile" "workspace special:office"])
(tag.pip ["keepaspectratio" "move ${pip.x} ${pip.y}" "pin" "size ${pip.w} ${pip.h}"]) (tag.pip ["keepaspectratio" "move ${pip.x} ${pip.y}" "pin" "size ${pip.w} ${pip.h}"])
(tag.social ["group" "tile"]) (tag.social ["group" "tile"])
(tag.steam ["workspace special:steam"]) (tag.steam ["workspace special:steam"])

View file

@ -61,7 +61,7 @@ in {
# https://wiki.hyprland.org/Configuring/Keywords/#executing # https://wiki.hyprland.org/Configuring/Keywords/#executing
exec = [ exec = [
left # Set left-pawed state left # Left-handed at boot
"${systemctl} --user restart walker" "${systemctl} --user restart walker"
"${sleep} 2 && ${systemctl} --user restart waybar" "${sleep} 2 && ${systemctl} --user restart waybar"
]; ];

View file

@ -1,35 +1,27 @@
#! /usr/bin/env bash #! /usr/bin/env bash
# Toggle left-pawed mouse # Toggle left-handed mouse
#?? left DEVICE #?? left DEVICE
# BUG: New hyprctl syntax does not support per-device getoption # BUG: New hyprctl syntax does not support per-device getoption
# https://github.com/hyprwm/hyprlang/issues/43 # https://github.com/hyprwm/hyprlang/issues/43
# HACK: Condition based on file presence, requires execution at reload to set state # HACK: Condition based on file presence, requires creation at login to set state
#?? exec = left #?? exec-once = left
FILE="$HOME/.left" FILE=/tmp/left
# Set initial state if (("$#" == 0)); then
if [[ -f "$FILE" ]]; then
left=1
else
left=0
fi
# If device argument, then toggle
if (("$#" > 0)); then
left=$((1 - "$left"))
fi
# Enforce state
if (("$left")); then
hyprctl keyword "device[$1]:left_handed" true
hyprctl keyword "device[$1]:natural_scroll" true
touch "$FILE" touch "$FILE"
notify-send "> left" "Left-pawed" --urgency low exit
else fi
if [[ -f "$FILE" ]]; then
hyprctl keyword "device[$1]:left_handed" false hyprctl keyword "device[$1]:left_handed" false
hyprctl keyword "device[$1]:natural_scroll" false hyprctl keyword "device[$1]:natural_scroll" false
rm --force "$FILE" rm --force "$FILE"
notify-send "> left" "Right-pawed" --urgency low notify-send "> left" "Right-handed" --urgency low
else
hyprctl keyword "device[$1]:left_handed" true
hyprctl keyword "device[$1]:natural_scroll" true
touch "$FILE"
notify-send "> left" "Left-handed" --urgency low
fi fi