Bspwm
bspwm is [[Article description::a lightweight, tiling, minimalist window manager that is written in C and represents its windows as leaves on a binary tree.]] Its installed size is less than 600 KB (even with the examples
USE flag enabled). It only responds to X events and messages it receives on a dedicated socket from a program included in its package, bspc.
Installation
USE flags
USE flags for x11-wm/bspwm Tiling window manager based on binary space partitioning
examples
|
Install examples, usually source code |
Emerge
To install bspwm using Portage merely issue the command:
root #
emerge --ask x11-wm/bspwm
sxhkd is used for keybindings and pointer bindings so one may wish to install it too with:
root #
emerge --ask x11-misc/sxhkd
Configuration
If you installed with examples
local USE flag enabled, you have to configure bspwm properly.
First create the necessary directories that will hold your configurations. Because bspwm doesn't handle keyboard or pointer inputs, it's using x11-misc/sxhkd (Simple X hotkey daemon) to do so, therefore we'll need a config file for that as well because that's where all your key bindings will reside.
user $
mkdir -vp ~/.config/bspwm ~/.config/sxhkd
Now copy the sample configuration files from /usr/share/doc/bspwm-0.9.9/examples/
and, if required, extract them:
user $
cp -v /usr/share/doc/bspwm-0.9.9/examples/bspwmrc ~/.config/bspwm/
user $
cp -v /usr/share/doc/bspwm-0.9.9/examples/sxhkdrc ~/.config/sxhkd/
The
bspwmrc
configuration file needs to be executable. Therefore, if it's not, you can
chmod +x ~/.config/bspwm/bspwmrc
.Autostart programs
If you have certain programs that want to start after logging in on the workstation (i.e. net-misc/dropbox, media-gfx/feh) you can achieve that by simply adding them in the bspwm config file
~/.config/bspwm/bspwmrc
bspwm configuration file<syntaxhighlight lang="bash"># autostart programs dropbox feh --bg-scale ~/.config/my_wallpaper.png ${HOME}/.config/polybar/launch.sh</syntaxhighlight>
Hide/Show windows
Some programs also have tray icons and one may want to mimic the Minimize behavior (hide in the bspwm world), you can achieve that by setting a keyboard shortcut. Note that when restoring them, they will spawn in the same Monitor that they were hidden, just so you don't go look for them in the other Desktops randomly...
~/.config/sxhkd/sxhkdrc
sxhkd configuration file<pre> # hide window super + v bspc node -g hidden # unhide window super + shift + v bspc node {,$(bspc query -N -n .hidden | tail -n1)} -g hidden=off </pre>
Additional software
dmenu
In order to launch whatever programs you desire
USE flags for x11-misc/dmenu a generic, highly customizable, and efficient menu for the X Window System
savedconfig
|
Use this to restore your config from /etc/portage/savedconfig ${CATEGORY}/${PN}. Make sure your USE flags allow for appropriate dependencies |
xinerama
|
Add support for querying multi-monitor screen geometry through the Xinerama API |
To assign a keyboard shortcut for launching dmenu
:
~/.config/sxhkd/sxhkdrc
sxhkd configuration file<syntaxhighlight lang="bash"># program launcher super + @space dmenu_run</syntaxhighlight>
Terminal emulators
st aka suckless/simple terminal
If lightweight is how you roll, this might be of use
USE flags for x11-terms/st simple terminal implementation for X
savedconfig
|
Use this to restore your config from /etc/portage/savedconfig ${CATEGORY}/${PN}. Make sure your USE flags allow for appropriate dependencies |
To install it, just issue the command:
root #
emerge --ask x11-terms/st
To enable a keyboard shortcut for launching the terminal
~/.config/sxhkd/sxhkdrc
sxhkd configuration file<syntaxhighlight lang="bash"># terminal emulator super + Return st</syntaxhighlight>
rxvt-unicode aka urxvt
This is another alternative, although it lacks full unicode support and you might have some issues with Powerline Fonts.
USE flags for x11-terms/rxvt-unicode rxvt clone with xft and unicode support
256-color
|
Enable 256 color support |
blink
|
Enable blinking text |
fading-colors
|
Enable colors fading when off focus |
font-styles
|
Enable support for bold and italic fonts |
gdk-pixbuf
|
Enable transparency support using x11-libs/gdk-pixbuf |
iso14755
|
Enable ISO-14755 support |
mousewheel
|
Enable scrolling via mouse wheel or buttons 4 and 5 |
perl
|
Enable perl script support. You can still disable this at runtime with -pe "" |
startup-notification
|
Enable application startup event feedback mechanism |
unicode3
|
Use 21 instead of 16 bits to represent unicode characters |
utmp
|
Enable utmp support |
wtmp
|
Enable wtmp support |
xft
|
Build with support for XFT font renderer (x11-libs/libXft) |
You can install it issuing the command:
root #
emerge --ask x11-terms/rxvt-unicode
i3lock
Locking your screen is always recommended in order to avoid unauthorized access to your Workstation
USE flags for x11-misc/i3lock Simple screen locker
You can install it by issuing the command:
root #
emerge --ask x11-misc/i3lock
In order to assign a keyboard shortcut for locking your screen, you should update your configuration file
~/.config/sxhkd/sxhkdrc
sxhkd configuration file<syntaxhighlight lang="bash"># lock the screen with dark background super + q i3lock -c 000000</syntaxhighlight>
File managers
ranger
ranger is a console file manager with VI key bindings. It provides a minimalistic and nice curses interface with a view on the directory hierarchy. It ships with rifle
, a file launcher that is good at automatically finding out which program to use for what file type.
You can install ranger via
root #
emerge --ask app-misc/ranger
If you want to tune ranger with your own settings:
Start ranger and exit so that it creates the directory structure for its configuration files.
user $
ranger
user $
Q
Now copy the configuration files:
user $
ranger --copy-config=all
creating: /home/user/.config/ranger/apps.py creating: /home/user/.config/ranger/commands.py creating: /home/user/.config/ranger/rc.conf creating: /home/user/.config/ranger/options.py creating: /home/user/.config/ranger/scope.sh
See also
- JWM — an extremely lightweight window manager for the X window system.
- XFCE — a lightweight desktop environment for Unix-like operating systems.
External resources
- ranger file manager official wiki
- Installing and Using Ranger, a Terminal File Manager by Justin Ellingwood on DigitalOcean tutorials
- hide/show bspwm windows on Reddit