1
1
Fork 0

Compare commits

..

No commits in common. "749bd908163200b87d6967c0983a0d21790dd9ed" and "f5ac3d34ac104a0cedf5359e043e92994624a797" have entirely different histories.

5 changed files with 32 additions and 64 deletions

View file

@ -108,11 +108,11 @@ in {
(key "Control_L" "Super+Ctrl+Alt+Shift" "layoutmsg" "removemaster")
(key "Control_L" "Super+Ctrl+Shift" "layoutmsg" "addmaster")
(key "Shift_L" "Super+Shift" "workspace" "previous")
(key "Super_L" "Super" "exec" "${menu}")
(key "Super_L" "Super" "exec" "${menu} --applications")
(key "Super_L" "Super+Alt" "exec" "${menu} --passwords")
(key "Super_L" "Super+Ctrl" "exec" "${menu} --calculator")
(key "Super_L" "Super+Ctrl+Shift" "exec" "${menu} --networks")
(key "Super_L" "Super+Shift" "exec" "${menu} --search")
(key "Super_L" "Super+Shift" "exec" "${menu} --runner")
];
# Regular binds
@ -132,7 +132,7 @@ in {
(key "Bracketright" "Super" "layoutmsg" "orientationnext")
(key "Bracketright" "Super+Shift" "splitratio" "+0.1")
(key "Delete" "Super" "exec" "${swayosd-client} --output-volume mute")
(key "Delete" "Super+Shift" "exec" "${left} --scroll kensington-orbit-wireless-tb-mouse")
(key "Delete" "Super+Shift" "exec" "${left} kensington-orbit-wireless-tb-mouse")
(key "Down" "Super" "movewindow" "d")
(key "Down" "Super+Shift" "movewindoworgroup" "d")
(key "Equal" "Super" "exec" "${swayosd-client} --output-volume raise")
@ -236,8 +236,8 @@ in {
(key "T" "Super" "togglespecialworkspace" "terminal")
(key "T" "Super+Shift" "movetoworkspacesilent" "special:terminal")
(key "T" "Super+Shift" "exec" kitty)
(key "V" "Super" "exec" "${kitty} --app-id clipboard --override font_size=12 ${clipse}")
(key "V" "Super+Shift" "exec" "${clipse} --clear && ${notify-send} clipse 'Clipboard cleared' --urgency low")
(key "V" "Super" "exec" "${menu} --clipboard")
(key "V" "Super+Shift" "exec" "${rm} ~/.cache/walker/clipboard.gob; ${notify-send} walker 'Clipboard cleared' --urgency low")
(key "W" "Super" "togglespecialworkspace" "vm")
(key "W" "Super+Ctrl" "exec" "${vm} -x ${
if config.custom.hidpi

View file

@ -61,20 +61,19 @@ in {
# https://wiki.hyprland.org/Configuring/Keywords/#executing
exec = [
"${left} --init --scroll kensington-orbit-wireless-tb-mouse" # Enforce left-pawed state
"${sleep} 5 && ${systemctl} --user restart walker"
"${sleep} 5 && ${systemctl} --user restart waybar"
left # Set left-pawed state
"${systemctl} --user restart walker"
"${sleep} 2 && ${systemctl} --user restart waybar"
];
# https://wiki.hyprland.org/Configuring/Keywords/#executing
exec-once =
optionals config.custom.wallpaper ["wallpaper"]
++ [
[
sway-audio-idle-inhibit # Inhibit idle while audio is playing
"${clipse} --clear" # Clear clipboard history
"${clipse} --listen" # Monitor clipboard
"${rm} ~/.cache/walker/clipboard.gob" # Clear clipboard
"[group new lock; tile] ${firefox-esr}"
];
]
++ optionals config.custom.wallpaper ["wallpaper"];
# https://wiki.hyprland.org/Configuring/Variables/#xwayland
xwayland = {

View file

@ -28,31 +28,23 @@ in {
# https://github.com/abenz1267/walker/blob/master/internal/config/config.default.json
config = {
activation_mode.disabled = true; # Key chords
# BUG: Hover interrupts keyboard selections
ignore_mouse = true;
ignore_mouse = true; # Hover interrupts keyboard selections
search.placeholder = "";
disabled = [
# BUG: Applications such as GNOME Files require multiple copy operations to register
"clipboard"
];
# https://github.com/abenz1267/walker/wiki/Modules
# https://www.nerdfonts.com/cheat-sheet
builtins = {
calc.switcher_only = true;
calculator.switcher_only = false;
clipboard.switcher_only = true;
commands.switcher_only = true;
custom_commands.switcher_only = true;
runner.switcher_only = false;
runner.switcher_only = true;
ssh.switcher_only = true;
windows.switcher_only = true;
applications = {
# BUG: Ghost entries are still visible with single module
actions = false; # Desktop file actions
# BUG: Ghost entries are still visible
#// actions = false; # Desktop file actions
switcher_only = false;
};
@ -74,9 +66,6 @@ in {
};
websearch = {
# TODO: Implement custom search engine
engines = ["duckduckgo"];
placeholder = "Search";
switcher_only = true;
};

View file

@ -92,7 +92,6 @@ in {
systemd
])
(bash "left" [
argc
hyprland
jq
libnotify

View file

@ -1,54 +1,35 @@
#! /usr/bin/env bash
# @describe Toggle device pawdedness
#
# https://github.com/sigoden/argc
# Toggle left-pawed mouse
#?? left DEVICE
# BUG: New hyprctl syntax does not support per-device getoption
# https://github.com/hyprwm/hyprlang/issues/43
# HACK: Condition based on file presence, requires execution at reload to set state
#?? exec = left --init <DEVICE>
#?? exec = left
FILE="$HOME/.left"
# @arg device! Device name, obtained via hyprctl devices
# @option -f --file=`_default_file` Specify file for state
# @flag -i --init Enforce file-based state without switching
# @flag -s --scroll Also invert scroll direction
_default_file() {
echo "$HOME/.left"
}
eval "$(argc --argc-eval "$0" "$@")"
# Get initial state
if [[ -f "${argc_file:-}" ]]; then
# Set initial state
if [[ -f "$FILE" ]]; then
left=1
else
left=0
fi
# If not initializing
if [[ ! "${argc_init:-}" ]]; then
left=$((1 - "$left")) # Toggle 0/1
# If device argument, then toggle
if (("$#" > 0)); then
left=$((1 - "$left"))
fi
# Enforce state
if (("$left")); then
hyprctl keyword "device[${argc_device:-}]:left_handed" true
if [[ "${argc_scroll:-}" ]]; then
hyprctl keyword "device[${argc_device:-}]:natural_scroll" true
fi
touch "${argc_file:-}"
hyprctl keyword "device[$1]:left_handed" true
hyprctl keyword "device[$1]:natural_scroll" true
touch "$FILE"
notify-send "> left" "Left-pawed" --urgency low
else
hyprctl keyword "device[${argc_device:-}]:left_handed" false
if [[ "${argc_scroll:-}" ]]; then
hyprctl keyword "device[${argc_device:-}]:natural_scroll" false
fi
rm --force "${argc_file:-}"
hyprctl keyword "device[$1]:left_handed" false
hyprctl keyword "device[$1]:natural_scroll" false
rm --force "$FILE"
notify-send "> left" "Right-pawed" --urgency low
fi