Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/b0o/swaynagmode
⌨ swaynag wrapper for the love of keybindings
https://github.com/b0o/swaynagmode
i3 i3wm nag sway sway-nag swaynag swaywm wayland
Last synced: 4 months ago
JSON representation
⌨ swaynag wrapper for the love of keybindings
- Host: GitHub
- URL: https://github.com/b0o/swaynagmode
- Owner: b0o
- License: gpl-3.0
- Created: 2019-07-04T22:26:55.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-01-30T13:11:12.000Z (about 3 years ago)
- Last Synced: 2024-10-09T08:07:41.951Z (5 months ago)
- Topics: i3, i3wm, nag, sway, sway-nag, swaynag, swaywm, wayland
- Language: Shell
- Homepage: https://aur.archlinux.org/packages/swaynagmode
- Size: 30.3 KB
- Stars: 45
- Watchers: 6
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
swaynagmode
-----------
```
swaynagmode
v0.2.1
github.com/b0o/swaynagmodeA wrapper script which provides programmatic control
over swaynag, intended for use with keyboard bindings.To create a nag, simply use swaynag options as normal - they will be parsed and passed through.
To customise a nag, use these additional options:
short long description
-M --mode name of sway mode to trigger on init (default: nag)
NOTE: beginning in sway version 1.2, mode names are case-sensitive
-D --mode-default name of sway mode to trigger on exit (default: default)
--no-mode disable triggering of sway modes
-i --initial index of the initially selected button (default: 0)
-K --no-kill don't add a kill command to the button actions
-R --reverse reverse the button orderTo control an existing nag, use the following options:
short long description
-x --exit dismisses the nag without performing any actions
-S --select selects the previous/next button, wrapping around each end
(as specified in arguments left to right, buttons appear from right to
left)
-C --confirm accepts the selected button (indicated with [brackets]) and executes its
action.Global options:
short long description
-h --help display usage information for swaynagmode and swaynag
-H --help-snm display usage information for swaynagmode
-v --version output versionCaveats:
- Only one instance of swaynagmode may be run at a time.Example sway configuration:
# nag
set {
$nag exec swaynagmode
$nag_exit $nag --exit
$nag_confirm $nag --confirm
$nag_select $nag --select
}
mode "nag" {
bindsym {
Ctrl+d mode "default"Ctrl+c $nag_exit
q $nag_exit
Escape $nag_exitReturn $nag_confirm
Tab $nag_select prev
Shift+Tab $nag_select nextLeft $nag_select next
Right $nag_select prevUp $nag_select next
Down $nag_select prev
}
}
bindsym {
$super+Shift+q $nag -t "warning" -m "Exit Sway?" -b "Exit" "swaymsg exit" -b "Reload" "swaymsg reload"
}
# -R is recommended for swaynag_command so that, upon a syntax error in your sway config, the
# 'Reload Sway' option will be initially selected instead of the 'Exit Sway' option
swaynag_command $nag -R(c) 2019-2021 Maddison Hellstrom
GPL License (https://www.gnu.org/licenses/gpl-3.0.txt)
```