Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A tiling window manager for Adventurers

License

NotificationsYou must be signed in to change notification settings

leftwm/leftwm

Repository files navigation

A window manager for adventurers

build statuswikiDocumentation
discordMatrix Chat: AnnouncementsMatrix Chat: GeneralMatrix Chat: Support

Screenshot of LeftWM in action

IMPORTANT NOTE: LeftWM has changed the config language fromTOML toRON with the0.4.0 release. Please useleftwm-check --migrate-toml-to-ron to migrate your config and visit thewiki for more info.

Table of contents

Why go left

LeftWM is a tiling window manager written inRust that aims to be stable and performant. LeftWM isdesigned to do one thing and to do that one thing well:be a window manager.LeftWM follows the following mantra:

LeftWM is not a compositor.LeftWM is not a lock screen.LeftWM is not a bar. But, there are lots of good bars out there. With themes, picking one is assimple as setting a symlink.

Because you probably want more than just a black screen, LeftWM is built around the concept ofthemes. With themes, you can choose between different bars, compositors, backgrounds, colors, docks,and whatever else makes you happy.

LeftWM was built from the very beginning to support multiple screens and ultrawide monitors. Thedefault keybindings support ultrawide monitors and multiple screens.

One of the core concepts/features of LeftWM is theming

With LeftWM, there are two types of configuration files:

  • LeftWM Configuration files: LeftWM configurations are specific to you and don’t change fordifferent themes. These are settings like keybindings, workspace locations, and names ofdesktops/tags. These settings can be found in$XDG_CONFIG_HOME/leftwm/config.ron.

  • Theme Configuration files: The appearance of your desktop is different. It’s fun to try newlooks and feels. It’s fun to tweak and customize the appearance (AKA:ricing). It’s fun to shareso others can experience your awesome desktop! LeftWM is built around this concept. By pulling allthese settings out into themes, you can now easily tweak, switch, and share your experiences. Thisconfiguration is spread betweentheme.ron and related files contained within a theme's folder.

Note: some example config and themes can be found in the share dir, e.g./usr/share/leftwm oh Arch based disros.

Dependencies

While LeftWM has very few dependencies, this isn't always the case for themes.Themes typically require the following to be installed. However, this is up to theauthor of the theme and could be different.

List of LeftWM dependencies:

  • xorg (runtime, build): specifically libx11, xrandr, xorg-server, libxinerama
  • sh (runtime): any posix-compliant shell for starting up and down files
  • rust (build): >= 1.74.0
  • bash (optional): Most of the themes available use bash, though the scripts maybe converted to any posix-compliant shell

List of common dependencies for themes:

Dependency
(git)
Ubuntu 20.4.1
sudo apt install {}
Arch
sudo pacman -S {}
Fedora 33
sudo dnf install {}
PKGS
fehfehfehfehfeh
comptoncomptonpicomcomptoncompton
picommanual **picompicompicom
polybarmanual **polybarpolybarpolybar
xmobarxmobarxmobarxmobarxmobar
lemonbarlemonbarparu -S lemonbar*manual **lemonbar
conkyconkyconkyconkyconky
dmenudmenudmenudmenudmenu

* You can use whichever AUR wrapper you like. Seeparu andyay.** See the git page (link in first column) for how to install these manually

Installation (with package manager)

Packaging status

Gentoo (GURU)

sudo layman -a guru&& sudo emerge --syncsudo emerge --ask --verbose x11-wm/leftwm

Archlinux (AUR)

paru -S leftwm

paru is an AUR helper likeyay, but written inRust.

Fedora (copr)

sudo dnf coprenable th3-s4lm0n/leftwm -y&& sudo dnf install leftwm
pkgin install leftwm

or, if you prefer to build it from source

cd /usr/pkgsrc/wm/leftwmmake install

Void (XBPS)

sudo xbps-install -S leftwm

Cargo (crates.io)

cargo install leftwm

If you install LeftWM with crates.io, you will need to link to thexsession desktop file if you wantto be able to login to LeftWM from a display manager (GDM, SSDM, LightDM, etc.):

