You are not logged in.

#1 2015-11-05 08:24:02

Nili
Member
From: $HOME/♫♪
Registered: 2015-09-30
Posts: 1,020
Website

spectrwm (my config)

I'm sharing my spectrwm config with any one that has interest to watch/use it. Preview on screenshots thread

.xinitrc

# Launch spectrwm...
exec spectrwm

.spectrwm.conf

## window decoration
color_focus		= rgb:91/62/55
color_unfocus		= rgb:ad/86/50

# bar settings
bar_enabled		= 1
bar_border_width	= 0
bar_border[1]		= rgb:61/84/85
bar_border_unfocus[1]	= rgb:61/84/85
bar_color[1]		= rgb:ad/86/50
bar_font_color[1]	= rgb:32/2a/2c
bar_action		= conky
border_width		= 1
bar_format = +N/+I +<+P +<+<+< +A

clock_format            = %a %d, %k:%M
bar_font = Droid Sans:size=10

# shortcuts
program[firefox]=firefox
bind[firefox]		= Shift+I

program[rxvt]=rxvt
bind[rxvt]		= Shift+U

program[spacefm]=spacefm
bind[spacefm]		= Shift+S

program[shot]=shot
bind[shot]		= Print

program[soff]=soff
bind[soff]		= Shift+Print

# open dmenu config
program[menu]		= ~/.config/dmenu/dmenu-bind.sh

# open mpv video anywhere out of screen
#quirk[mpv:x11]         = FLOAT + FULLSCREEN + FOCUSPREV + ANYWHERE
quirk[XClock:xclock]	= FLOAT + FULLSCREEN + FOCUSPREV
quirk[XCalc:xcalc]	= FLOAT + FULLSCREEN + FOCUSPREV

# spectrwm startup autorun
autorun                 = ws[1]:rxvt -e ranger /home/nili/videos
autorun                 = ws[1]:rxvt -e ranger /home/nili/pictures
autorun                 = ws[1]:rxvt -e ranger /home/nili/music
#autorun                = ws[2]:spacefm

# Customize workspace layout at start
layout		        = ws[1]:0:1:0:0:horizontal
layout		        = ws[2]:0:0:0:0:vertical

# Set workspace name at start
name			= ws[1]:console [rxvt-unicode]
name		        = ws[2]:FM [file manager]
name			= ws[2]:browser [iceweasel]

.conkyrc

Note: .conkyrc | .spectrwm.conf | .xinitrc are placed on /home

shot placed at /usr/bin once i press Print Screen screenshot is taken in 3 sec. FEH app used to auto preview once a shot is made.

#!/bin/bash

echo -e '\e[1;31m' 
echo "        ┌───────────────────────────────────┐"
echo "        │   Taking Screenshot. Say Cheese!  │ "
echo "        └───────────────────────────────────┘"
echo "       ╱"
echo "   ▀▄   ▄▀"
echo -e "  ▄█▀███▀█▄ "
echo -e " █▀███████▀█"
echo -e " ▀ ▀▄▄ ▄▄▀ ▀"
echo -e '\e[1;37m'

scrot -cd 3 '%Y-%m-%d--%s_$wx$h_scrot.png' -e 'mv $f ~/pictures/scrot/ & feh -F ~/pictures/scrot/$f'

This is the whole spectrwm code that i use. You can check this man pages for more configs.

Edit: If this config goes better on "Scripts, Tutorials & Tips" please move it. Thank you

Nili

Last edited by Nili (2015-11-05 08:36:44)


Devuan // CWM
Fedora // GNOME

Offline

#2 2015-11-05 09:44:07

nereet
Member
Registered: 2015-10-01
Posts: 82

Re: spectrwm (my config)

Thanks for sharing,I just installed spectrwm but it's the first time I use it so your config will be helpful.

Last edited by nereet (2015-11-05 09:44:49)

Offline

#3 2015-11-05 10:07:17

Nili
Member
From: $HOME/♫♪
Registered: 2015-09-30
Posts: 1,020
Website

Re: spectrwm (my config)

It's easy tiling wm, just replace applications and names

you may ignore or remove ["soff part"] is my personal config

start with those

Shift + U for urxvt (replace with your terminal)
Shift + I for Iceweasel (replace with your browser)
Shift + S for spacefm (replace with your file manager)

Alt+Q refresh WM
ALT+SHIFT+Q restart WM only

Those are important first smile then make it others step by step.


Devuan // CWM
Fedora // GNOME

