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+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}") (key "Super_L" "Super" "exec" "${menu} --applications")
(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} --search") (key "Super_L" "Super+Shift" "exec" "${menu} --runner")
]; ];
# 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} --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" "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" "${kitty} --app-id clipboard --override font_size=12 ${clipse}") (key "V" "Super" "exec" "${menu} --clipboard")
(key "V" "Super+Shift" "exec" "${clipse} --clear && ${notify-send} clipse 'Clipboard cleared' --urgency low") (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" "togglespecialworkspace" "vm")
(key "W" "Super+Ctrl" "exec" "${vm} -x ${ (key "W" "Super+Ctrl" "exec" "${vm} -x ${
if config.custom.hidpi if config.custom.hidpi

View file

@ -61,20 +61,19 @@ in {
# https://wiki.hyprland.org/Configuring/Keywords/#executing # https://wiki.hyprland.org/Configuring/Keywords/#executing
exec = [ exec = [
"${left} --init --scroll kensington-orbit-wireless-tb-mouse" # Enforce left-pawed state left # Set left-pawed state
"${sleep} 5 && ${systemctl} --user restart walker" "${systemctl} --user restart walker"
"${sleep} 5 && ${systemctl} --user restart waybar" "${sleep} 2 && ${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
"${clipse} --clear" # Clear clipboard history "${rm} ~/.cache/walker/clipboard.gob" # Clear clipboard
"${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 = {

View file

@ -28,31 +28,23 @@ 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 = {
calc.switcher_only = true; calculator.switcher_only = false;
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 = false; runner.switcher_only = true;
ssh.switcher_only = true; ssh.switcher_only = true;
windows.switcher_only = true; windows.switcher_only = true;
applications = { applications = {
# BUG: Ghost entries are still visible with single module # BUG: Ghost entries are still visible
actions = false; # Desktop file actions #// actions = false; # Desktop file actions
switcher_only = false; switcher_only = false;
}; };
@ -74,9 +66,6 @@ in {
}; };
websearch = { websearch = {
# TODO: Implement custom search engine
engines = ["duckduckgo"];
placeholder = "Search"; placeholder = "Search";
switcher_only = true; switcher_only = true;
}; };

View file

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

View file

@ -1,54 +1,35 @@
#! /usr/bin/env bash #! /usr/bin/env bash
# @describe Toggle device pawdedness # Toggle left-pawed mouse
# #?? 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 --init <DEVICE> #?? exec = left
FILE="$HOME/.left"
# @arg device! Device name, obtained via hyprctl devices # Set initial state
# @option -f --file=`_default_file` Specify file for state if [[ -f "$FILE" ]]; then
# @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 not initializing # If device argument, then toggle
if [[ ! "${argc_init:-}" ]]; then if (("$#" > 0)); then
left=$((1 - "$left")) # Toggle 0/1 left=$((1 - "$left"))
fi fi
# Enforce state # Enforce state
if (("$left")); then if (("$left")); then
hyprctl keyword "device[${argc_device:-}]:left_handed" true hyprctl keyword "device[$1]:left_handed" true
hyprctl keyword "device[$1]:natural_scroll" true
if [[ "${argc_scroll:-}" ]]; then touch "$FILE"
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[${argc_device:-}]:left_handed" false hyprctl keyword "device[$1]:left_handed" false
hyprctl keyword "device[$1]:natural_scroll" false
if [[ "${argc_scroll:-}" ]]; then rm --force "$FILE"
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