sudo cp PATH_TO_LEFTWM/leftwm.desktop /usr/share/xsessions

Also seethe build options for more feature options, especially if you don't usesystemd or want to use your own hotkey daemon likesxhkd.

OpenBSD (OpenBSD)

At the moment LeftWM is not packaged with OpenBSD package manager, but it could be installed via Cargo.

cargo install leftwm --no-default-features --features lefthk

leftwm-config not yet ported to OpenBSD, as it requires a nightly Rust compiler to build.The default config is generated by LeftWM when it is first started.

To start LeftWM withxenodm add the following to your~/.xsession. Make sure to remove or comment-out theexec to the previous WM you had there.

exec dbus-launch~/.cargo/bin/leftwm>>~/.cache/leftwm.log2>&1

Manual Installation (no package manager)

Using a graphical login such as LightDM, GDM, LXDM, and others

  1. Dependencies: Rust, Cargo

  2. Clone the repository and cd into the directory

    git clone https://github.com/leftwm/leftwm.gitcd leftwm
  3. Build leftwm

    cargo build --profile optimized

    For more options see thebuild options section.

  4. Copy leftwm executables to the /usr/bin folder

    sudo install -s -Dm755 ./target/optimized/leftwm ./target/optimized/leftwm-worker ./target/optimized/lefthk-worker ./target/optimized/leftwm-state ./target/optimized/leftwm-check ./target/optimized/leftwm-command -t /usr/bin
  5. Copy leftwm.desktop to xsessions folder

    sudo cp leftwm.desktop /usr/share/xsessions/

You should now see LeftWM in your list of available window managers. At this point, expect only asimple black screen on login. For a more customized look, install a theme.

Optional Development Installation

If your goal is to continuously build leftwm and keep up to date with the latest releases, you mayprefer to symlink the leftwm executables instead of copying them. If you choose to install thisway, make sure you do not move the build directory as it will break your installation.

Note that if you want to build leftwm with another build profile, you will have to change the--profile <profile-name> option and the target folder totarget/<profile-name>.Currently available aredev,release andoptimized.

  1. Dependencies: Rust, Cargo

  2. Clone the repository and cd into the directory

    git clone https://github.com/leftwm/leftwm.gitcd leftwm
  3. Build leftwm

    # With systemd logging (view with 'journalctl -f -t leftwm-worker')cargo build --profile optimized

    For more options seebuild options below.

  4. Create the symlinks

    sudo ln -s"$(pwd)"/target/optimized/leftwm /usr/bin/leftwmsudo ln -s"$(pwd)"/target/optimized/leftwm-worker /usr/bin/leftwm-workersudo ln -s"$(pwd)"/target/optimized/lefthk-worker /usr/bin/lefthk-workersudo ln -s"$(pwd)"/target/optimized/leftwm-state /usr/bin/leftwm-statesudo ln -s"$(pwd)"/target/optimized/leftwm-check /usr/bin/leftwm-checksudo ln -s"$(pwd)"/target/optimized/leftwm-command /usr/bin/leftwm-command
  5. Copy leftwm.desktop to xsessions folder

    sudo cp leftwm.desktop /usr/share/xsessions/

You should now see LeftWM in your list of available window managers. At this point, expect only asimple black screen on login. For a more customized look, install a theme.

Rebuilding the development installation

  1. Now if you want to get the newest version of leftwm run this command from your build directory:

    git pull origin main
  2. Build leftwm

    # With systemd logging (view with 'journalctl -f -t leftwm-worker')cargo build --profile optimized
  3. And press the following keybind to reload leftwm

    Mod + Shift + R

Optional Build Features

SinceLeftWM is targeting to be more and more modular, there are a few features that can be selected at compile time:

Usecargo with the added flags--no-default-features --features= and then commaseparated a selection from the following features:

