• Stars
    star
    300
  • Rank 138,870 (Top 3 %)
  • Language
    C
  • License
    GNU General Publi...
  • Created almost 3 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An overlay that shows schemas for all workspaces to make navigation in sway easier.

sov β€” Sway Overview

An overlay that shows schemas for all workspaces to make navigation in sway easier.

Sway Overview was made for SwayOS (https://swayos.github.io)

alt text

Watch the introduction/user guide video on youtube

Features

  • no downscaled and confusing thumbnails, just crystal clear app names and titles
  • layout schema makes workspace identification easier
  • super lightweight
  • multi-display support

Long descripton

Sway overview is an overview applciation for the sway tiling window manager. Tiling window managers are about simplicity so by default they don't have any kind of overview feature. It is okay under five workspaces because you can just remember where specific windows were opened but over 5 workspaces it can get really complicated. Sway overview draws a schematic layout of all your workspaces on each output. It contains all windows, window titles and window contents. Thumbnail based overview solutions can become confusing quickly when the thumbnails become too small to recognize, sway overview won't. The common usage of Sway overview is to bound its appereance to the desktop switcher button with a little latency. Sway overview can be structured via html, styled via css.

Installation

Compiling from source

Install the needed dependencies and libraries:

git meson ninja-build pkg-config
libpng,libfreetype,
libgl,libglew,libegl,libwegl,wayland-client,wayland-protocols,xkbcommon,gles2
fonts-terminus

On debian based systems ( over version 12 ):

sudo apt-get install git meson ninja-build pkg-config libpng-dev libfreetype-dev libgl-dev libegl-dev libglew-dev libwayland-dev libxkbcommon-dev wayland-protocols libgles2-mesa-dev

On arch based systems :

sudo pacman -Qs git meson pkg-config ninja glew wayland-protocols libpng freetype2 libgl libegl wayland wayland-protocols libxkbcommon 

or use the AUR

Then run these commands:

git clone [email protected]:milgra/sov.git
cd sov
meson setup build --buildtype=release
ninja -C build
sudo ninja -C build install

From packages

Packaging status

Usage

Launch sov in a terminal, enter 0 to hide, 1 to show, 2 to toggle, 3 to quit sov, press return.

sov

Usage with sway wm

Launch sov in the config connected to a named pipe, but remove the named pipe first to avoid mkfifo errors. Add parameters if you want to tune some behaviour.

exec rm -f /tmp/sovpipe && mkfifo /tmp/sovpipe && tail -f /tmp/sovpipe | sov -t 500

Set up your sway config so that on workspace button press and release it writes 1 and 0 into the pipe:

bindsym --no-repeat $mod+1 workspace number 1; exec "echo 1 > /tmp/sovpipe"
bindsym --no-repeat $mod+2 workspace number 2; exec "echo 1 > /tmp/sovpipe"
bindsym --no-repeat $mod+3 workspace number 3; exec "echo 1 > /tmp/sovpipe"
bindsym --no-repeat $mod+4 workspace number 4; exec "echo 1 > /tmp/sovpipe"
bindsym --no-repeat $mod+5 workspace number 5; exec "echo 1 > /tmp/sovpipe"
bindsym --no-repeat $mod+6 workspace number 6; exec "echo 1 > /tmp/sovpipe"
bindsym --no-repeat $mod+7 workspace number 7; exec "echo 1 > /tmp/sovpipe"
bindsym --no-repeat $mod+8 workspace number 8; exec "echo 1 > /tmp/sovpipe"
bindsym --no-repeat $mod+9 workspace number 9; exec "echo 1 > /tmp/sovpipe"
bindsym --no-repeat $mod+0 workspace number 10; exec "echo 1 > /tmp/sovpipe"

bindsym --release $mod+1 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+2 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+3 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+4 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+5 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+6 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+7 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+8 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+9 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+0 exec "echo 0 > /tmp/sovpipe"

Usage with Systemd

Add this line to your config file:

exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK

Copy systemd unit files (if not provided by your distribution package):

cp contrib/systemd/sov.{service,socket} ~/.local/share/systemd/user/
systemctl daemon-reload --user

Enable systemd sov socket:

systemctl enable --now --user sov.socket

Configuration and Styling

If you want to style sov, copy /usr/share/sov/html to ~/.config/sov/html and edit the html and css files inside it.

on most linux distros :

mkdir -p ~/.config/sov
cp -r /usr/share/sov/html ~/.config/sov/

on FreeBSD

mkdir -p ~/.config/sov
cp -r /usr/local/share/sov/html ~/.config/sov/

Additional options can be set as command line arguments :

-c, --columns=[columns]               Number of thumbnail columns
-a, --anchor=[lrtb]                   Anchor window to screen edge in directions, use rt for right top
-m, --margin=[size]                   Margin from screen edge
-r, --ratio=[ratio]                   Thumbnail to screen ratio, positive integer
-t, --timeout=[millisecs]             Milliseconds to wait for showing up overlays, positive integer

-h, --help                            Show help message and quit.
-v                                    Increase verbosity of messages, defaults to errors and warnings only.
-s,                                   Location of html folder for styling.

Technical Info

SOV was written in Headerless C. It is about using the INCLUDE_LEVEL preprocessor macro available in GCC/CLANG to guard the implementation part of a source file so you can place it together with the header definition in a single file and you include this file freely in other source files. Read more about this in (https://github.com/milgra/headerlessc);

SOV uses Kinetic UI as UI/Widget rendering engine. It is a modern, minimal ui renderer with html/css based stylimg written in headerless C. It offers MacOS like smooth kinetic animations and font-level animatioms, gpu or cpu based alpha blending, wayland connector with window and layer support and deterministic session record and replay for fully automated application testing.

SOV uses the mt_core library for retain counted memory management, retain counted and recursively observable vector and map containers and helper functions.

SOV uses meson and ninja for lightning fast compilation.

Contribution/Development

Feel free to push fixes/improvements.

Please follow these guidelines :

  • use clang format before commiting/after file save
  • use mt_core functions and containers and memory handling
  • make sure that the app is leak free. if you run the dev build it automagically checks for leaks on exit on two levels (mt_memory and clang address sanitizer ) and prints leaks
  • always run all tests before push
  • test detach/attach new output

Creating a debug build :

CC=clang meson build --buildtype=debug -Db_sanitize=address -Db_lundef=false
ninja -C build

Donate

paypal : https://paypal.me/milgra
patreon : https://www.patreon.com/milgra
bitcoin : 37cSZoyQckihNvy939AgwBNCiutUVN82du

License

MIT, see LICENSE.

TODO/BUGS

right/left button seek pgup/pgdn button next/prev video on github page clear makepkg errors fix test and release workflows
auto tests with 2x scaling

More Repositories

1

macmediakeyforwarder

Media Key Forwarder for iTunes and Spotify
Objective-C
1,246
star
2

airpodssoundqualityfixer

AirPods Sound Quality Fixer And Battery Life Enhancer For MacOS
Objective-C
378
star
3

wcp

Script-driven control panel/system menu for wayland-based window managers.
Shell
79
star
4

headerlessc

Headerless C programming with a single preprocessor macro line
51
star
5

cljs-brawl

Mass Brawl Simulator for ClojureScript
Clojure
47
star
6

tutorials

Step by step tutorials on various topics
Emacs Lisp
35
star
7

macaudiokeepalive

Audio Port Keepalive for MacOS
Objective-C
29
star
8

clc

Class-C programming language compiler, documentation, compiler source and example project
C
25
star
9

i3-overview

C
18
star
10

mmfm

MultiMedia File Manager
C
13
star
11

macactivityindicator

MacBook Activity Indicator
Objective-C
12
star
12

cljs-gui

Game UI Renderer for ClojureScript
Clojure
9
star
13

kuid

A modern, minimal ui/widget renderer daemon with html/css based styling written in headerless c
C
9
star
14

fatfingerskeyboard

Fat Fingers Keyboard for iOS - no more typos!
Objective-C
9
star
15

cortex

The psychedelic tunnel-runner
C
8
star
16

vmp

Visual music player
C
7
star
17

cljs-mpd

Mass Point Dynamics Engine for ClojureScript
Clojure
6
star
18

zenmusic

Zen Music for the Zen Multimedia Desktop Environment
C
5
star
19

cortex-archive

The Psychedelic Tunnel-Runner
C
4
star
20

mileniagrafter

The 64 Kbyte flash media server
Java
3
star
21

termite

The ultimate real-time strategy
C
3
star
22

elderhelper

A clojure/compojure/MySQL based SSR ( server-side rendered ) community site
Clojure
2
star
23

termite-archive

The Ultimate Real-Time Strategy
C
2
star
24

kineticui-archive

the next generation ui
C
2
star
25

brawl-archive

Open Source Mass Brawl Simulator
C
1
star
26

steamberrysuite

Raspberry Pi based face and motion detection that I use in my cafe
Python
1
star
27

milgra.com

Actual homepage
JavaScript
1
star
28

milgra.com.2021

My homepage based on datomic + compojure + re-frame + clojure
C
1
star
29

milgra.com.2022

A blog engine written in pure javascript on the client side, clojure on the server site, uses files for post/comment storage and search.
HTML
1
star