8000 GitHub - ebeem/gliver: [Mirror] guile scheme wayland window-manager based on river and inspired by emacs and stumpwm · GitHub
[go: up one dir, main page]

Skip to content
ebeemPublic

About

[Mirror] guile scheme wayland window-manager based on river and inspired by emacs and stumpwm

Topics

Resources

Stars

5 stars

Watchers

0 watching

Forks

Latest commit

 

History

340 Commits

Folders and files

Repository files navigation

The Gliver Window Manager

The Gliver Window Manager

Gliver brings the keyboard-driven, manual-tiling workflow of StumpWM to Wayland, using River as the compositor backend and GNU Guile Scheme as the extension language. It attempts to be highly customizable while relying entirely on the keyboard for input.

./.preview/screenshot.jpeg

Status

Gliver is considered almost complete feature-wise, it’s possible to use it as a window manager if you are willing to tolerate some crashes and bugs. Please submit all the issues you face so we can make Gliver more stable.

I have Gliver installed which allows me to select it as the window manager from my display manager, but once I am in, I open a terminal on my Gliver source code and use the below command.

while true; do (killall -q gliver || true) && make run || sleep 3; done

The above will keep running make run on the source so if Gliver crashes, it will simply be executed again. This way you don’t lose your wayland session (Gliver state like how windows are arranged is lost). You can also simply kill the Gliver process if you make changes to the code and want them to take effect immediately.

You can find Gliver’s logs in ${XDG_STATE_HOME}/gliver/gliver.log (~/.local/state/gliver/gliver.log by default). You may also connect the REPL via socket if you use a tool like Emacs Geiser via geiser-connect-local. The socket path is ${XDG_STATE_HOME}/gliver/repl.sock (~/.local/state/gliver/repl.sock by default)

Philosophy

Gliver is heavily inspired by Emacs and StumpWM, tailored specifically for the modern Wayland stack. This project aims to be “The Emacs of Wayland WMs.”

Gliver is:

  • Hackable and can be customized and enhanced in Guile Scheme utilizing a REPL in real-time
  • Configured using the exact same language it is written in (configuration is code, rather than a static configuration file). You can start by simply configuring it and later implement new features.
  • Free of a single enforced layout; you can use manual, alternating, scrolling, or any other layout you write yourself.

Gliver is not:

  • A standalone Wayland compositor; it runs alongside River as a client and delegates all rendering and hardware duties.
  • A drop-in replacement for any other window manager, even though you may find built-in configurations that can replicate most of the features found in other window managers.

Architecture

Gliver runs alongside River as the window manager client.

Because River relies on a non-monolithic architecture, it separates the compositor from the layout manager. River handles all compositor duties (rendering, input devices, GPU, Wayland protocol). Gliver communicates with River via Wayland protocols (such as river-window-management-v1) to determine window placement, focus, borders, keybindings, and all window management policy.

Build & Start Gliver

Prerequisites

  • River (v0.4+)
  • libwayland
  • libxkbcommon
  • librsvg
  • GNU Guile (3.0+)
  • Guile-Cairo
  • Pango
  • GNU Make

Building

Building Gliver from source is straightforward:

make
sudo make install

Configuring

Gliver’s configuration is by default located in ~/.config/gliver/init.scm. To get started, you may want to copy the sample configuration in doc/examples/init.scm into your configuration file. From gliver’s source code, you may execute the below:

mkdir -p ~/.config/gliver && cp -n doc/examples/init.scm ~
C95A
/.config/gliver/init.scm

Starting

Because gliver depends on river, the cleanest way to run them is by passing the -c flag which ensures river initializes first and immediately runs gliver as its init executable.

river -c gliver

Note: make install installs a Wayland session file (gliver.desktop) into $(SESSIONDIR) (by default $(PREFIX)/share/wayland-sessions), you can use your favorite display manager to run gliver and you should see it listed along with other window managers/candidates available on your system.

Running

You can run Gliver directly from source without installing it on your system, which is ideal for rapid development and testing. Ensure that River is running first, then execute:

make && make run

Note: If you are running River in a nested session (which is useful for debugging), you must set the correct WAYLAND_DISPLAY environment variable before starting Gliver:

export WAYLAND_DISPLAY=wayland-1
make && make run

Default Keybindings

Gliver provides a super key driven keybindings via (gliver contrib keybindings gliver) which is the keybindings used in the default configuration file provided. Gliver’s keybindings use Emacs style to describe keybindings.

  • s- Super / Windows key
  • S- Shift key
  • C- Control key
  • M- Meta / Alt key

Basic Operations

Key CombinationCommandDescription
s-Returnterminal-spawnSpawn terminal emulator
s-qwindow-killClose/kill focused window
s-olauncher-runOpen application via launcher launcher
s-fwindow-fullscreen-toggleToggle fullscreen for focused window
s-S-rconfig-reload!Reload configuration
s-S-qgliver-quitQuit Gliver session

Focus Navigation