featureinfodefault
lefthkbuilt-in hotkey daemon, if you build with out make sure you bring your own (e.g.sxhkd) to manage any keybinds, be sure you install thelefthk-worker binary if you build with this option
journald-loglogging tojournald, depends onsystemd
sys-loguse standard system logging
file-loglog to/tmp/leftwm/<log-file-by-datetime-of-launch>
xlib (*)legacy backend linking tolibX11
x11rb (*)rust based backend usingx11rb

⚠️ You need to selectat least one backend feature (*) for leftwm to build⚠️

Example:

# With `lefthk` and logging to `sys-log` (`x11rb` backend)cargo build --profile optimized --no-default-features --features=x11rb,lefthk,sys-log# Without `lefthk` and logging to file (`xlib` backend)cargo build --profile optimized --no-default-features --features=xlib,file-log

There are also multiple levels of optimization. These are specified by the cargo profiles, available aredev,release andoptimized. The dev and release profiles are default profiles used by cargo, whereas the optimized profile is recomended for production builds.

Example:

# With the dev profilecargo build --profile dev# With the release profilecargo build --profile release

Using the Makefile

For conveniece we also have a Makefile with the following rules:

make ...info
allimpliesbuild andtest
testruns same tests as CI on github
test-fulldeprecated, do not use
test-full-nixsame astest-full but additionally compiles the nix package, resulting in a full representation of ci checks
buildbuilds with cargo profileoptimized by default; read build output on how to change the profile.
cleanclean all buildfiles
installinstall by copying binaries to/usr/bin, also placesleftwm.desktop file to/usr/share/xsession and cleans build files
install-linkedinstalls by symlinking, copiesleftwm.desktop, no clean
uninstallremovesleftwm-* files from/usr/bin andleftwm.desktop file

Note that forbuild,install andinstall-linked, you can specify the build profile to use by adding theprofile=<profile-name> argument. Currently available aredev,release andrelease-optimized.

Starting with startx or a login such as slim

Make sure this is at the end of your.xinitrc file:

# .xinitrcexec dbus-launch leftwm

On some distros like Archlinux, the environment variables are being setup by sourcing/etc/X11/xinit/xinitrc.d, as described inthe Arch docs, please make sure you copy the default xinitrc like this:

cp /etc/X11/xinit/xinitrc~/.xinitrc

Note: In this case it is not necessary to start leftwm throughdbus-launch and might even result in some cases in services likegnome-keyring to fail. In such an occasion just use:

# .xinitrcexec leftwm

Theming

If you want to see more than a black screen when you login, select a theme:

leftwm-theme updateleftwm-theme install NAME_OF_THEME_YOU_LIKEleftwm-theme apply NAME_OF_THEME_YOU_LIKE

To set up your own custom theme, you will need to create a directory containing the theme files and then symlink it to$XDG_CONFIG_HOME/leftwm/themes/current.

A theme directory contains at least 2 files:

  • up: a script which is loaded with the theme.
  • down: a script which is called when the theme is unloaded.

These files need to be made executable. Many theme directories also contain:

  • theme.ron: which contains additional configuration options specific to the theme.
  • polybar.ini: a configuration file for thepolybar application.You need to have polybar installed!
  • picom.conf: a configuration file for thepicom compositor.You need to have picom installed!

See thetheme guide for examples and further information. There is also acommunity repository for sharing themes.


Configuring

You can configure key bindings, default mod key and many other options:

leftwm-config -n# Generate new configleftwm-config# Open configuration file in $EDITORleftwm-config -t# Edit configuration via TUI (Beta)

Manually editing the configuration file

$XDG_CONFIG_HOME/leftwm/config.ron

Note: The configuration file is automatically generated when leftwm or leftwm-check is run for the first time.


Default keys