Offline

#4 2015-11-06 00:25:45

Snap
Member
Registered: 2015-10-02
Posts: 465

Re: spectrwm (my config)

Thanks, Nili. I will try it soon. First I want to dig cwm a bit more.

Offline

#5 2015-11-06 13:07:44

shot-in-the-head
Member
Registered: 2015-10-28
Posts: 61

Re: spectrwm (my config)

I like the simplicity of this wm but would not switch to it unless I found an example of a bar that has clickable workspaces

Offline

#6 2015-11-06 13:59:55

Nili
Member
From: $HOME/♫♪
Registered: 2015-09-30
Posts: 1,020
Website

Re: spectrwm (my config)

You're welcome Snap

shot-in-the-head, you're right... at first me too had difficult to navigate workspaces with ALT+1/ALT+2 etc... 3/4/5/6 therefore made such a request spectrwm mouse clickable to switch workspaces interesting solution is done by dzen2 Thayer Williams has made a preliminary solution for Xmonad WM, It can be implemented even in spectrwm with a different config.

I personally made other alternative solution "changing shortcuts", since i don't want to use dzen2 in spectrwm i did

#ws_prev           Switch to previous workspace with a window in it.

program[ws_prev]=ws_prev
bind[ws_prev] = Insert

ALT+Q (to apply or refresh)

Every time i press button "Insert" on the keyboard i switch the workspaces going back to previous ones. "Insert" keybind can be changed to whatever we like. Yes, is still keyboard usage also mouse can be used to change workspaces but conflict with the right/left/middle click if we config the mouse usage, so i only eleminated two keyboard buttons ALT+1 to only Insert.

Note: everyone can change "Insert" to only ALT or CTRL or Backspace whatever you like.

Nili

Last edited by Nili (2015-11-06 14:20:27)


Devuan // CWM
Fedora // GNOME

Offline

#7 2015-11-08 02:39:25

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 1,498

Re: spectrwm (my config)


You must unlearn what you have learned.
    -- yoda

Online

#8 2016-08-16 07:48:26

Nili
Member
From: $HOME/♫♪
Registered: 2015-09-30
Posts: 1,020
Website

Re: spectrwm (my config)

Back with a little update - spectrwm alone with conky-cli

Preview

inside:
cli
rxvt-unicode
ranger
alsamixer
mpv

gui
pale moon
spacefm
deadbeef

panel
conky-cli
suckless-tools/dmenu

Font panel is UnDinaru from fonts-unfonts-core

.spectrwm.conf

# Window decoration color
color_focus		 = rgb:55/47/57
color_unfocus		 = rgb:39/30/3B

# Bar settings
bar_enabled		 = 1
bar_at_bottom            = 0
bar_border_width	 = 0
border_width		 = 2
bar_border[1]            = rgb:80/80/80
bar_border_unfocus[1]    = rgb:2B/25/2D
bar_color[1]		 = rgb:FF/FF/FF
bar_font_color[1]	 = rgb:78/82/BF
bar_action		 = conky
bar_justify              = left
bar_format		 = \#+I+<+<+D+<+<+<+<+<+<%A %d, %r+<+<+A
bar_font                 = UnDinaru-11

# Other tweaks
region_padding	         = 10
tile_gap	         = 10
urgent_enabled           = 1
dialog_ratio             = 0.6

# Clock settings
clock_enabled            = 0

# shortcuts
# Browser Pale Moon
program[/home/nili/.config/palemoon/palemoon]      = /home/nili/.config/palemoon/palemoon
bind[/home/nili/.config/palemoon/palemoon]         = Shift+I
# Audio player (DeaDBeeF)
program[/home/nili/.dbeef/deadbeef]      = /home/nili/.dbeef/deadbeef
bind[/home/nili/.dbeef/deadbeef]         = Shift+D
# Console URxvt
program[urxvt]           = urxvt   
bind[urxvt]		 = Shift+U
# File Manager (SpaceFM)
program[spacefm]         = spacefm  
bind[spacefm]		 = Shift+S
# Captured screen
program[pscreen]         = pscreen
bind[pscreen]		 = Print
#Shutdown keybind
program[soff]            = soff
bind[soff]	         = Shift+Print
# Preview window <->
program[ws_prev]         = ws_prev
bind[ws_prev]            = Insert
# Alsa Mixer Volume Up
program[master+]         = amixer set Master 1+
bind[master+]            = Shift+Up
# Alsa Mixer Volume Down
program[master-]         = amixer set Master 1-
bind[master-]            = Shift+Down
# URxvt-Ranger
program[urxvt -e ranger /media/]          = urxvt -e ranger /media/
bind[urxvt -e ranger /media/]		  = Shift+r
# URxvt-Top
program[urxvt -e top -u nili]             = urxvt -e top -u nili 
bind[urxvt -e top -u nili]		  = Shift+t
# URxvt-Alsamixer
program[urxvt -e alsamixer -g]            = urxvt -e alsamixer -g
bind[urxvt -e alsamixer -g]		  = Shift+a
# URxvt-Calendar
program[urxvt -geometry 56x10-8+855 -e bash -c "ncal -3 && sleep 6"]	         = urxvt -geometry 56x10-8+855 -e bash -c "ncal -3 && sleep 6"
bind[urxvt -geometry 56x10-8+855 -e bash -c "ncal -3 && sleep 6"]		 = Shift+c

