swayswitch/README.md

45 lines
1.9 KiB
Markdown
Raw Permalink Normal View History

2020-12-24 22:31:36 +01:00
# swayswitch
2021-01-05 23:41:23 +01:00
A simple window switcher for the [Sway](https://swaywm.org/) Wayland compositor written in python using wxPython.
2020-12-24 23:23:40 +01:00
2020-12-24 23:25:38 +01:00
## Installation
2020-12-27 15:40:15 +01:00
### Debian
2020-12-24 23:23:40 +01:00
```
2020-12-27 15:40:15 +01:00
curl https://repo.mic.ke/PUBLIC.KEY | sudo apt-key add -
curl https://repo.mic.ke/debian/debian-micke-unstable.list | sudo tee /etc/apt/sources.list.d/debian-micke-unstable.list
sudo apt update && sudo apt install swayswitch
2020-12-24 23:23:40 +01:00
```
2020-12-27 15:40:15 +01:00
### RPM
2020-12-24 23:23:40 +01:00
```
2020-12-27 15:40:15 +01:00
wget https://repo.mic.ke/PUBLIC.KEY
sudo rpm --import PUBLIC.KEY
sudo dnf config-manager --add-repo https://repo.mic.ke/rpm/rpm-micke.repo
sudo dnf install swayswitch
2020-12-24 23:23:40 +01:00
```
2020-12-27 15:40:15 +01:00
## Usage
Reload config and open up window switcher with Mod4+tab. Move around the switcher using arrow-keys or Tab.
2021-01-05 11:08:18 +01:00
Esc aborts and enter switches window. It is also possible to select window with the mouse.
2020-12-24 23:52:39 +01:00
Two keybindings work by default, Mod4+f to toggle fullscreen mode, that is if you manage to bring up the switcher while in fullscreen mode you can display the
2021-01-05 11:08:18 +01:00
switcher window by exiting fullscreen mode. You can also exit switcher mode by pressing Mod4+q, this is usefull if you manage to get another window on top of
2020-12-28 11:48:39 +01:00
the switcher window somehow.
2021-01-05 11:08:18 +01:00
### Config files
SwaySwitch uses two configuration files, one is supplied with the package and is installed to /etc/sway/config.d/swayswitch.conf. It contains default keybindings for Sway.
2021-01-05 19:43:43 +01:00
The other one is optionally supplied by the user as $HOME/.local/swayswitch/config in toml format.
2021-01-05 11:08:18 +01:00
Possible options are:
```
label_len = 20
icon_size = 128
```
2021-01-05 19:43:43 +01:00
The example above is the default options. ```label_len``` is the total length of the text label above buttons in number of characters and ```icon_size``` is the size of the icons in pixels.
2021-01-05 11:08:18 +01:00
2020-12-24 23:52:39 +01:00
## Thanks
Thanks to tobiaspc for the startingpoint for this code: <https://github.com/tobiaspc/wofi-scripts>
2020-12-27 16:01:58 +01:00
## Screenshot
![Open window switcher](https://github.com/mickenordin/swayswitch/blob/main/screenshots/scrot1.png)