KeybindingDescription
Mod + (1-9)Switch to a desktop/tag
Mod + Shift + (1-9)Move the focused window to desktop/tag
Mod + WSwitch the desktops for each screen. Desktops [1][2] changes to [2][1]
Mod + Shift + WMove window to the other desktop
Mod + (⬆️⬇️)Focus on the different windows in the current workspace
Mod + Shift + (⬆️⬇️)Move the different windows in the current workspace
Mod + EnterMove selected window to the top of the stack in the current workspace
Mod + Ctrl + (⬆️⬇️)Switch between different layouts
Mod + Shift + (⬅➡)Switch between different workspaces
Mod + Shift + EnterOpen a terminal
Mod + Ctrl + LLock the screen
Mod + Shift + XExit LeftWM
Mod + Shift + QClose the current window
Mod + Shift + RReload LeftWM and its config
Mod + pUse dmenu to start application

Note: Although we encourage you to useAlacritty,LeftWM will set your default terminal to the first terminal it finds in this list (in the orderpresented):

  1. Alacritty
  2. Termite
  3. Kitty
  4. URXVT
  5. RXVT
  6. ST
  7. ROXTerm
  8. Eterm
  9. XTerm
  10. Terminator
  11. Terminology
  12. Gnome Terminal
  13. XFCE4 Terminal
  14. Konsole
  15. UXTerm
  16. Guake

Floating Windows

You can optionally switch between tiling or floating mode for any window.

KeybindingDescription
Mod + MouseDragSwitch a tiled window to floating mode
Mod + RightMouseDragResize a window
Drag window onto a tileSwitch a floating window to tiling mode
Mod + Shift + (1-9)Switch a floating window to tiling mode

Workspaces

Workspaces are how you view tags (desktops). A workspace is an area on a screen or most likely the whole screen. in these areas you can view a given tag.

Default:workspaces: [] (one workspace per screen)

Workspaces are only applied if the specified output is the name of a connected screen. The output is also used as identifier of the workspace.

You can get the output names by running xrandr in your terminal.

Example (two workspaces on a single ultrawide):

workspaces:[( output:"HDMI-1", y:0, x:0, height:1440, width:1720),( output:"HDMI-1", y:0, x:1720, height:1440, width:1720),],

Tags / Desktops

The default tags are 1-9. They can be renamed in the config file by setting thelist of tags.

Here is an example config changing the list of available tags. NOTE: tag navigation (Mod + #)is based on the index of the tag in the list (starting with index 1).

tags:["Web","Code","Shell","Music","Connect"],

Layouts

Leftwm supports user definable layouts. The relevant entries in the configuration file are thelayouts andlayout_definitions lists.

Only the layouts whose name appears inlayouts will be accessible when switching layouts through the commandsNextLayout,PreviousLayout andSetLayout. Each layout appearing in thelayouts list must have a corresponding definition inlayout_definitions.

Example:

layouts:["Monocle","MainAndDeck","MainAndVertStack",],layout_definitions:[(name:"Monocle", flip:None, rotate:North, reserve:None,columns:(flip:None, rotate:North, main:None,stack:(flip:None, rotate:North, split:None), second_stack:None)),(name:"MainAndDeck", flip:None, rotate:North, reserve:None,columns:(flip:None, rotate:North,main:(count:1, size:0.5, flip:None, rotate:North, split:None),stack:(flip:None, rotate:North, split:None), second_stack:None)),(name:"MainAndVertStack", flip:None, rotate:North, reserve:None,columns:(flip:None, rotate:North,main:(count:1, size:0.5, flip:None, rotate:North, split:Vertical),stack:(flip:None, rotate:North, split:Horizontal), second_stack:None)),]

More detailed configuration information can be found in the Wiki.

LeftWM isEWMH compliant

The default layouts areall of the kinds defined here.

Troubleshooting

IssueDescriptionSolution
LeftWM not listed by login managerYou likely need to add the xsessions file to the right folder.Seeinstallation
Noconfig.ron file existsLeftWM does not always ship with aconfig.ron. You will need to execute LeftWM at least once for one to be generated.Try the following:leftwm-worker
config.ron is not being parsedLeftWM ships with a binary called leftwm-check. It might not be installed by the AUR.Try the following:leftwm-check
Keybinding doesn't workIt's likely you need to specify a value or have a typo.See Wiki

Support

LeftWM now has aDiscord channel for faster help.


[8]ページ先頭

©2009-2025 Movatter.jp