1
1
Fork 0

Compare commits

..

5 commits

Author SHA1 Message Date
749bd90816
nix: formatting
Signed-off-by: Myned <dev@bjork.tech>
2024-09-24 18:24:36 -05:00
5464089948
left: refactor with argc
Signed-off-by: Myned <dev@bjork.tech>
2024-09-24 18:24:27 -05:00
75b1043ac4
hyprland: increase time before restarting on reload
Signed-off-by: Myned <dev@bjork.tech>
2024-09-24 18:24:02 -05:00
816f84059d
menu: fix and modify walker
Signed-off-by: Myned <dev@bjork.tech>
2024-09-24 18:23:22 -05:00
5a95ba0524
clipboard: revert back to clipse
Signed-off-by: Myned <dev@bjork.tech>
2024-09-24 18:21:27 -05:00
5 changed files with 64 additions and 32 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} --applications")
(key "Super_L" "Super" "exec" "${menu}")
(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} --runner")
(key "Super_L" "Super+Shift" "exec" "${menu} --search")
];
# 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} 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+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" "${menu} --clipboard")
(key "V" "Super+Shift" "exec" "${rm} ~/.cache/walker/clipboard.gob; ${notify-send} walker 'Clipboard cleared' --urgency low")
(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 "W" "Super" "togglespecialworkspace" "vm")
(key "W" "Super+Ctrl" "exec" "${vm} -x ${
if config.custom.hidpi

View file

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

View file

@ -28,23 +28,31 @@ in {
# https://github.com/abenz1267/walker/blob/master/internal/config/config.default.json
config = {
activation_mode.disabled = true; # Key chords
ignore_mouse = true; # Hover interrupts keyboard selections
# BUG: Hover interrupts keyboard selections
ignore_mouse = true;
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 = {
calculator.switcher_only = false;
calc.switcher_only = true;
clipboard.switcher_only = true;
commands.switcher_only = true;
custom_commands.switcher_only = true;
runner.switcher_only = true;
runner.switcher_only = false;
ssh.switcher_only = true;
windows.switcher_only = true;
applications = {
# BUG: Ghost entries are still visible
#// actions = false; # Desktop file actions
# BUG: Ghost entries are still visible with single module
actions = false; # Desktop file actions
switcher_only = false;
};
@ -66,6 +74,9 @@ in {
};
websearch = {
# TODO: Implement custom search engine
engines = ["duckduckgo"];
placeholder = "Search";
switcher_only = true;
};

View file

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

View file

@ -1,35 +1,54 @@
#! /usr/bin/env bash
# Toggle left-pawed mouse
#?? left DEVICE
# @describe Toggle device pawdedness
#
# https://github.com/sigoden/argc
# 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
FILE="$HOME/.left"
#?? exec = left --init <DEVICE>
# Set initial state
if [[ -f "$FILE" ]]; then
# @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
left=1
else
left=0
fi
# If device argument, then toggle
if (("$#" > 0)); then
left=$((1 - "$left"))
# If not initializing
if [[ ! "${argc_init:-}" ]]; then
left=$((1 - "$left")) # Toggle 0/1
fi
# Enforce state
if (("$left")); then
hyprctl keyword "device[$1]:left_handed" true
hyprctl keyword "device[$1]:natural_scroll" true
touch "$FILE"
hyprctl keyword "device[${argc_device:-}]:left_handed" true
if [[ "${argc_scroll:-}" ]]; then
hyprctl keyword "device[${argc_device:-}]:natural_scroll" true
fi
touch "${argc_file:-}"
notify-send "> left" "Left-pawed" --urgency low
else
hyprctl keyword "device[$1]:left_handed" false
hyprctl keyword "device[$1]:natural_scroll" false
rm --force "$FILE"
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:-}"
notify-send "> left" "Right-pawed" --urgency low
fi