From ArchWiki
Revision as of 17:51, 9 November 2009 by Manolo (talk | contribs) (formal, source, links)
Jump to: navigation, search

scrotwm is a small dynamic tiling window manager for Xorg. It tries to stay out of the way so that valuable screen real estate can be used for much more important content. It has sane defaults and does not require one to learn a language to do any configuration. It was written by hackers for hackers and it strives to be small, compact and fast.

It is written in C and configured with a text configuration file. It is not the poster-boy for any minority language, either for programming or configuration.


scrotwm is not yet available in the main repositories.

Two PKGBUILDs are available in AUR: Template:Package AUR, the last snapshot release, and Template:Package AUR, the latest development repository.

The modkey (the main key to issue commands with) is set to Mod4, which is usually the Windows key.

scrotwm can make use of the dmenu package, so install that too:

# pacman -S dmenu

Template:Codeline is also useful:

# pacman -S xscreensaver

See Xdefaults for details of how to set up fonts, colours and other settings for Template:Codeline and Template:Codeline. Run Template:Codeline to select the animation (or blank) and display power management (recommended).


scrotwm first tries to open the user specific file, Template:Filename. If that file is unavailable, it tries to open the global configuration file, Template:Filename. The initial configuration provides a good set of defaults.

Optionally, scrotwm can call Template:Filename (in the user's path), which should output a text status message to stdout for the status bar at the top of the screen.

Starting scrotwm

To start scrotwm via startx or the SLIM login manager, simply append the following to Template:Filename:

exec scrotwm

Starting scrotwm with KDM

For KDM, create Template:Filename like this:

[Desktop Entry]
Exec=/usr/bin/startwm scrotwm
Comment=The scrotwm window manager

Create Template:Filename like this, and set execute permission.


For each user create Template:Filename, and set execute permission.

logger "Starting scrotwm from ~/.xsession_scrotwm."
xrandr --dpi 96
xscreensaver -no-splash &
# and start the window manager
exec scrotwm

Log out and new entry "Scrotwm" will appear in KDM's list of window managers.

This technique can be used to run other window managers from KDM of course. Just create a Template:Filename file and a Template:Filename file for each one.

Statusbar configuration

There are two relevant items in Template:Filename. They are commented out by default.

bar_action              = baraction.sh
bar_delay               = 5

Here is an example Template:Filename. Note it needs these packages, and whatever you need for WiFi:

pacman -S bc lm_sensors

Configure lm_sensors. Place the following Template:Filename in a Template:Filename (or Template:Filename) directory which you have previously added to your $PATH in your ~/.bashrc file.

# baraction.sh script for scrotwm status bar
# This shows CPU temps, fan speed and wifi signal

SLEEP_SEC=5  # set bar_delay = 5 in /etc/scrotwm.conf
#loops forever outputting a line every SLEEP_SEC secs
while :; do
        #note: scrotwm bar_print can not handle UTF-8 characters, such as the degree symbol
        #Core 0:      +67.0°C  (crit = +100.0°C)
        CORE0TEMP=`sensors 2>/dev/null | grep "Core 0" | sed s/[°+]//g | awk {'print $3'}`
        CORE1TEMP=`sensors 2>/dev/null | grep "Core 1" | sed s/[°+]//g | awk {'print $3'}`
           FANSPD=`sensors 2>/dev/null | grep "fan1"                   | awk {'print $2'}`

        WLAN_QULTY=`cat /proc/net/wireless| grep "wlan0"| awk {'print $3'}|sed s/[.]//g`
        BCSCRIPT="scale=0;a=100*$WLAN_QULTY/70;print a"
        WLAN_QPCT=`echo $BCSCRIPT | bc -l`
        WLAN_SIGNL=`cat /proc/net/wireless| grep "wlan0"| awk {'print $4'}|sed s/[.]//g`
        WLAN_NOISE=`cat /proc/net/wireless| grep "wlan0"| awk {'print $5'}|sed s/[.]//g`
        WLAN_POWER=`iwconfig 2>/dev/null| grep "Tx-Power"| awk {'print $4'}|sed s/Tx-Power=//`

        echo -e "         $TEMP_STR        $WLAN_STR"
        sleep $SLEEP_SEC

Here are some other ideas for status bar items : battery status, CPU usage, memory usage, networking, email notification, disk space, mounts.


  • Q: Help, I just logged in and all I see is a blank screen.
  • A: Press Shift + WindowsKey + Return and an xterm will start. Then read the manual (man scrotwm) to see the other default key bindings. Also check your configuration file.

See also

scrotwm's official website
Simple application launcher from the developers of dwm