# dmenu config
program[menu]            = dmenu_run -b -p '>>>' -fn '7x14' -nb rgb:10/0E/11 -nf rgb:FF/FF/FF -sb rgb:3D/59/AB -sf rgb:FF/FF/FF

# open apps anywhere out of screen
quirk[mpv:x11]           = FLOAT + FULLSCREEN + FOCUSPREV + ANYWHERE
quirk[XClock:xclock] 	 = FLOAT + FULLSCREEN + FOCUSPREV
quirk[URxvt:urxvt] 	 = FLOAT + FULLSCREEN + FOCUSPREV
quirk[XCalc:xcalc]	 = FLOAT + FULLSCREEN + FOCUSPREV

# Customize workspace layout at start - horizontal/vertical
layout		         = ws[1]:0:0:0:0:horizontal
layout		         = ws[2]:0:1:0:0:horizontal
layout		         = ws[3]:0:0:0:0:horizontal
layout		         = ws[4]:0:1:0:0:horizontal
layout		         = ws[5]:0:0:0:0:horizontal
layout		         = ws[6]:0:1:0:0:vertical

# Workspace Settings
name                     = ws[1]:001.Term
name                     = ws[2]:002.File
name                     = ws[3]:003.Web

# Autorun once spectrwm start
#autorun                 = ws[1]:urxvt
#autorun                 = ws[2]:spacefm
#autorun                 = ws[2]:/home/nili/.dbeef/deadbeef
#autorun                 = ws[3]:/home/nili/.config/palemoon/palemoon

.conkyrc

out_to_console yes
background no
update_interval 2
total_run_times 0
use_spacer none

TEXT
    Uptime: ${uptime_short}   |   #/
CPU: ${cpu cpu1}% ${cpu cpu2}% - ${loadavg}   |   #/
Memory: ${memperc}% ${mem}   |   #/
Vol: ${exec amixer get Master -M | grep -oE "[[:digit:]]*%"}   |   #/
Home: ${fs_used_perc /}% ${fs_used /}   |   #/
Net: ${upspeed eth0} ${totalup eth0} - ${downspeed eth0} ${totaldown eth0}#/

Feel free to make your changes.
Nili


Devuan // CWM
Fedora // GNOME

Offline

#9 2016-08-25 14:37:15

Tao
Member
Registered: 2016-01-30
Posts: 7

Re: spectrwm (my config)

j9Aa3auI.jpg


.spectrwm.conf

## PLEASE READ THE MAN PAGE BEFORE EDITING THIS FILE!
## http://opensource.conformal.com/cgi-bin/man-cgi?spectrwm

## NOTE: all rgb color values in this file are in hex! see XQueryColor for examples
## LOOK: /usr/share/doc/spectrwm/examples/

workspace_limit = 5

focus_mode = default
focus_close = previous
# focus_close_wrap = 0
# warp_pointer = 1
focus_default = last

spawn_position = next

## Window Decoration
border_width = 8
color_focus = rgb:80/83/85
color_focus_maximized = rgb:63/68/69
color_unfocus = rgb:53/58/59
color_unfocus_maximized = rgb:33/88/39
region_padding = 18
tile_gap = 18

## Remove window border when bar is disabled
## and there is only one window in workspace
# disable_border = 1

