1
1
Fork 0
nixos/options/custom/scripts/left.sh
Myned 53c8575116
git: migrate to forgejo
Squashes 1,331 commits

Signed-off-by: Myned <dev@bjork.tech>
2024-09-12 19:41:21 -05:00

15 lines
488 B
Bash

#! /usr/bin/env bash
# Toggle left-handed mouse
# TODO: Make device-specific when commit released
# https://github.com/hyprwm/hyprlang/commit/95471ec86f37acb8281062e54e2be99b24b50cd0
left=$(("$(hyprctl getoption input:left_handed -j | jq '.int')" - 1))
hyprctl keyword input:left_handed ${left#-}
if [[ "$(hyprctl getoption input:left_handed -j | jq '.int')" == 1 ]]; then
notify-send '> left' 'Left-handed' --urgency low
else
notify-send '> left' 'Right-handed' --urgency low
fi