跳过正文
Background Image

Sway Window Switcher

·219 字·
目录

A Python script to help list and switch sway windows easily through Fuzzel.

Screenshot-1

Requirements
#

  • Sway
  • A dmenu launcher, including fuzzel and rofi
  • Python3
  • jq
  • Grep

Also a nerd font is required if icons not show correctly. You can change fonts in your launcher settings.

Usage
#

  1. Get sway-window-switcher.py to somewhere you can execute.

  2. Run sway-window-switcher.py --help to get help.

    > sway-window-switcher.py -h
     usage: sway-window-switcher.py [-h] [-t {all,floating,scratch,regular}] [--plain-output] [-l {fuzzel,rofi}]
    
     List and select windows using swaymsg and dmenu launchers like fuzzel and rofi.
    
     options:
       -h, --help            show this help message and exit
       -t {all,floating,scratch,regular}, --type {all,floating,scratch,regular}
                             Type of window to list. Defaults to "all".
       --plain-output        Print a plain, unbeautified list to dmenu.
       -l {fuzzel,rofi}, --launcher {fuzzel,rofi}
                         Specific a dmenu launcher to use. Will use first exist launcher if not define.
    
  3. Bind the script to sway keybind to use it easily.

    For example, to list all the windows in scratchpad and switch to it you can have this in sway config:

    bindsym $mod+x exec sway-window-switcher -t scratch

    Make sure sway-window-switcher is in you PATH.

Thanks to
#

Sakari
作者
Sakari

相关文章

WM 下的 GTK 主题设置
·218 字
Waydroid 疑难排解
·749 字
使用 FFmpeg 转换音频为 Opus:避坑指南与实战经验
·3180 字
如何使用 FFmpeg 将音频文件转换为 Opus,以及转换过程中遇到的各种坑