## Bar Settings
bar_enabled = 1
bar_border_width = 1
bar_border[1] = rgb:63/68/69
# bar_border_unfocus[1] = rgb:2e/34/36
bar_color[1] = rgb:2e/34/36
bar_font_color[1] = rgb:aa/aa/aa
bar_font = Sans:style=Bold:pixelsize=12:antialias=true
bar_format = \#! +3< %d.%m.%Y %H:%M:%S +3< +U +3< +N:+I +3< <+D> +3< +S +3< +F +3< +M +5< +W +3< :) +5< +A
# bar_action = ~/.spectr/examples/baraction.sh
bar_justify = center
# bar_at_bottom = 1
# bar_delay = 1
stack_enabled = 1
clock_enabled = 1
# iconic_enabled = 0
title_class_enabled = 1
title_name_enabled = 1
window_class_enabled = 1
# window_instance_enabled = 1
window_name_enabled = 1
# verbose_layout = 1
urgent_enabled = 1

## Dialog box size ratio when using TRANSSZ quirk; 0.3 < dialog_ratio <= 1.0
# dialog_ratio = 0.8

## Region containment
## Distance window must be dragged/resized beyond the region edge
## before it is allowed outside the region.
# boundary_width =50

## Split a non-RandR dual head setup into one region per monitor
## (non-standard driver-based multihead is not seen by spectrwm)
# region = screen[1]:1280x1024+0+0
# region = screen[1]:1280x1024+1280+0

## Customize workspace layout at start
## (vertical, horizontal, fullscreen, vertical_flip, horizontal_flip)
# layout = ws[1]:4:0:0:0:vertical
layout = ws[2]:0:0:0:0:horizontal
layout = ws[3]:0:1:0:0:vertical

## Set workspace name at start
name = ws[1]:Shell
name = ws[2]:Files
name = ws[3]:Links
name = ws[4]:Media
name = ws[5]:Games

## Key bindings

## Mod key, (Windows key is Mod4; Alt key is Mod1)
modkey = Mod4

## This allows you to include pre-defined key bindings for your keyboard layout.
# keyboard_mapping = ~/.spectr/examples/keybindings.conf

# bind[wind_del] = Mod1+x

## PROGRAMS

## Autostart applications
## Launch applications in a workspace of choice
autorun = ws[1]:~/.spectr/examples/autostart.sh

## Validated default programs:
program[term] = x-terminal-emulator
spawn_term = x-terminal-emulator
# term_width = 0
program[menu] = dmenu-recency
program[lock] = slock

## Optional default programs that will only be validated if you override:
# program[screenshot_all] = ~/.spectr/examples/screenshot.sh full              # optional
# program[screenshot_wind] = ~/.spectr/examples/screenshot.sh window   # optional
# program[initscr] = ~/.spectr/examples/initscreen.sh                                 # optional

## EXAMPLE: Define 'files' action and bind to key.

program[terminal] = x-terminal-emulator
bind[terminal] = MOD+z

program[finder] = finder
bind[finder] = MOD+o

## QUIRKS

## You can obtain class
## by running: $ xprop | grep WM_CLASS
## and then clicking on the desired window.

## Default quirks, remove with: quirk[class:name] = NONE

quirk[.*] = IGNORESPAWNWS

 

+<+<+<+<+< = +5<   wink

.bin/dmenu-recency

#!/bin/bash

# Originally based on code by Dieter Plaetinck.
# Pretty much re-written by Mina Nagy (mnzaki).
# Edited by Chrysostomus and Tao.

if ! [ -f "$HOME/.config/dmenu/.dmenurc" ]; then
        cp /usr/share/dmenu/dmenurc $HOME/.config/dmenu/.dmenurc
fi

. $HOME/.config/dmenu/.dmenurc

if [ -z "$TERMINAL_CMD" ]; then
#  if [ "$(which default-terminal)" ]; then
#  TERMINAL_CMD="default-terminal -e"
  if [ "$(which x-terminal-emulator)" ]; then
  TERMINAL_CMD="x-terminal-emulator -e"
  elif [ "$(which gnome-terminal)" ]; then
  TERMINAL_CMD="gnome-terminal -e"
  elif [ "$(which xfce4-terminal)" ]; then
  TERMINAL_CMD="xfce4-terminal -e"
  elif [ "$(which lxterminal)" ]; then
  TERMINAL_CMD="lxterminal -e"
  elif [ "$(which terminator)" ]; then
  TERMINAL_CMD="terminator -e"
  elif [ "$(which termite)" ]; then
  TERMINAL_CMD="termite -e"
  elif [ "$(which sakura)" ]; then
  TERMINAL_CMD="sakura -e"
  elif [ "$(which urxvt)" ]; then
  TERMINAL_CMD="urxvt -e"
  elif [ "$(which xterm)" ]; then
  TERMINAL_CMD="xterm -e"
  fi
