diff options
| -rw-r--r-- | KEYBINDS.md | 80 | ||||
| -rw-r--r-- | dot_config/waybar/executable_mako-history.py | 27 |
2 files changed, 47 insertions, 60 deletions
diff --git a/KEYBINDS.md b/KEYBINDS.md index efd9b71..5e42365 100644 --- a/KEYBINDS.md +++ b/KEYBINDS.md @@ -304,46 +304,46 @@ Mod key: `Super` (Mod4). Only personal additions beyond sway defaults listed. ### Personal keybinds (sway/config) -| Key | Action | -| ----------------------- | ----------------------------------------------------------------------- | -| `XF86AudioRaiseVolume` | Volume +5% | -| `XF86AudioLowerVolume` | Volume -5% | -| `XF86AudioMute` | Mute toggle | -| `Super+m` | Mic mute toggle | -| `Super+Shift+m` | Speaker mute toggle | -| `XF86AudioPlay` | Play/pause | -| `XF86AudioNext` | Next track | -| `XF86AudioPrev` | Previous track | -| `XF86MonBrightnessUp` | Brightness +5% (brightnessctl) | -| `XF86MonBrightnessDown` | Brightness -5% (brightnessctl) | -| `XF86AudioMicMute` | Mic mute toggle | -| `XF86Bluetooth` | Bluetooth power toggle (bluetoothctl) | -| `XF86ScreenSaver` | Lock screen + pause media (same as Super+Shift+s) | -| `XF86Sleep` | Suspend system (systemctl suspend) | -| `XF86WLAN` | Toggle Wi-Fi (rfkill) | -| `XF86RFKill` | Toggle all radios (rfkill) | -| `Print` | Region screenshot (grim+slurp) | -| `Shift+Print` | Full screenshot (grim) | -| `Super+i` | Dictate toggle (whisper.cpp → wtype + clipboard) | -| `Super+Shift+o` | OCR region (tesseract → clipboard) | -| `Super+Shift+s` | Lock screen + pause media | -| `Super+n` | Dismiss visible notification (also marks it seen) | -| `Super+Shift+n` | Dismiss all visible notifications (mark all seen) | -| `Super+Ctrl+n` | Restore last dismissed; pop it back into the pending set | -| `XF86Favorites` | Notification history picker (Enter copies + dismisses, Alt-d dismisses) | -| `Super+p` | Clipboard history picker (wofi; Enter pastes, Alt-d deletes) | -| `Super+Shift+p` | Clipboard history delete entry (Enter deletes) | -| `Super+period` | Emoji picker (bemoji → wofi; types + copies) | -| `Super+Tab` | Next workspace | -| `Super+Shift+Tab` | Previous workspace | -| `Super+]` | Focus next window in container (monocle cycling) | -| `Super+[` | Focus prev window in container (monocle cycling) | -| `XF86Display` | Toggle display mode (laptop-off/side-by-side) | -| `XF86Tools` | Floating pulsemixer (audio mixer TUI) | -| `XF86Keyboard` | Floating glow pager for `~/dotfiles/KEYBINDS.md` | -| `Super+z` then `w` | Display QR for clipboard (wqr) | -| `Super+z` then `r` | Scan QR via webcam, copy to clipboard (rqr) | -| `Super+t` | Toggle Thunderbird (tiled on current workspace) | +| Key | Action | +| ----------------------- | ------------------------------------------------------------ | +| `XF86AudioRaiseVolume` | Volume +5% | +| `XF86AudioLowerVolume` | Volume -5% | +| `XF86AudioMute` | Mute toggle | +| `Super+m` | Mic mute toggle | +| `Super+Shift+m` | Speaker mute toggle | +| `XF86AudioPlay` | Play/pause | +| `XF86AudioNext` | Next track | +| `XF86AudioPrev` | Previous track | +| `XF86MonBrightnessUp` | Brightness +5% (brightnessctl) | +| `XF86MonBrightnessDown` | Brightness -5% (brightnessctl) | +| `XF86AudioMicMute` | Mic mute toggle | +| `XF86Bluetooth` | Bluetooth power toggle (bluetoothctl) | +| `XF86ScreenSaver` | Lock screen + pause media (same as Super+Shift+s) | +| `XF86Sleep` | Suspend system (systemctl suspend) | +| `XF86WLAN` | Toggle Wi-Fi (rfkill) | +| `XF86RFKill` | Toggle all radios (rfkill) | +| `Print` | Region screenshot (grim+slurp) | +| `Shift+Print` | Full screenshot (grim) | +| `Super+i` | Dictate toggle (whisper.cpp → wtype + clipboard) | +| `Super+Shift+o` | OCR region (tesseract → clipboard) | +| `Super+Shift+s` | Lock screen + pause media | +| `Super+n` | Dismiss visible notification (also marks it seen) | +| `Super+Shift+n` | Dismiss all visible notifications (mark all seen) | +| `Super+Ctrl+n` | Restore last dismissed; pop it back into the pending set | +| `XF86Favorites` | Notification history picker (Enter copies + dismisses) | +| `Super+p` | Clipboard history picker (wofi; Enter pastes, Alt-d deletes) | +| `Super+Shift+p` | Clipboard history delete entry (Enter deletes) | +| `Super+period` | Emoji picker (bemoji → wofi; types + copies) | +| `Super+Tab` | Next workspace | +| `Super+Shift+Tab` | Previous workspace | +| `Super+]` | Focus next window in container (monocle cycling) | +| `Super+[` | Focus prev window in container (monocle cycling) | +| `XF86Display` | Toggle display mode (laptop-off/side-by-side) | +| `XF86Tools` | Floating pulsemixer (audio mixer TUI) | +| `XF86Keyboard` | Floating glow pager for `~/dotfiles/KEYBINDS.md` | +| `Super+z` then `w` | Display QR for clipboard (wqr) | +| `Super+z` then `r` | Scan QR via webcam, copy to clipboard (rqr) | +| `Super+t` | Toggle Thunderbird (tiled on current workspace) | ## Typing / Input diff --git a/dot_config/waybar/executable_mako-history.py b/dot_config/waybar/executable_mako-history.py index 3171411..d98e4b5 100644 --- a/dot_config/waybar/executable_mako-history.py +++ b/dot_config/waybar/executable_mako-history.py @@ -2,12 +2,10 @@ """Notification history picker. Lists pending mako notifications (visible bubbles + history). Entries -previously dismissed via this picker are hidden so the list shrinks as -you process it. +dismissed via this picker are hidden so the list shrinks as you process it. Keys: Enter copy "summary\\nbody" to the clipboard and dismiss the entry - Alt-d dismiss without copying Esc cancel State file: $XDG_RUNTIME_DIR/mako-dismissed (one id per line, per-session). @@ -124,7 +122,7 @@ def parse_selection(line: str) -> int | None: return int(m.group(1)) if m else None -def run_wofi(input_text: str, lines: int) -> tuple[int, str]: +def run_wofi(input_text: str, lines: int) -> str: style = Path.home() / ".config/wofi/style.css" cmd = [ "wofi", @@ -132,21 +130,15 @@ def run_wofi(input_text: str, lines: int) -> tuple[int, str]: "--hide-search", "--prompt", "Notifications", - "--define", - "key_custom_0=Alt-d", "--lines", str(lines), ] if style.exists(): cmd += ["--style", str(style)] proc = subprocess.run( - cmd, - input=input_text, - text=True, - capture_output=True, - check=False, + cmd, input=input_text, text=True, capture_output=True, check=False ) - return proc.returncode, proc.stdout.strip() + return proc.stdout.strip() def main() -> None: @@ -158,8 +150,7 @@ def main() -> None: return lines_text = "\n".join(fmt_line(n) for n in notifs) + "\n" - rc, sel = run_wofi(lines_text, min(len(notifs), 15)) - + sel = run_wofi(lines_text, min(len(notifs), 15)) if not sel or sel.startswith("(no "): return @@ -173,12 +164,8 @@ def main() -> None: summary = str(notif.get("summary") or "").strip() body = str(notif.get("body") or "").strip() clip_text = f"{summary}\n{body}".strip() - - if rc == 10: # Alt-d → dismiss without copy - add_dismissed(nid) - elif rc == 0: # Enter → copy + dismiss - _ = subprocess.run(["wl-copy"], input=clip_text, text=True, check=False) - add_dismissed(nid) + _ = subprocess.run(["wl-copy"], input=clip_text, text=True, check=False) + add_dismissed(nid) if __name__ == "__main__": |