Key CombinationCommandDescription
s-h, s-Leftcontainer-focus-leftFocus container to the left
s-j, s-Downcontainer-focus-downFocus container below
s-k, s-Upcontainer-focus-upFocus container above
s-l, s-Rightcontainer-focus-rightFocus container to the right
s-n, s-Tabwindow-focus-nextFocus next window in container stack
s-p, s-S-Tabwindow-focus-prevFocus previous window in container stack
s-C-n, s-C-Tabwindow-swap-nextSwap current window with next window in container
s-C-p, s-C-S-Tabwindow-swap-prevSwap current window with previous window in container

Moving Windows Between Containers

Key CombinationCommandDescription
s-M-h, s-M-Leftwindow-container-move-leftMove focused window to container on left
s-M-j, s-M-Downwindow-container-move-downMove focused window to container below
s-M-k, s-M-Upwindow-container-move-upMove focused window to container above
s-M-l, s-M-Rightwindow-container-move-rightMove focused window to container on right

Workspace Focus Navigation

Key CombinationCommandDescription
s-C-h, s-C-Leftworkspace-focus-leftFocus workspace to the left
s-C-j, s-C-Downworkspace-focus-downFocus workspace below
s-C-k, s-C-Upworkspace-focus-upFocus workspace above
s-C-l, s-C-Rightworkspace-focus-rightFocus workspace to the right

Moving Windows Across Workspaces

Key CombinationCommandDescription
s-C-M-h, s-C-M-Leftwindow-workspace-move-leftMove window to workspace on the left
s-C-M-j, s-C-M-Downwindow-workspace-move-downMove window to workspace below
s-C-M-k, s-C-M-Upwindow-workspace-move-upMove window to workspace above
s-C-M-l, s-C-M-Rightwindow-workspace-move-rightMove window to workspace on the right

Container Layout

Key CombinationCommandDescription
s-scontainer-split-horizontalSplit container horizontally
s-vcontainer-split-verticalSplit container vertically
s-dcontainer-destroyDestroy active container slot
s-Dcontainer-destroy-othersDestroy all other containers in workspace

Media & Hardware Controls

Key CombinationCommandDescription
XF86AudioMutemedia-audio-muteToggle audio mute
XF86AudioLowerVolumemedia-audio-volume-decreaseLower audio volume
XF86AudioRaiseVolumemedia-audio-volume-increaseRaise audio volume
XF86AudioMicMutemedia-mic-muteToggle microphone mute
XF86MonBrightnessDownmedia-brightness-decreaseDecrease screen brightness
XF86MonBrightnessUpmedia-brightness-increaseIncrease screen brightness
Printmedia-screenshotTake screenshot

Contributing

Pull requests are always welcome! Here are some guidelines to ensure your contribution gets merged:

  • Document your work: Preserve comments and docstrings explaining what the code does, and update them if your patch changes.
  • Target the right directory: Most new features, modules, and packages should go into the contrib directory.
  • Avoid change in core: Contributions to the core directory will go through a lengthy review process, I prefer not to break existing APIs.
  • Avoid AI-generated code: To ensure strict compliance with Codeberg’s Terms of Use, please refrain from submitting code written by Large Language Models (LLMs).

Wishlist

Here’s a wishlist of features for the Gliver project:

  • Implementing animations driven by Guile timers over the set_dimensions Wayland request.
  • Implementing automated testing (most likely needs simulating river).
  • Add guard checks whenever needed, some clients will violate the defined protocol and send null-pointers or invalid parameters which always needs to be checked to avoid crashes.

Known Issues

Some clients will propose their own sizes and not respect the tiling system.

This was observed so far in vlc where it will resize itself based on video resolution. While it’s possible to disable this behavior from vlc itself, I am looking for a solution that will work on all clients. NOTE: this issue doesn’t seem to be easy to resolve, clients in this case violate the wayland protocol and it doesn’t seem to me that there is a way to stop them from doing so.

Some clients include their own decorations

This was observered so far in Emacs and librewolf where they will include a titlebar, I believe all gtk applications will do so. While it’s possible to have a workaround from gtk css, I again want to have a solution that will work on other clients as well. NOTE: this issue doesn’t seem to be easy to resolve, clients in this case violate the wayland protocol and it doesn’t seem to me that there is a way to stop them from doing so.

GUI Components & Daemons

NameGliver ComponentGood Alternatives
output configurationcore/output.scmkanashi
input configurationcore/keybinding.scmchannel, kwim
topbar / statusbargleui/statusbar.scmwaybar, swaybar
screen lockerTODOswaylock, waylock
idle managementTODOswayidle
screen capturenot plannedflameshot, grim
application launchergleui/launcher.scmfuzzel, rofi
notification daemongleui/notifications.scmmako, dunst
wallpaper managerriver/wallpaper-manager.scmswaybg, awww

Help

As in Emacs and StumpWM, you can always get documentation natively through Gliver:

KeyHelp
s-SPC h vVariables
s-SPC h fFunctions
s-SPC h kKey sequences

You can also drop into the Live REPL at any time to inspect state.

About

[Mirror] guile scheme wayland window-manager based on river and inspired by emacs and stumpwm

Topics

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0