Compare commits
5 commits
f5ac3d34ac
...
749bd90816
Author | SHA1 | Date | |
---|---|---|---|
749bd90816 | |||
5464089948 | |||
75b1043ac4 | |||
816f84059d | |||
5a95ba0524 |
5 changed files with 64 additions and 32 deletions
|
@ -108,11 +108,11 @@ in {
|
||||||
(key "Control_L" "Super+Ctrl+Alt+Shift" "layoutmsg" "removemaster")
|
(key "Control_L" "Super+Ctrl+Alt+Shift" "layoutmsg" "removemaster")
|
||||||
(key "Control_L" "Super+Ctrl+Shift" "layoutmsg" "addmaster")
|
(key "Control_L" "Super+Ctrl+Shift" "layoutmsg" "addmaster")
|
||||||
(key "Shift_L" "Super+Shift" "workspace" "previous")
|
(key "Shift_L" "Super+Shift" "workspace" "previous")
|
||||||
(key "Super_L" "Super" "exec" "${menu} --applications")
|
(key "Super_L" "Super" "exec" "${menu}")
|
||||||
(key "Super_L" "Super+Alt" "exec" "${menu} --passwords")
|
(key "Super_L" "Super+Alt" "exec" "${menu} --passwords")
|
||||||
(key "Super_L" "Super+Ctrl" "exec" "${menu} --calculator")
|
(key "Super_L" "Super+Ctrl" "exec" "${menu} --calculator")
|
||||||
(key "Super_L" "Super+Ctrl+Shift" "exec" "${menu} --networks")
|
(key "Super_L" "Super+Ctrl+Shift" "exec" "${menu} --networks")
|
||||||
(key "Super_L" "Super+Shift" "exec" "${menu} --runner")
|
(key "Super_L" "Super+Shift" "exec" "${menu} --search")
|
||||||
];
|
];
|
||||||
|
|
||||||
# Regular binds
|
# Regular binds
|
||||||
|
@ -132,7 +132,7 @@ in {
|
||||||
(key "Bracketright" "Super" "layoutmsg" "orientationnext")
|
(key "Bracketright" "Super" "layoutmsg" "orientationnext")
|
||||||
(key "Bracketright" "Super+Shift" "splitratio" "+0.1")
|
(key "Bracketright" "Super+Shift" "splitratio" "+0.1")
|
||||||
(key "Delete" "Super" "exec" "${swayosd-client} --output-volume mute")
|
(key "Delete" "Super" "exec" "${swayosd-client} --output-volume mute")
|
||||||
(key "Delete" "Super+Shift" "exec" "${left} kensington-orbit-wireless-tb-mouse")
|
(key "Delete" "Super+Shift" "exec" "${left} --scroll kensington-orbit-wireless-tb-mouse")
|
||||||
(key "Down" "Super" "movewindow" "d")
|
(key "Down" "Super" "movewindow" "d")
|
||||||
(key "Down" "Super+Shift" "movewindoworgroup" "d")
|
(key "Down" "Super+Shift" "movewindoworgroup" "d")
|
||||||
(key "Equal" "Super" "exec" "${swayosd-client} --output-volume raise")
|
(key "Equal" "Super" "exec" "${swayosd-client} --output-volume raise")
|
||||||
|
@ -236,8 +236,8 @@ in {
|
||||||
(key "T" "Super" "togglespecialworkspace" "terminal")
|
(key "T" "Super" "togglespecialworkspace" "terminal")
|
||||||
(key "T" "Super+Shift" "movetoworkspacesilent" "special:terminal")
|
(key "T" "Super+Shift" "movetoworkspacesilent" "special:terminal")
|
||||||
(key "T" "Super+Shift" "exec" kitty)
|
(key "T" "Super+Shift" "exec" kitty)
|
||||||
(key "V" "Super" "exec" "${menu} --clipboard")
|
(key "V" "Super" "exec" "${kitty} --app-id clipboard --override font_size=12 ${clipse}")
|
||||||
(key "V" "Super+Shift" "exec" "${rm} ~/.cache/walker/clipboard.gob; ${notify-send} walker 'Clipboard cleared' --urgency low")
|
(key "V" "Super+Shift" "exec" "${clipse} --clear && ${notify-send} clipse 'Clipboard cleared' --urgency low")
|
||||||
(key "W" "Super" "togglespecialworkspace" "vm")
|
(key "W" "Super" "togglespecialworkspace" "vm")
|
||||||
(key "W" "Super+Ctrl" "exec" "${vm} -x ${
|
(key "W" "Super+Ctrl" "exec" "${vm} -x ${
|
||||||
if config.custom.hidpi
|
if config.custom.hidpi
|
||||||
|
|
|
@ -61,19 +61,20 @@ in {
|
||||||
|
|
||||||
# https://wiki.hyprland.org/Configuring/Keywords/#executing
|
# https://wiki.hyprland.org/Configuring/Keywords/#executing
|
||||||
exec = [
|
exec = [
|
||||||
left # Set left-pawed state
|
"${left} --init --scroll kensington-orbit-wireless-tb-mouse" # Enforce left-pawed state
|
||||||
"${systemctl} --user restart walker"
|
"${sleep} 5 && ${systemctl} --user restart walker"
|
||||||
"${sleep} 2 && ${systemctl} --user restart waybar"
|
"${sleep} 5 && ${systemctl} --user restart waybar"
|
||||||
];
|
];
|
||||||
|
|
||||||
# https://wiki.hyprland.org/Configuring/Keywords/#executing
|
# https://wiki.hyprland.org/Configuring/Keywords/#executing
|
||||||
exec-once =
|
exec-once =
|
||||||
[
|
optionals config.custom.wallpaper ["wallpaper"]
|
||||||
|
++ [
|
||||||
sway-audio-idle-inhibit # Inhibit idle while audio is playing
|
sway-audio-idle-inhibit # Inhibit idle while audio is playing
|
||||||
"${rm} ~/.cache/walker/clipboard.gob" # Clear clipboard
|
"${clipse} --clear" # Clear clipboard history
|
||||||
|
"${clipse} --listen" # Monitor clipboard
|
||||||
"[group new lock; tile] ${firefox-esr}"
|
"[group new lock; tile] ${firefox-esr}"
|
||||||
]
|
];
|
||||||
++ optionals config.custom.wallpaper ["wallpaper"];
|
|
||||||
|
|
||||||
# https://wiki.hyprland.org/Configuring/Variables/#xwayland
|
# https://wiki.hyprland.org/Configuring/Variables/#xwayland
|
||||||
xwayland = {
|
xwayland = {
|
||||||
|
|
|
@ -28,23 +28,31 @@ in {
|
||||||
# https://github.com/abenz1267/walker/blob/master/internal/config/config.default.json
|
# https://github.com/abenz1267/walker/blob/master/internal/config/config.default.json
|
||||||
config = {
|
config = {
|
||||||
activation_mode.disabled = true; # Key chords
|
activation_mode.disabled = true; # Key chords
|
||||||
ignore_mouse = true; # Hover interrupts keyboard selections
|
|
||||||
|
# BUG: Hover interrupts keyboard selections
|
||||||
|
ignore_mouse = true;
|
||||||
|
|
||||||
search.placeholder = "";
|
search.placeholder = "";
|
||||||
|
|
||||||
|
disabled = [
|
||||||
|
# BUG: Applications such as GNOME Files require multiple copy operations to register
|
||||||
|
"clipboard"
|
||||||
|
];
|
||||||
|
|
||||||
# https://github.com/abenz1267/walker/wiki/Modules
|
# https://github.com/abenz1267/walker/wiki/Modules
|
||||||
# https://www.nerdfonts.com/cheat-sheet
|
# https://www.nerdfonts.com/cheat-sheet
|
||||||
builtins = {
|
builtins = {
|
||||||
calculator.switcher_only = false;
|
calc.switcher_only = true;
|
||||||
clipboard.switcher_only = true;
|
clipboard.switcher_only = true;
|
||||||
commands.switcher_only = true;
|
commands.switcher_only = true;
|
||||||
custom_commands.switcher_only = true;
|
custom_commands.switcher_only = true;
|
||||||
runner.switcher_only = true;
|
runner.switcher_only = false;
|
||||||
ssh.switcher_only = true;
|
ssh.switcher_only = true;
|
||||||
windows.switcher_only = true;
|
windows.switcher_only = true;
|
||||||
|
|
||||||
applications = {
|
applications = {
|
||||||
# BUG: Ghost entries are still visible
|
# BUG: Ghost entries are still visible with single module
|
||||||
#// actions = false; # Desktop file actions
|
actions = false; # Desktop file actions
|
||||||
|
|
||||||
switcher_only = false;
|
switcher_only = false;
|
||||||
};
|
};
|
||||||
|
@ -66,6 +74,9 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
websearch = {
|
websearch = {
|
||||||
|
# TODO: Implement custom search engine
|
||||||
|
engines = ["duckduckgo"];
|
||||||
|
|
||||||
placeholder = "Search";
|
placeholder = "Search";
|
||||||
switcher_only = true;
|
switcher_only = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -92,6 +92,7 @@ in {
|
||||||
systemd
|
systemd
|
||||||
])
|
])
|
||||||
(bash "left" [
|
(bash "left" [
|
||||||
|
argc
|
||||||
hyprland
|
hyprland
|
||||||
jq
|
jq
|
||||||
libnotify
|
libnotify
|
||||||
|
|
|
@ -1,35 +1,54 @@
|
||||||
#! /usr/bin/env bash
|
#! /usr/bin/env bash
|
||||||
|
|
||||||
# Toggle left-pawed mouse
|
# @describe Toggle device pawdedness
|
||||||
#?? left DEVICE
|
#
|
||||||
|
# https://github.com/sigoden/argc
|
||||||
|
|
||||||
# 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 execution at reload to set state
|
||||||
#?? exec = left
|
#?? exec = left --init <DEVICE>
|
||||||
FILE="$HOME/.left"
|
|
||||||
|
|
||||||
# Set initial state
|
# @arg device! Device name, obtained via hyprctl devices
|
||||||
if [[ -f "$FILE" ]]; then
|
# @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
|
||||||
left=1
|
left=1
|
||||||
else
|
else
|
||||||
left=0
|
left=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If device argument, then toggle
|
# If not initializing
|
||||||
if (("$#" > 0)); then
|
if [[ ! "${argc_init:-}" ]]; then
|
||||||
left=$((1 - "$left"))
|
left=$((1 - "$left")) # Toggle 0/1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Enforce state
|
# Enforce state
|
||||||
if (("$left")); then
|
if (("$left")); then
|
||||||
hyprctl keyword "device[$1]:left_handed" true
|
hyprctl keyword "device[${argc_device:-}]:left_handed" true
|
||||||
hyprctl keyword "device[$1]:natural_scroll" true
|
|
||||||
touch "$FILE"
|
if [[ "${argc_scroll:-}" ]]; then
|
||||||
|
hyprctl keyword "device[${argc_device:-}]:natural_scroll" true
|
||||||
|
fi
|
||||||
|
|
||||||
|
touch "${argc_file:-}"
|
||||||
notify-send "> left" "Left-pawed" --urgency low
|
notify-send "> left" "Left-pawed" --urgency low
|
||||||
else
|
else
|
||||||
hyprctl keyword "device[$1]:left_handed" false
|
hyprctl keyword "device[${argc_device:-}]:left_handed" false
|
||||||
hyprctl keyword "device[$1]:natural_scroll" false
|
|
||||||
rm --force "$FILE"
|
if [[ "${argc_scroll:-}" ]]; then
|
||||||
|
hyprctl keyword "device[${argc_device:-}]:natural_scroll" false
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm --force "${argc_file:-}"
|
||||||
notify-send "> left" "Right-pawed" --urgency low
|
notify-send "> left" "Right-pawed" --urgency low
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue