Skip to content

2KAbhishek/sway2k

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

License People Stars Forks Watches Last Updated

Swaying Windows in Wayland πŸŽπŸ›£

sway2k in action
sway2k in action

My personalized configs for sway window manager, minimalistic in design and optimized for CLI productivity.

✨ Features

  • Optimized for the CLI
  • Comes with integrations for foot, mako, waybar and more
  • Minimalistic UI
  • Optimized for AMOLED displays

Setup

⚑ Requirements

  • sway: the window manager
  • foot: waylan terminal emulator
  • rofi: with rofi2k as launcher
  • waybar: adds toolbar support
  • mako: notification daemon
  • grimshot: screenshot support
  • wf-recorder: screen recorder support
  • cliphist: for clipboard management
  • wluma: adaptive brightness support
  • wlsunset: sunset timing support
  • light: for display brightness
  • python: for scripts support
  • qutebrowser: with qute2k as launcher
  • nmtui: network manager cli
  • bluetuith: bluetooth manager cli
  • pulsemixer: audio manager cli
  • bmenu: cli menu for utilities
# Arch
sudo pacman -S sway foot rofi waybar mako grimshot wf-recorder cliphist wluma wlsunset light python

# Debian
sudo apt install sway foot rofi waybar mako grimshot wf-recorder cliphist wluma wlsunset light python

# Fedora
sudo dnf install kvantum lxappearance kanshi calcurse

Themes

sway2k uses BWnB as gtk and Kvantum themes, for Firefox it uses Nightblue

Edit theme.conf to customize accordingly.

πŸš€ Installation

git clone https://github.com/2kabhishek/sway2k
ln -sfnv "$PWD/sway2k" ~/.config/sway
# To setup foot separately
ln -sfnv "$PWD/sway2k/foot" ~/.config/foot
# To setup waybar separately
ln -sfnv "$PWD/sway2k/waybar" ~/.config/waybar

πŸ’» Usage

Definitions

Default apps and definitions are in definitions.conf

  • Default launcher: rofi, with rofi2k
  • Default browser: qutebrowser, with qute2k
  • Default camera: guvcview
  • Default terminal: foot

Keybindings

You can find keybindings in the modes dir

Default keybindings are same as i3 keybindings

Mod is the Super key.

Shortcut Action
Mod + Enter Open Terminal
Mod + Shift + Enter / F12 Open Floating terminal
Esc Close floatin terminal, exit modes
Mod + h/j/k/l Switch focused window
Mod + left/right/0-9 Switch focused workspace
Mod + up/down Resize focused workspace
Mod + Tab Most recent workspace
Mod + Shift + h/j/k/l/arrows Move focused window within workspace
Mod + Shift + 0-9 Move focused window to workspace
Mod + Alt + h/j/k/l/arrows Move focused window between screens
Mod + Shift + m Move focused window to empty workspace
Mod + n Move to empty workspace
Mod + Shift + n Move focused window away
Mod + Shift + c Reload config
Mod + Shift + b Toggle waybar
F11 / Mod + f Full screen focused window
Mod + Shift + f Toggle floating
Mod + Shift + w Open default browser
Mod + Shift + p Open default camera app
Mod + q Close focused window
Alt + Tab Most recent / urgent window
Alt + Shift + +/- Zoom in / Zoom out
Mod + Space Open app launcher
Mod + d Open app launcher in empty workspace
Mod + a Open app switcher
Mod + v Open clipboard history
Mod + . Open emoji panel
Resize Mode
Shortcut Action
Mod + r Open resize mode
h/j/k/l/arrows Resize windows by 10px
Shift + h/j/k/l/arrows Resize windows by 50px
+/Shift + = / - Increase / Decrease gaps
Esc / Enter Exit mode
Screenshot Mode
Shortcut Action
Mod + Shift + p Open screenshot mode
p Select region to capture
o Capture full screen
Shift + p / o Capture with upload
Esc Exit mode
Record Mode
Shortcut Action
Mod + Shift + r Open record mode
r Start recording
Shift + r Record with audio
Esc Exit mode
Shutdown Mode
Shortcut Action
Mod + Shift + q Open shutdown mode
l Lock
s Shutdown
r Reboot
u Sleep
e Logout
Esc Exit mode

Waybar Modules

Comes with a bunch of customized waybar modules:

  • menu: app launcher
  • clock: with calendar integration
  • weather: powered by wttr.in
  • mode: sway modes
  • wf-recorder: screen recorder integration
  • pacman: package manager integration
  • github: GitHub notifications with gh cli
  • zeit: task tracker integration
  • clipboard: powered by cliphist
  • temperature: cpu temperatures with sensors
  • cpu: cpu usage in percentage
  • memory: shows used ram
  • idle-inhibitor: controls idle screen turning off
  • battery: shows battery usages and warnings
  • sunset: location based gamma correction
  • adaptive-light: brightness control powered by wluma
  • backlight: brightness control
  • playerctl: controls media playback
  • pulseaudio: controls audio devices
  • network: network connections powered by nmtui
  • bluetooth: bluetooth adapter controls
  • dnd: mako dnd integrations
  • tray: system tray integration

Behind The Code

🌈 Inspiration

A spiritual successor to awesome2k.

I have been using awesome wm for a while and wanted to try out wayland, so I jumped in to sway!

πŸ’‘ Challenges/Learnings

  • Learned about wayland and sway APIs

🧰 Tooling

  • dots2k β€” Dev Environment
  • nvim2k β€” Personalized Editor

πŸ” More Info

  • awesome2k β€” Xorg based tiling wm configs

⭐ hit the star button if you found this useful ⭐

Source | Blog | Twitter | LinkedIn | More Links | Other Projects