Python Sway

Open-source Python projects categorized as Sway

Top 18 Python Sway Projects

  • i3ipc-python

    🐍 An improved Python library to control i3wm and sway.

    Project mention: How to switch focus to last selected window? | /r/i3wm | 2023-05-14
  • autotiling

    Script for sway and i3 to automatically switch the horizontal / vertical window split orientation

    Project mention: I cannot write "^" in the terminal | /r/ManjaroLinux | 2023-12-08

    # i1 config file (v4) # # Please see https://i3wm.org/docs/userguide.html for a complete reference! # # This config file uses keycodes (bindsym) and was written for the QWERTY # layout. # # To get a config file with the same key positions, but for your current # layout, use the i3-config-wizard # The modifier used all along this configuration file. It is the super key. # Mod1 = Alt, Mod4 = super set $mod Mod4 # local conf. Differ depending on the computer include ~/.config/i3/local.conf # A nice autotiling # needs to use the script in https://github.com/nwg-piotr/autotiling exec_always --no-startup-id autotiling # Font for window titles. Will also be used by the bar unless a different font # is used in the bar {} block below. # font pango:monospace 12 # This font is widely installed, provides lots of unicode glyphs, right-to-left # text rendering and scalability on retina/hidpi displays (thanks to pango). font pango:DejaVu Sans Mono 14 # Start XDG autostart .desktop files using dex. See also # https://wiki.archlinux.org/index.php/XDG_Autostart exec --no-startup-id dex --autostart --environment i3 # The combination of xss-lock, nm-applet and pactl is a popular choice, so # they are included here as an example. Modify as you see fit. # xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the # screen before suspend. Use loginctl lock-session to lock your screen. exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork # NetworkManager is the most popular way to manage wireless networks on Linux, # and nm-applet is a desktop environment-independent system tray GUI for it. exec --no-startup-id nm-applet # use these keys for focus, movement, and resize directions when reaching for # the arrows is not convenient set $up k set $down j set $left h set $right l # use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod # start a terminal bindsym $mod+Return exec i3-sensible-terminal bindsym $mod+t exec i3-sensible-terminal # start applications # bindsym $mod+Shift+f exec firefox # bindsym $mod+Shift+z exec zathura # terminal applications # Cause i use konsole terminal... # bindsym $mod+Shift+r exec konsole -e ranger # bindsym $mod+Shift+n exec konsole -e nvim # kill focused window bindsym $mod+Shift+q kill # start dmenu (a program launcher) # bindsym $mod+d exec --no-startup-id dmenu_run # A more modern dmenu replacement is rofi: set $rofi exec "rofi -modi drun,run -show drun -show-icons" # some added scripts set $rofi_scripts ~/.config/rofi bindsym $mod+d exec "rofi -modi drun,run -show drun -show-icons" # doesn't work bindsym $mod+b exec $rofi_scripts/i3_switch_workspace.sh bindsym $mod+Shift+b exec "rofi -show window -show-icons" # There also is i3-dmenu-desktop which only displays applications shipping a # .desktop file. It is a wrapper around dmenu, so you need that installed. # bindsym $mod+d exec --no-startup-id i3-dmenu-desktop # change focus bindsym $mod+$left focus left bindsym $mod+$down focus down bindsym $mod+$up focus up bindsym $mod+$right focus right # alternatively, you can use the cursor keys: bindsym $mod+Left focus left bindsym $mod+Down focus down bindsym $mod+Up focus up bindsym $mod+Right focus right # move focused window bindsym $mod+Shift+$left move left bindsym $mod+Shift+$down move down bindsym $mod+Shift+$up move up bindsym $mod+Shift+$right move right # alternatively, you can use the cursor keys: bindsym $mod+Shift+Left move left bindsym $mod+Shift+Down move down bindsym $mod+Shift+Up move up bindsym $mod+Shift+Right move right # split in horizontal orientation bindsym $mod+Shift+v split h # split in vertical orientation bindsym $mod+v split v # enter fullscreen mode for the focused container bindsym $mod+f fullscreen toggle # change container layout (stacked, tabbed, toggle split) bindsym $mod+s layout stacking bindsym $mod+w layout tabbed bindsym $mod+e layout toggle split # toggle tiling / floating bindsym $mod+Shift+space floating toggle # change focus between tiling / floating windows bindsym $mod+space focus mode_toggle # focus the parent container bindsym $mod+a focus parent # focus the child container bindsym $mod+z focus child # Show the next scratchpad window or hide the focused scratchpad window. # If there are multiple scratchpad windows, this command cycles through them. bindsym $mod+c scratchpad show # move the currently focused window to the scratchpad bindsym $mod+Shift+c move scratchpad # Define names for default workspaces for which we configure key bindings later on. # We use variables to avoid repeating the names in multiple places. set $ws1 "1" set $ws2 "2" set $ws3 "3" set $ws4 "4" set $ws5 "5" set $ws6 "6" set $ws7 "7" set $ws8 "8" set $ws9 "9" set $ws10 "10" # switch to workspace bindsym $mod+1 workspace number $ws1 bindsym $mod+2 workspace number $ws2 bindsym $mod+3 workspace number $ws3 bindsym $mod+4 workspace number $ws4 bindsym $mod+5 workspace number $ws5 bindsym $mod+6 workspace number $ws6 bindsym $mod+7 workspace number $ws7 bindsym $mod+8 workspace number $ws8 bindsym $mod+9 workspace number $ws9 bindsym $mod+0 workspace number $ws10 #navigate workspaces next / previous, as for the navigation after the f/t bindsym $mod+semicolon workspace next bindsym $mod+comma workspace prev # move focused container to workspace bindsym $mod+Shift+1 move container to workspace number $ws1 bindsym $mod+Shift+2 move container to workspace number $ws2 bindsym $mod+Shift+3 move container to workspace number $ws3 bindsym $mod+Shift+4 move container to workspace number $ws4 bindsym $mod+Shift+5 move container to workspace number $ws5 bindsym $mod+Shift+6 move container to workspace number $ws6 bindsym $mod+Shift+7 move container to workspace number $ws7 bindsym $mod+Shift+8 move container to workspace number $ws8 bindsym $mod+Shift+9 move container to workspace number $ws9 bindsym $mod+Shift+0 move container to workspace number $ws10 # For example, if you are on the workspace 1 and you hit $mod+2, you’ll switch to workspace 2. # Then, if you hit $mod+2 again, you’ll go back to your previous workspaces, workspace 1. workspace_auto_back_and_forth no # reload the configuration file # bindsym $mod+Shift+c reload bindsym $mod+r restart # restart i3 inplace (preserves your layout/session, can be used to upgrade i3) # exit i3 (logs you out of your X session) bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" # resize window (you can also use the mouse for that) mode "resize" { # These bindings trigger as soon as you enter the resize mode # Pressing left will shrink the window’s width. # Pressing right will grow the window’s width. # Pressing up will shrink the window’s height. # Pressing down will grow the window’s height. bindsym $left resize shrink width 10 px or 10 ppt bindsym $down resize grow height 10 px or 10 ppt bindsym $up resize shrink height 10 px or 10 ppt bindsym $right resize grow width 10 px or 10 ppt # same bindings, but for the arrow keys bindsym Left resize shrink width 10 px or 10 ppt bindsym Down resize grow height 10 px or 10 ppt bindsym Up resize shrink height 10 px or 10 ppt bindsym Right resize grow width 10 px or 10 ppt # back to normal: Enter or Escape or $mod+r bindsym Return mode "default" bindsym Escape mode "default" bindsym $mod+r mode "default" } bindsym $mod+Shift+s mode "resize" # Start i3bar to display a workspace bar (plus the system information i3status # finds out, if available) bar { font pango:Exo2, FontAwesome5Free, FontAwesome5Brands, SymbolsNerdFont 12 status_command i3blocks position bottom } # for polybar # exec_always --no-startup-id $HOME/polybar-collection/launch.sh # a mode to exit, more practical that the $mod+Shift+e that forces the use of mouse. mode "exit: [l]ogout, [r]eboot, [s]hutdown" { bindsym l exec i3-msg exit bindsym r exec systemctl reboot bindsym s exec systemctl poweroff bindsym Escape mode "default" bindsym Return mode "default" bindsym $mod+x mode "default" } # I added fullscreen disable in order for the message to always be visible bindsym $mod+x fullscreen disable mode "exit: [l]ogout, [r]eboot, [s]hutdown" # command to rename current workspace, n for 'name' # NOT A GOOD IDEA. Would break the usefullness of the binding for workspaces 1,2,3... # bindsym $mod+n exec i3-input -F 'rename workspace to "%s"' -P 'New workspace name: ' # bindsym $mod+Shift+n exec i3-input -F 'title_format "%s"' -P 'New windows name: ' # configure gaps gaps inner 5 gaps outer 5 # need to be installed! config file in /etc/xdg/picom.conf # used by flashfocus exec_always --no-startup-id picom # See https://github.com/fennerm/flashfocus/wiki exec_always --no-startup-id flashfocus # flashfocus can also be bound to a keystroke. # bindsym $mod+n exec --no-startup-id flash_window # Not really for i3, but to put zathura as default viewer: # source https://wiki.archlinux.org/title/zathura # xdg-mime default org.pwmt.zathura.desktop application/pdf

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

  • azote

    Wallpaper manager for wlroots-based compositors and some other WMs

    Project mention: Azote 1.12.3 | /r/nwg_shell | 2023-07-10

    fixed crash on spaces in directory names #184 by @rabbitselector

  • nwg-displays

    Output management utility for sway and Hyprland.

    Project mention: how to change layout for multiple monitors on wayland | /r/wayland | 2023-09-15

    you can use https://github.com/nwg-piotr/nwg-displays if you want a graphical way.

  • nwg-wrapper

    Wrapper to display a script output or a text file content on the desktop in sway or other wlroots-based compositors

    Project mention: Using nwg-wrapper for a HUD of help for sway modes | /r/swaywm | 2023-07-04

    Usage: sway-mode [-c,--config config-file] [-C,--css css-file] mode Puts sway into mode 'mode' and displays some help by extracting a section from the config file. Options: -c,--config config_file location of your config file (/home/bhepple/.config/sway/config) -C,--css css_file location of your css file (/home/bhepple/.config/nwg-wrapper/mode-help.css) Requires nwg-wrapper https://github.com/nwg-piotr/nwg-wrapper Assumes modes are defined in the config file like this: mode "foobar" { ... } To use this, reassign the bindkey command for the mode like this: bindsym $mod+s exec sway-mode "swap" and in the mode definition, change the mode ending keys to # back to default mode bindsym q exec pkill nwg-wrapper; mode "default" bindsym Return exec pkill nwg-wrapper; mode "default" bindsym Escape exec pkill nwg-wrapper; mode "default" Here's a sample CSS file: window { font-family: "Monospace"; color: rgba (255, 255, 255, 1.0); background-color: rgba (255, 255, 255, 0.1); } #box-inner { background-color: rgba (23, 53, 63, 0.7); border-radius: 5px; border-style: dotted; border-width: 1px; border-color: rgba (156, 142, 122, 0.7); padding: 10px; }

  • i3-quickterm

    A small drop-down terminal for i3 and sway

  • wayremap

    Dynamic key remapper for Wayland Window System, especially for Sway

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

  • nwg-shell-config

    nwg-shell configuration utility

    Project mention: nwg-shell-config 0.5.16/0.5.17 (2023.08.29) | /r/nwg_shell | 2023-08-30

    If we still don't have your $LANG translated, feel free to contribute to this folder. Initial labels translation is not (yet?) supported by the nwg-shell-translate utility.

  • swayinfo

    Some goodies for use in Sway and i3 wm

  • dotfiles

    Dotfiles of my Arch Linux (by lvntcnylmz)

    Project mention: Themes not applying in Sway Notification Center | /r/swaywm | 2023-07-04

    I copied these dotfiles (https://github.com/lvntcnylmz/dotfiles/tree/main/.config/swaync) in /home/user/.config/swaync/... and used swaync-client --reload-config, but the notification center didn't change. So I tried to stop and restart swaync, but the theme still wasn't applied. I even tried restarting the computer, but the situation remained the same. Any ideas on how to solve?

  • layman

    a layout management framework for sway/i3

  • wofi-scripts

    Scripts for wofi, a wayland compatible program launcher

  • cute-sway-recorder

    SwayWM screen recorder; a GUI for wf-recorder

  • i3ipc-dynamic-tiling

    A Python IPC implementation of dynamic tiling for the i3 and sway window managers.

  • dotfiles

    Huge .files repo (by Mirko-r)

  • swayblur

    Basic i3ipc based script to blur an output's wallpaper when a client is present in it

  • sway-smart-workspaces

    sway-smart-workspaces

  • dotfiles

    The eternal quest for the best settings for the best programs (by terminalnode)

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2023-12-08.

Python Sway related posts

Index

What are some of the best open-source Sway projects in Python? This list will help you:

Project Stars
1 i3ipc-python 831
2 autotiling 810
3 azote 335
4 nwg-displays 282
5 nwg-wrapper 130
6 i3-quickterm 122
7 wayremap 57
8 nwg-shell-config 52
9 swayinfo 46
10 dotfiles 45
11 layman 32
12 wofi-scripts 32
13 cute-sway-recorder 30
14 i3ipc-dynamic-tiling 21
15 dotfiles 17
16 swayblur 12
17 sway-smart-workspaces 3
18 dotfiles 1
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com