fi

dmenu_cmd="dmenu $DMENU_OPTIONS"
max_recent=195 # Number of recent commands to track

cache_dir="${XDG_CACHE_HOME:-$HOME/.cache}/dmenu-recent"
recent_cache="$cache_dir/recent"
rest_cache="$cache_dir/all"
known_types=" background terminal terminal_hold "

config_dir="${XDG_CONFIG_HOME:-$HOME/.config}/dmenu/recent"
mkdir -p "$cache_dir"
mkdir -p "$config_dir"
touch "$recent_cache"

# Without this, it won't remember $type
GREP_OPTIONS='--color=never'

IFS=:
if stest -dqr -n "$rest_cache" $PATH 2>/dev/null; then
     stest -flx $PATH | sort -u | grep -vf "$recent_cache" > "$rest_cache"
fi

IFS=" "
cmd=$(cat "$recent_cache" "$rest_cache" | $dmenu_cmd -p run: "$@") || exit

if ! grep -qx "$cmd" "$recent_cache" &> /dev/null; then
    grep -vx "$cmd" "$rest_cache" > "$rest_cache.$$"
    mv "$rest_cache.$$" "$rest_cache"
fi

echo "$cmd" > "$recent_cache.$$"
grep -vx "$cmd" "$recent_cache" | head -n "$max_recent" >> "$recent_cache.$$"
mv "$recent_cache.$$"  "$recent_cache"

# Figure out how to run the command based on the command name,
# disregarding arguments, if any.
word0=${cmd%% *}
match="^$word0$"

get_type () {
    while type=$(echo $known_types | xargs -n1 | $dmenu_cmd -p Type:); do
        [[ $known_types =~ " $type " ]] || continue
        echo "$word0" >> "$config_dir/$type"
        break
    done
    echo $type
}

if ! type=$(grep -lx "$match" -R "$config_dir"); then
    type=$(get_type)
else
    type=${type##*/}
    if ! [[ $known_types =~ " $type " ]]; then
        rm "$config_dir/$type"
        type=$(get_type)
    fi
fi

[[ "$type" = "background" ]] && exec $cmd
[[ "$type" = "terminal" ]] && exec $TERMINAL_CMD "$cmd"
[[ "$type" = "terminal_hold" ]] &&
    exec $TERMINAL_CMD sh -c "$cmd && echo Press Enter to kill me... && read line"

~/.config/dmenu/.dmenurc

#!/bin/bash

## Define the font for dmenu to be used
# DMENU_FN="Sans-10"
DMENU_FN="-*-terminal-*-*-*-*-14-*-*-*-*-*-iso8859-*"

# Background colour for unselected menu-items
DMENU_NB="#2E3436"

# Textcolour for unselected menu-items
DMENU_NF="#B5B5B5"

# Background colour for selected menu-items
DMENU_SB="#636869"

# Textcolour for selected menu-items
DMENU_SF="#DEDEDE"

# PANEL_HEIGHT="25"

# Command for the terminal application to be used:
TERMINAL_CMD="x-terminal-emulator -e"

# Export our variables
DMENU_OPTIONS="-fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB"
export DMENU_FN DMENU_NB DMENU_NF DMENU_SF DMENU_SB DMENU_OPTIONS TERMINAL

Wallpaper: xsetroot -mod 18 18 -bg '#2E3436' -fg '#636869'

+ https://github.com/syntax-samurai/ryu


smile

Last edited by Tao (2016-08-25 14:43:06)

Offline

#10 2016-09-11 14:01:19

Nili
Member
From: $HOME/♫♪
Registered: 2015-09-30
Posts: 1,020
Website

Re: spectrwm (my config)

^Legendary Ryukenden

I have seen a lot of your code at DA and Github. Thanks for sharing here... smile

Nili


Devuan // CWM
Fedora // GNOME

Offline

#11 2017-10-02 14:47:47

Addy
Member
From: Most populated island on Earth
Registered: 2017-07-14
Posts: 89
Website

Re: spectrwm (my config)

Decide to give Spectrwm a try. This is my first attempt on it smile
spectrwm-1.th.png
Everything is still pretty stock.

# PLEASE READ THE MAN PAGE BEFORE EDITING THIS FILE!
# http://opensource.conformal.com/cgi-bin/man-cgi?spectrwm
# NOTE: all rgb color values in this file are in hex! see XQueryColor for examples

workspace_limit = 8
# focus_mode = default
# focus_close = previous
# focus_close_wrap = 1
# focus_default = last
# spawn_position = next
# workspace_clamp = 1
# warp_focus = 1
# warp_pointer = 1

# Window Decoration
border_width = 2
color_focus = rgb:fd/79/80
color_focus_maximized = rgb:eb/cb/8b
color_unfocus = rgb:2f/34/3f
color_unfocus_maximized = rgb:2f/34/3f
region_padding = 12
tile_gap = 8

# Region containment
# Distance window must be dragged/resized beyond the region edge before it is
# allowed outside the region.
# boundary_width = 50

# Remove window border when bar is disabled and there is only one window in workspace
# disable_border = 1

# Bar Settings
bar_enabled = 1
bar_border_width = 4
bar_border[1] = rgb:2f/34/3f
bar_border_unfocus[1] = rgb:2f/34/3f
bar_color[1] = rgb:2f/34/3f
bar_font_color[1] = rgb:d8/de/e8
bar_font = Roboto:Regular:size=8
bar_action = conky
# bar_justify = left
# +4< Pad with 4 spaces
# +A Output of the external script
# +C Window class (from WM_CLASS)
# +D Workspace name
# +F Floating indicator
# +I Workspace index
# +M Number of iconic (minimized) windows in workspace
# +N Screen number
# +P Window class and instance separated by a colon
# +S Stacking algorithm
# +T Window instance (from WM_CLASS)
# +U Urgency hint
# +V Program version
# +W Window name (from _NET_WM_NAME/WM_NAME)
# ++ A literal ‘+’
bar_format = +2< +I +1< ‣ +1< +W +S +16< +A
bar_at_bottom = 0
#stack_enabled = 1
clock_enabled = 0
# clock_format = %a %b %d %R %Z %Y
# iconic_enabled = 0
# maximize_hide_bar = 0
# window_class_enabled = 0
# window_instance_enabled = 0
# window_name_enabled = 0
# verbose_layout = 1
# urgent_enabled = 1

# Dialog box size ratio when using TRANSSZ quirk; 0.3 < dialog_ratio <= 1.0
# dialog_ratio = 0.6

# Split a non-RandR dual head setup into one region per monitor
# (non-standard driver-based multihead is not seen by spectrwm)
# region = screen[1]:1280x1024+0+0
# region = screen[1]:1280x1024+1280+0

# Launch applications in a workspace of choice
# autorun = ws[1]:xterm
# autorun = ws[2]:xombrero http://www.openbsd.org
autorun = ws[1]:xsettingsd
autorun = ws[1]:feh --bg-fill /home/addy/.wallpaper.jpg

# Customize workspace layout at start
# layout = ws[1]:4:0:0:0:vertical
# layout = ws[2]:0:0:0:0:horizontal
# layout = ws[3]:0:0:0:0:fullscreen
# layout = ws[4]:4:0:0:0:vertical_flip
# layout = ws[5]:0:0:0:0:horizontal_flip

# Set workspace name at start
# name = ws[1]:Labs
# name = ws[2]:Browse
# name = ws[3]:File
# name = ws[4]:Editor

# Mod key, (Windows key is Mod4) (Apple key on OSX is Mod2)
modkey = Mod4

# This allows you to include pre-defined key bindings for your keyboard layout.
# keyboard_mapping = ~/.spectrwm_us.conf

# PROGRAMS

# Validated default programs:
# program[lock] = xlock
program[term] = termite
program[menu] = rofi -show drun -font 'Roboto Regular 8'

# To disable validation of the above, free the respective binding(s):
# bind[] = MOD+Shift+Delete # disable lock
# bind[] = MOD+Shift+Return # disable term
# bind[] = MOD+p   # disable menu

# Optional default programs that will only be validated if you override:
# program[screenshot_all] = screenshot.sh full # optional
# program[screenshot_wind] = screenshot.sh window # optional
# program[initscr] = initscreen.sh   # optional

# EXAMPLE: Define 'firefox' action and bind to key.
# program[firefox] = firefox http://spectrwm.org/
# bind[firefox] = MOD+Shift+b
program[thunar] = thunar
bind[thunar] = MOD+Shift+f
program[chromium] = chromium
bind[chromium] = MOD+Shift+w
program[geany] = geany
bind[geany] = MOD+Shift+g

# QUIRKS

# Default quirks, remove with: quirk[class:name] = NONE
# quirk[MPlayer:xv] = FLOAT + FULLSCREEN + FOCUSPREV
# quirk[OpenOffice.org 2.4:VCLSalFrame] = FLOAT
# quirk[OpenOffice.org 3.0:VCLSalFrame] = FLOAT
# quirk[OpenOffice.org 3.1:VCLSalFrame] = FLOAT
# quirk[Firefox-bin:firefox-bin] = TRANSSZ
# quirk[Firefox:Dialog] = FLOAT
# quirk[Gimp:gimp] = FLOAT + ANYWHERE
# quirk[XTerm:xterm] = XTERM_FONTADJ
# quirk[xine:Xine Window] = FLOAT + ANYWHERE
# quirk[Xitk:Xitk Combo] = FLOAT + ANYWHERE
# quirk[xine:xine Panel] = FLOAT + ANYWHERE
# quirk[Xitk:Xine Window] = FLOAT + ANYWHERE
# quirk[xine:xine Video Fullscreen Window] = FULLSCREEN + FLOAT
# quirk[pcb:pcb] = FLOAT
quirk[Viewnior] = FLOAT
quirk[Audacious] = FLOAT
quirk[feh] = FLOAT
quirk[URxvt] = FLOAT

Don't worry, my gaps aren't that extreme for normal usage  big_smile
And here is the conkybar

out_to_x no
out_to_console yes
update_interval 2.0
total_run_times 0
use_spacer none
TEXT
Time ‣ ${execi 30 LANG=en_US.utf8 LC_TIME=en_US.utf8 date +"%a %d // %H:%M"}        \
User ‣ ${execi 5000 whoami}        \
Uptime ‣ ${uptime_short}        \
RAM ‣ ${mem}        \
CPU ‣ ${cpu}%        \
Temp ‣ ${acpitemp}°C        \
Upload ‣ ${downspeedf wlp2s0}        \
Download ‣ ${upspeedf wlp2s0}        \

Other stuff in this screenshot

Visualizer mpdviz
Music Player ncmpcpp
File Manager Thunar
Terminal URxvt
Text Editor vim
GTK2 Theme Arc, slighly modified
Icons Halo

This WM is pretty easy to learn, but hard to be mastered.
The resources usage is very low. Lighter than i3-gaps, and probably tie with Bspwm.
In other words, this WM is amazing  smile


If it ain't broke, then tweak it until it breaks.

Offline

#12 2017-10-04 18:42:20

Nili
Member
From: $HOME/♫♪
Registered: 2015-09-30
Posts: 1,020
Website

Re: spectrwm (my config)

Thanks for sharing your config. I like it a lot spectrwm floats, just as you posted it even my looked just fine then.

I can't do those floats with herbstluftwm, maybe i can't do it. Or hlwm can't do it itself but i have give up wondering how to do.
IMHO spectrwm handle way better floats than HLWM.

Both HLWM/spectrwm have nice gaps feature. they're light on usage, HLWM is way lighter. Only 1.5/4MB while spectrwm usage something from 4.5/7MB.

For plain or simple usage this (spectrwm) is a good simple tile wm.


Devuan // CWM
Fedora // GNOME

Offline

#13 2017-10-06 15:01:04

Addy
Member
From: Most populated island on Earth
Registered: 2017-07-14
Posts: 89
Website

Re: spectrwm (my config)

Nili wrote:

Thanks for sharing your config. I like it a lot spectrwm floats, just as you posted it even my looked just fine then.

I can't do those floats with herbstluftwm, maybe i can't do it. Or hlwm can't do it itself but i have give up wondering how to do.
IMHO spectrwm handle way better floats than HLWM.

Both HLWM/spectrwm have nice gaps feature. they're light on usage, HLWM is way lighter. Only 1.5/4MB while spectrwm usage something from 4.5/7MB.

For plain or simple usage this (spectrwm) is a good simple tile wm.

You are very welcome. I do it for fun smile
Yes, I also can't find a way to individual floating for individual apps. I only can find a way to float dialog box (or any other popup).

Yup, I love gaps big_smile
Many people troll the useless gaps. But I find it useful.
Ohh, I never test the herbstluftwm RAM usage. Just knew it. Thanks for the information!
Next time I will post my herbstluftwm config wink


If it ain't broke, then tweak it until it breaks.

Offline

#14 2018-03-14 11:45:36

martix
Kim Jong-un Stunt Double
Registered: 2016-02-19
Posts: 1,267

Re: spectrwm (my config)

^There is an interesting article about memory usage of DEs and WMs here. spectrewm and herbstluftwm are not there though. Didn't know that BlackBox is the original and Openbox is a fork. Good comparison (pic) under Conclusion in the writing.

Offline

#15 2018-03-15 06:14:47

ohnonot
...again
Registered: 2015-09-29
Posts: 5,568

Re: spectrwm (my config)

that article is 5 years old.
and since the poster didn't bother updating it, i doubt they will now.

the comparative bars graphics are hardly more than meaningless populism; it's only useful for a cmplete newb to get their bearings on the DE market.
a comparison like that would have to include much more to be truly useful.
e.g., if i use KDE i get all sorts of desktop widgets. are they included in the graph or not?
and if i use openbox with a conky, should the conky be added to openbox' ram usage (to make the comparison fair)?

and not only ram usage, but also performance (cpu usage).

Last edited by ohnonot (2018-03-15 06:16:53)


Give to COVAX! Here or here. (explanation)
My Repos: notabug | framagit

Offline

#16 2018-03-15 07:52:53

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: spectrwm (my config)

ohnonot wrote:

performance (cpu usage)

I find GNOME performs just as well, if not better than, a simple window manager on my Intel Haswell laptop simply because GNOME can use my HD4600 to move stuff around the screen whereas openbox & dwm have to use the CPU, which isn't ideal.


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#17 2021-04-18 15:22:01

Colonel Panic
Member
Registered: 2018-11-13
Posts: 377

Re: spectrwm (my config)

[Thread bump here]

Thanks, I'm trying spectrwm now and will have a look at these configuration files. I like the fact that, unlike dwm, you can refresh a configuration whilst you're still using spectrwm.

Offline

#18 2021-04-18 17:36:28

manyroads
Member
From: around here, somewhere
Registered: 2019-04-16
Posts: 115
Website

Re: spectrwm (my config)

Every time I try it I find I still can't get conky to work and appear on all workspaces.  I am pretty sure it's not supposed to do anything different but I always forget.  wink


Pax vobiscum,
Mark Rabideau - http://many-roads.com  Professional Genealogist
dwm & i3wm ~ Reg. Linux User #449130
"For every complex problem there is an answer that is clear, simple, and wrong." H. L. Mencken

Offline

#19 2021-06-02 22:16:54

Colonel Panic
Member
Registered: 2018-11-13
Posts: 377

Re: spectrwm (my config)

The author Anthony Campbell has included the spectrwm configuration file that he uses, on his website. I find it to be a big improvement on the default one.

Here it is;

# PLEASE READ THE MAN PAGE BEFORE EDITING THIS FILE #

# Important
# Mod key, (Windows key is Mod4) (Apple key on OSX is Mod2)
modkey = Mod4

# Workspaces and Layout
workspace_limit = 5 # I don’t need more than this.

# Changes to Defaults
# The next two entries replace the default Mod+Space. Why? By default, this command cycles between the different layouts (vertical, horizontal, full screen). I seldom need to do this whereas I very frequently need to alternate the focus between main and stack. So I set Mod+Space to toggle focus_main and use Mod+c to cycle the layout.
bind[focus_main] = Mod+space
bind[cycle_layout] = Mod+c

# Other (minor) changes to defaults
bind[] = Mod+Shift+Delete # I don’t need to lock the screen and I want to avoid doing so accidentally, so disable the default.

# Window Decoration
border_width = 2
color_focus = red
color_unfocus = blue
tile_gap = 2

# Bar Settings
bar_enabled = 1
bar_border_width = 2
bar_border[1] = yellow
bar_border_unfocus[1] = yellow
bar_font_color[1] = white
bar_font = -*-courier-*-r-*-*-*-160-*-*-*-*-*-*
bar_format = %a %b %d %R +S +F +L +V
bar_at_bottom = 1

# Miscellaneous
iconic_enabled = 1 # occasionally useful

# Programs
program[term] = xterm

# Quirks
quirk[Xsane:xsane] = FLOAT + ANYWHERE
quirk[Gimp:gimp] = FLOAT + ANYWHERE

# Author Anthony Campbell

# Posted on 13/12/2019Categories computers, spectrwm, tiling window managers	

https://acampbell.uk/wp/2019/12/13/my-s … tion-file/

Last edited by Colonel Panic (2021-06-02 22:26:38)

Offline

Board footer

Powered by FluxBB