Building a minimal KLV with a spectrwm + Rox Desktop

Moderator: Forum moderators

User avatar
rockedge
Site Admin
Posts: 5827
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2079 times
Been thanked: 2174 times
Contact:

Building a minimal KLV with a spectrwm + Rox Desktop

Post by rockedge »

@geo_c I set up a test run that should theoretically create a KLV from scratch that will use X11 (xorg) graphics, a spectrwm Desktop with Rox as the file manager and desktop pinboard.

The first attempt will be the build of a KLV root file system and simply use the kernel components directly from KLV-Airedale to make the operating system do something like boot.

I plan on using @wiak script build_firstrib_rootfs.sh using the following PLUG file recipe:

Code: Select all

./build_firstrib_rootfs.sh void roll amd64 f_00_Void_KLV_no-kernel_WDLteam-alternate-1.plug

Code: Select all

# f_00_Void_KLV_XFCE_no-kernel_WDLteam-alternate-1.plug
# version="1.0.0"; revision="-alpha1"
# Kennel Linux Void outfitted with a spectrwm desktop 
# Creation date 01May2023; Revision date: 01May2023
# Copyright Kennel Linux team; License MIT

# build this via terminal commands:build_firstrib_rootfs_401rc1.sh
# export CONNECTION_TIMEOUT=-1  **not needed with v501**
# ./build_firstrib_rootfs_401rc1.sh void default amd64 f_00_Void_KLV_XFCE_kernel_WDLteam-rc5.plug
# Architecture i386 will probably successfully build too as an alternative to amd64

# login is user=root passwd=root

# All the parameters/commandlines can be appropriately changed:
# Simply comment in or comment out till you have what you desire
# or add new packages to the xbps-install lists.
# You can add as many valid commandlines as you want in here.
#
# base system
xbps-install -y base-minimal ncurses-base bash eudev
xbps-install -y file mc xterm xauth
xbps-install -y shadow wpa_supplicant  # needed for most wifi
xbps-install -y ntfs-3g zstd

# set up passwd system
pwconv
grpconv
printf "root\nroot\n" | passwd >/dev/null 2>&1 # Quietly set default root passwd to "root"

# set root to use /bin/bash
usermod --shell /bin/bash root

# Set locale to en_US.UTF-8 
sed -i 's/#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/default/libc-locales
xbps-reconfigure -f glibc-locales

# Set Bash as shell
xbps-alternatives --set bash

## --------------------------------------------------------------------------
## Xorg server, spectrwm Desktop configuration

xbps-install -y xorg spectrwm
xbps-install -y dmenu xlockmore
xbps-install -y gvfs-smb gvfs-mtp gvfs-cdda

# Optional packages
#
xbps-install -y geany gftp rox lxterminal
xbps-install -y e2fsprogs yelp gparted
xbps-install -y dosfstools mtools 
xbps-install -y squashfs-tools wget
xbps-install -y lxterminal htop

# Browser selection
xbps-install -y firefox

# Fix Firefox Fonts 
#
ln -s /usr/share/fontconfig/conf.avail/70-no-bitmaps.conf /etc/fonts/conf.d/
xbps-reconfigure -f fontconfig


# Install Audio
#
xbps-install -y pulseaudio pulseaudio-utils alsa-plugins-pulseaudio alsa-utils
ln -s /etc/sv/pulseaudio /etc/runit/runsvdir/default/pulseaudio

# Install Network Manager
#
xbps-install -y NetworkManager network-manager-applet
ln -s /etc/sv/NetworkManager /etc/runit/runsvdir/default/NetworkManager

# Set locale to en_US.UTF-8
sed -i 's/#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/default/libc-locales
xbps-reconfigure -f glibc-locales

# Add ~/Startup directory
#
mkdir -p /root/Startup
cat <<'EOF' >> /usr/local/bin/start-up
#!/bin/bash
sleep 5
user_home=$(eval echo ~${SUDO_USER})
ls $user_home/Startup/* | while read J
do
   "$J" &
done
EOF

chmod +x /usr/local/bin/start-up
 
# Setup autologin on tty1
#
cp -a /etc/X11/xinit/xinitrc /root/.xinitrc
cp -R /etc/sv/agetty-tty1 /etc/sv/agetty-autologin-tty1
sed -i 's/GETTY_ARGS.*/GETTY_ARGS="--autologin root --noclear"/' /etc/sv/agetty-autologin-tty1/conf  # editing for autologin root

# Arrange to startx in user's .bash_profile (per Arch Wiki)
# Remove this section if not wanting boot straight into X
touch ~/.bash_profile
cat <<'AUTOLOGIN' > /etc/profile.d/autologin.sh
# autologin on tty1
if [ -z "$DISPLAY" ] && [ "$(fgconsole)" -eq 1 ]; then
startx  # remove the exec if you want back to tty1 on exit X

fi
AUTOLOGIN

# Get and install autologin fix
#
# cd /etc/sv
# wget https://rockedge.org/kernels/data/XBPS_packages/agetty-autologin-tty1.tar.gz
# tar xvfz agetty-autologin-tty1.tar.gz

# Use agetty-autologin-tty1 instead of agetty-tty1 
# rm -f /etc/runit/runsvdir/default/agetty-tty1
# ln -s /etc/sv/agetty-autologin-tty1 /etc/runit/runsvdir/default/agetty-autologin-tty1

# enable dbus service
ln -s /etc/sv/dbus /etc/runit/runsvdir/default/dbus

# Auto-editing .xinitrc to use xfce4 instead of twm
# Because I'm using exec here the script will end there so no xterms started
#
# sed -i 's/twm &/exec xfce4-session/' ~/.xinitrc

 sed -i '51,$d' /root/.xinitrc
 echo "/usr/local/bin/start-up &" >>/root/.xinitrc 
 echo "# exec spectrwm" >>/root/.xinitrc
 echo "spectrwm" >>/root/.xinitrc  # removed exec to allow dropping out of Xorg to console

## USER CONFIGS: Copy main configs to /etc/skel for all normal users later added
#
xbps-install -y sudo
cp -af /root/. /etc/skel
mkdir -p /etc/skel/.config /etc/skel/.cache /etc/skel/.local/share
echo Still some extra to do here re the likes of runit starting pulseaudio
echo among other user needed config bits and pieces,
echo so probably a few user-config issues noted as needing fixed here

# Give wheel group nopasswd sudo rights and create weedog as wheel group member
echo '%wheel ALL=(ALL) NOPASSWD: ALL' | (VISUAL="tee -a" visudo) # wheel group added to sudo no password required
useradd -m -G wheel -s /bin/bash weedog  # weedog in wheel group so has elevated sudo permissions
printf "weedog\nweedog\n" | passwd weedog >/dev/null 2>&1 # Quietly set default weedog passwd to "weedog"

# Give wheel group nopasswd sudo rights and create spot as wheel group member
echo '%wheel ALL=(ALL) NOPASSWD: ALL' | (VISUAL="tee -a" visudo) # wheel group added to sudo no password required
useradd -m -G wheel -s /bin/bash spot  #spot in wheel group so has elevated sudo permissions
printf "spot\nspot\n" | passwd spot >/dev/null 2>&1 # Quietly set default spot

# Create /root directories
#
mkdir -p /root/Desktop
mkdir -p /root/Documents
mkdir -p /root/Downloads
mkdir -p /root/Music
mkdir -p /root/my-applications
mkdir -p /root/Pictures
mkdir -p /root/Public
mkdir -p /root/Startup
mkdir -p /root/Templates
mkdir -p /root/Videos

# Create /home/spot directories
#
mkdir -p /home/spot/Desktop
mkdir -p /home/spot/Documents
mkdir -p /home/spot/Downloads
mkdir -p /home/spot/Music
mkdir -p /home/spot/my-applications
mkdir -p /home/spot/Pictures
mkdir -p /home/spot/Public
mkdir -p /home/spot/Templates
mkdir -p /home/spot/Videos


# Set permissions
#
chown -R spot:spot /home/spot
chown -R weedog:weedog /home/weedog

# add users to groups and change permissions
#
usermod -a -G audio weedog
usermod -a -G audio spot
usermod -a -G video weedog
usermod -a -G video spot
xhost +
chmod 755 /
chmod 755 /bin
chmod 755 /lib

# add sudo -spot to .desktop files


#-----------------------------------------------------------------------
echo "desktop build process finished"

Screenshot(16).jpg
Screenshot(16).jpg (16.92 KiB) Viewed 889 times
Screenshot(17).jpg
Screenshot(17).jpg (18.19 KiB) Viewed 889 times
Attachments
build_firstrib_rootfs.sh.gz
remove fake gz extension
(43.52 KiB) Downloaded 26 times
geo_c
Posts: 2555
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1843 times
Been thanked: 727 times

Re: Building a minimal KLV with a spectrwm + Rox Desktop

Post by geo_c »

rockedge wrote: Sat Apr 29, 2023 6:41 pm

@geo_c I set up a test run that should theoretically create a KLV from scratch that will use X11 (xorg) graphics, a spectrwm Desktop with Rox as the file manager and desktop pinboard.

The first attempt will be the build of a KLV root file system and simply use the kernel components directly from KLV-Airedale to make the operating system do something like boot.

I plan on using @wiak script build_firstrib_rootfs.sh using the following PLUG file recipe:

Code: Select all

./build_firstrib_rootfs.sh void roll amd64 f_00_Void_KLV_no-kernel_WDLteam-alternate-1.plug

So that command builds a root file system with no kernel using the script below it?

Running from anywhere on a functional OS I take it.

geo_c
Old School Hipster, and Such

User avatar
rockedge
Site Admin
Posts: 5827
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2079 times
Been thanked: 2174 times
Contact:

Re: Building a minimal KLV with a spectrwm + Rox Desktop

Post by rockedge »

Yes, but the command above is missing the .sh extension!!

I have just run it successfully and after adding in the components it booted!!! But wrong desktop start up command so some editing and repacking.....very close to a test model.

User avatar
rockedge
Site Admin
Posts: 5827
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2079 times
Been thanked: 2174 times
Contact:

Re: Building a minimal KLV with a spectrwm + Rox Desktop

Post by rockedge »

I had to scrap the first KLV-spex file system because I broke it trying to over-ride autologin.

So I am now typing from run #2 that does boot to the destop but I do not know yet how to use it and it seems that running as a QEMU machine not all the key bindings seem to work. I also have no configuration file yet for spectrwm so it is doing basic default operation.

I modified the PLUG by removing the autologin installation commands and using a manual login and startx with a modified ~/.xinitrc

Some how I do have Rox as acting pinboard on the desktop and spectrwm is running and I was able to start Firefox which I managed to open fully using F11

Screenshot(18).jpg
Screenshot(18).jpg (24.3 KiB) Viewed 825 times

Looks like RAM usage reported in htop in the QEMU virtual machine is 136 mb with spectrwm + Rox running.

Screenshot(19).jpg
Screenshot(19).jpg (38.52 KiB) Viewed 820 times
User avatar
rockedge
Site Admin
Posts: 5827
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2079 times
Been thanked: 2174 times
Contact:

Re: Building a minimal KLV with a spectrwm + Rox Desktop

Post by rockedge »

Having some fun now that I am getting the hang of it. Looks like a lot of manual configuration for spectrwm but it is in text files.

User avatar
rockedge
Site Admin
Posts: 5827
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2079 times
Been thanked: 2174 times
Contact:

Re: Building a minimal KLV with a spectrwm + Rox Desktop

Post by rockedge »

Getting an ISO together that will use the original /boot directory from KLV-Airedale-alphaXX development versions with basic stanza's which i lifted from Fosspup64-9.5 and fixed up to boot KLV's.

Below is a quick reference borrowed from Ubuntu for operating the spectrwm desktop environment.

jammy spectrwm bindings

Code: Select all

Provided by: spectrwm_3.4.1-1_amd64 bug

NAME

     spectrwm — window manager for X11

SYNOPSIS

     spectrwm [-c file] [-v]

OPTIONS

     -c file
             Specify a configuration file to load instead of scanning for one.

     -v      Print version and exit.

DESCRIPTION

     spectrwm is a minimalistic window manager that tries to stay out of the way so that valuable
     screen real estate can be used for much more important stuff.  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.

     When spectrwm starts up, it reads settings from its configuration file, spectrwm.conf.  See
     the CONFIGURATION FILES section below.

     The following notation is used throughout this page:

           M       Meta
           S       Shift
           ⟨Name⟩  Named key or button

     spectrwm is very simple in its use.  Most of the actions are initiated via key or pointer
     bindings.  See the BINDINGS section below for defaults and customizations.

CONFIGURATION FILES

     spectrwm looks for the user-configuration file in the following order:

           1.   $XDG_CONFIG_HOME/spectrwm/spectrwm.conf
           2.   ~/.config/spectrwm/spectrwm.conf (if $XDG_CONFIG_HOME is either not set or empty)
           3.   ~/.spectrwm.conf.

     If the user-configuration file is not found, spectrwm then looks for the global
     configuration file in the following order:

           1.   $XDG_CONFIG_DIRS/spectrwm/spectrwm.conf (each colon-separated directory in
                $XDG_CONFIG_DIRS)
           2.   /etc/xdg/spectrwm/spectrwm.conf (if $XDG_CONFIG_DIRS is either not set or empty)
           3.   /etc/spectrwm.conf

     The format of the file is

           keyword = setting

     For example:

           color_focus = red

     Enabling or disabling an option is done by using 1 or 0 respectively.

     Colors need to be specified per the XQueryColor(3) specification.

     Comments begin with a #.  When a literal ‘#’ is desired in an option, then it must be
     escaped with a backslash, i.e. \#

     The file supports the following keywords:

     autorun
         Launch an application in a specified workspace at start-of-day.  Defined in the format
         ws[idx]:application, e.g. ws[2]:xterm launches an xterm(1) in workspace 2.

         Note that workspace mapping is handled via libswmhack.so.  When autorun spawns windows
         via a daemon, ensure the daemon is started with the correct LD_PRELOAD in its
         environment.

         For example, starting urxvtd(1) via xinit(1):

               LD_PRELOAD=/usr/lib/libswmhack.so.0.0 urxvtd -q -o -f

         Spawned programs automatically have LD_PRELOAD set when executed.

         It is advised to check the man page of ld.so as LD_PRELOAD is sometimes ignored by some
         operating systems.  A workaround is available, e.g. launch an xterm(1) in workspace 2:

               autorun = ws[2]:xterm -name ws2
               quirk[XTerm:ws2] = WS[2]

     bar_action
         External script that populates additional information in the status bar, such as battery
         life.

     bar_action_expand
         Process bar_format character sequences in bar_action output; default is 0.

     bar_at_bottom
         Place the statusbar at the bottom of each region instead of the top.

     bar_border[x]
         Border color of the status bar(s) in screen x.

     bar_border_unfocus[x]
         Border color of the status bar(s) on unfocused region(s) in screen x.

     bar_border_width
         Set status bar border thickness in pixels.  Disable border by setting to 0.

     bar_color[x]
         Background color of the status bar(s) in screen x.

         A comma separated list of up to 10 colors can be specified.  The first value is used as
         the default background color.  Any of these colors can then be selected as a background
         color in the status bar through the use of the markup sequence +@bg=n; where n is
         between 0 and 9.

     bar_color_selected[x]
         Background color for selections on the status bar(s) in screen x.  Defaults to the value
         of bar_border.

     bar_enabled
         Set default bar_toggle state; default is 1.

     bar_enabled_ws[x]
         Set default bar_toggle_ws state on workspace x; default is 1.

     bar_font
         Fonts used in the status bar.  Either Xft or X Logical Font Description (XLFD) may be
         used to specify fonts.  Fallback fonts may be specified by separating each font with a
         comma.  If all entries are in XLFD syntax, font set will be used.  If at least one entry
         is Xft, Xft will be used.

         The default is to use font set.

         If Xft is used, a comma-separated list of up to 10 fonts can be specified.  The first
         entry is the default font.  Any font defined here can then be selected in the status bar
         through the use of the markup sequence +@fn=n; where n is between 0 and 9.

         Also note that dmenu(1) does not support Xft fonts.

         Xft examples:

               bar_font = Terminus:style=Regular:pixelsize=14:antialias=true

               bar_font = -*-profont-medium-*-*-*-11-*-*-*-*-*-*-*,Terminus:pixelsize=14,-*-clean-medium-*-*-*-12-*-*-*-*-*-*-*

         Font set examples:

               bar_font = -*-terminus-medium-*-*-*-14-*-*-*-*-*-*-*

               bar_font = -*-profont-medium-*-*-*-11-*-*-*-*-*-*-*,-*-terminus-medium-*-*-*-14-*-*-*-*-*-*-*,-*-clean-medium-*-*-*-12-*-*-*-*-*-*-*

         To list the available fonts in your system see fc-list(1) or xlsfonts(1) manpages.  The
         xfontsel(1) application can help with the XLFD setting.

     bar_font_color[x]
         Foreground color of the status bar(s) in screen x.

         A comma separated list of up to 10 colors can be specified.  The first value is used as
         the default foreground color.  Any of these colors can then be selected as a foreground
         color in the status bar through the use of the markup sequence +@fg=n; where n is
         between 0 and 9.

     bar_font_color_selected[x]
         Foreground color for selections on the status bar(s) in screen x.  Defaults to the value
         of bar_color.

     bar_font_pua
         Specify a font which uses the Unicode Private Use Area (U+E000 -> U+F8FF).  Some fonts
         use these code points to provide special icon glyphs.  Available only with Xft fonts.

     bar_format
         Set the bar format string, overriding clock_format and all of the enabled options.  The
         format is passed through strftime(3) before being used.  It may contain the following
         character sequences:

               Character sequence    Replaced with
               +<                    Pad with a space
               +A                    Output of the external script
               +C                    Window class (from WM_CLASS)
               +D                    Workspace name
               +F                    Floating indicator
               +I                    Workspace index
               +L                    Workspace list indicator
               +M                    Number of iconic (minimized) windows in workspace
               +N                    Screen number
               +P                    Window class and instance separated by a colon
               +R                    Region index
               +S                    Stacking algorithm
               +T                    Window instance (from WM_CLASS)
               +U                    Urgency hint
               +V                    Program version
               +W                    Window name (from _NET_WM_NAME/WM_NAME)
               +|[weight][justify]   Begin new section and reset markup sequence effects.

                                                      weight is a positive integer used to
                                                      allocate horizontal space between 'L', 'C'
                                                      and 'R' sections (see justify).  The
                                                      default weight is 1.

                                                      justify can have the value L, C, R or T. L,
                                                      C, R are for left, center and right
                                                      justified sections respectively.  A 'T'
                                                      section will limit its space usage to fit
                                                      to the text.  If no value is specified for
                                                      a given section, the setting from
                                                      bar_justify is used.
               ++                    A literal ‘+’
               +@                    Prefix for text markup sequences

         The currently recognized text markup sequences are:

               Character sequence    Action
               +@fn=n;               Selects font n (from 0 to 9) from bar_font.
               +@fg=n;               Selects foreground color n (from 0 to 9) from
                                               bar_font_color.
               +@bg=n;               Selects background color n (from 0 to 9) from bar_color.
               +@stp;                Stops the interpretation of markup sequences. Any markup
                                               sequence found after +@stp will appear as normal
                                               characters in the status bar.

         Note that markup sequences in bar_action script output will only be processed if
         bar_action_expand is enabled.

         All character sequences may limit its output to a specific length, for example +64A.  By
         default, no padding/alignment is done in case the length of the replaced string is less
         than the specified length (64 in the example).  The padding/alignment can be enabled
         using a '_' character in the sequence.  For example: +_64W, +64_W and +_64_W enable
         padding before (right alignment), after (left alignment), and both before and after
         (center alignment) window name, respectively.  Any characters that don't match the
         specification are copied as-is.

     bar_justify
         Justify the status bar text.  Possible values are left, center, and right.

         Note that if the output is not left justified, it may not be properly aligned in some
         circumstances, due to the white-spaces in the default static format.  See the bar_format
         option for more details.

     bind[x]
         Bind key or button combo to action x.  See the BINDINGS section below.

     border_width
         Set window border thickness in pixels.  Disable all borders by setting to 0.

     boundary_width
         Set region containment boundary width in pixels.  This is how far a window must be
         dragged/resized (with the pointer) beyond the region edge before it is allowed outside
         the region.  Disable the window containment effect by setting to 0.

     clock_enabled
         Enable or disable displaying the clock in the status bar.  Disable by setting to 0 so a
         custom clock could be used in the bar_action script.

     color_focus
         Border color of the currently focused window.  Default is red.

     color_focus_maximized
         Border color of the currently focused, maximized window.  Defaults to the value of
         color_focus.

     color_unfocus
         Border color of unfocused windows, default is rgb:88/88/88.

     color_unfocus_maximized
         Border color of unfocused, maximized windows.  Defaults to the value of color_unfocus.

     dialog_ratio
         Some applications have dialogue windows that are too small to be useful.  This ratio is
         the screen size to what they will be resized.  For example, 0.6 is 60% of the physical
         screen size.

     disable_border
         Remove border when bar is disabled and there is only one window on the region.  Enable
         by setting to 1.  Setting this to always removes border from lone tiled windows,
         regardless of the bar being enabled/disabled.  Defaults to 0.

     focus_close
         Window to put focus when the focused window is closed.  Possible values are first, next,
         previous (default) and last.  next and previous are relative to the window that is
         closed.

     focus_close_wrap
         Whether to allow the focus to jump to the last window when the first window is closed or
         vice versa.  Disable by setting to 0.

     focus_default
         Window to put focus when no window has been focused.  Possible values are first and last
         (default).

     focus_mode
         Window focus behavior with respect to the pointer.  Possible values:

               default  Set window focus on border crossings caused by cursor motion and window
                        interaction.
               follow   Set window focus on all cursor border crossings, including workspace
                        switches and changes to layout.
               manual   Set window focus on window interaction only.

     iconic_enabled
         Display the number of iconic (minimized) windows in the status bar.  Enable by setting
         to 1.

     keyboard_mapping
         Clear all key bindings (not button bindings) and load new bindings from the specified
         file.  This allows you to load pre-defined key bindings for your keyboard layout.  See
         the KEYBOARD MAPPING FILES section below for a list of keyboard mapping files that have
         been provided for several keyboard layouts.

         Note that /dev/null can be specified if you only want to clear bindings.

     layout
         Select layout to use at start-of-day.  Defined in the format
         ws[idx]:master_grow:master_add:stack_inc:always_raise:stack_mode, e.g.
         ws[2]:-4:0:1:0:horizontal sets worskspace 2 to the horizontal stack mode, shrinks the
         master area by 4 ticks and adds one window to the stack, while maintaining default
         floating window behavior.  Possible stack_mode values are vertical, vertical_flip,
         horizontal, horizontal_flip and max.

         See master_grow, master_shrink, master_add, master_del, stack_inc, stack_dec,
         stack_balance, and always_raise for more information.  Note that the stacking options
         are complicated and have side-effects.  One should familiarize oneself with these
         commands before experimenting with the layout option.

         This setting is not retained at restart.

     maximize_hide_bar
         When set to 1, maximize_toggle will also hide/restore the bar visibility of the affected
         workspace.  Defaults to 0.

     modkey
         Change mod key.  Mod1 is generally the ALT key and Mod4 is the windows key on a PC.

     name
         Set the name of a workspace at start-of-day.  Defined in the format ws[idx]:name, e.g.
         ws[1]:Console sets the name of workspace 1 to “Console”.

     program[p]
         Define new action to spawn a program p.  See the PROGRAMS section below.

     quirk[c[:i[:n]]]
         Add "quirk" for windows with class c, instance i (optional) and name n (optional).  See
         the QUIRKS section below.

     region
         Allocates a custom region, removing any autodetected regions which occupy the same space
         on the screen.  Defined in the format screen[idx]:widthxheight+x+y, e.g.
         screen[1]:800x1200+0+0.

         To make a region span multiple monitors, create a region big enough to cover them all,
         e.g. screen[1]:2048x768+0+0 makes the region span two monitors with 1024x768 resolution
         sitting one next to the other.

     region_padding
         Pixel width of empty space within region borders.  Disable by setting to 0.

     spawn_position
         Position in stack to place newly spawned windows.  Possible values are first, next,
         previous and last (default).  next and previous are relative to the focused window.

     stack_enabled
         Enable or disable displaying the current stacking algorithm in the status bar.

     term_width
         Set a preferred minimum width for the terminal.  If this value is greater than 0,
         spectrwm will attempt to adjust the font sizes in the terminal to keep the terminal
         width above this number as the window is resized.  Only xterm(1) is currently supported.
         The xterm(1) binary must not be setuid or setgid, which it is by default on most
         systems.  Users may need to set program[term] (see the PROGRAMS section) to use an
         alternate copy of the xterm(1) binary without the setgid bit set.

     tile_gap
         Pixel width of empty space between tiled windows.  Negative values cause overlap.  Set
         this to the opposite of border_width to collapse the border between tiles.  Disable by
         setting to 0.

     urgent_collapse
         Minimizes the space consumed by the urgency hint indicator by removing the placeholders
         for non-urgent workspaces, the trailing space when there are urgent windows and the
         default leading space.  Enable by setting to 1.

     urgent_enabled
         Enable or disable the urgency hint indicator in the status bar.  Note that many terminal
         emulators require an explicit setting for the bell character to trigger urgency on the
         window.  In xterm(1), for example, one needs to add the following line to .Xdefaults:

               xterm.bellIsUrgent: true

     verbose_layout
         Enable or disable displaying the current master window count and stack column/row count
         in the status bar.  Enable by setting to 1.  See master_add, master_del, stack_inc and
         stack_dec for more information.

     warp_focus
         Focus on the target window/workspace/region when clamped.  For example, when attempting
         to switch to a workspace that is mapped on another region and workspace_clamp is
         enabled, focus on the region with the target workspace.  Enable by setting to 1.

     warp_pointer
         Centers the pointer on the focused window when using bindings to change focus, switch
         workspaces, change regions, etc.  Enable by setting to 1.

     window_class_enabled
         Enable or disable displaying the window class name (from WM_CLASS) in the status bar.
         Enable by setting to 1.

     window_instance_enabled
         Enable or disable displaying the window instance name (from WM_CLASS) in the status bar.
         Enable by setting to 1.

     window_name_enabled
         Enable or disable displaying the window display name (from _NET_WM_NAME/WM_NAME) in the
         status bar.  Enable by setting to 1.

         To prevent excessively large window names from pushing the remaining text off the bar,
         it's limited to 64 characters, by default.  See the bar_format option for more details.

     workspace_clamp
         Prevents workspaces from being swapped when attempting to switch to a workspace that is
         mapped to another region.  Use warp_focus if you want to focus on the region containing
         the workspace and warp_pointer if you want to also send the pointer.  Enable by setting
         to 1.

     workspace_indicator
         Configure the status bar workspace indicator.  One or more of the following options may
         be specified in a comma-separated list:

               listcurrent     Include the current workspace.
               listactive      Include workspaces with windows.
               listempty       Include empty workspaces.
               listnamed       Include named workspaces.
               listurgent      Include workspaces with urgent window(s).
               listall         Include all workspaces.
               hidecurrent     Always exclude the current workspace from the list.
               markcurrent     Indicate the current workspace if it is in the list.
               markurgent      Indicate workspaces in the list that contain urgent window(s).
               printnames      Display the names of named workspaces in the list.

         The default is listcurrent,listactive,markcurrent,printnames

     workspace_limit
         Set the total number of workspaces available.  Minimum is 1, maximum is 22, default is
         10.

PROGRAMS

     spectrwm allows you to define custom actions to launch programs of your choice and then bind
     them the same as with built-in actions.  See the BINDINGS section below.

     Custom programs in the configuration file are specified as follows:

           program[action] = progpath [arg [arg ...]]

     action is any identifier that does not conflict with a built-in action or keyword, progpath
     is the desired program, and arg is zero or more arguments to the program.

     With the exception of '~' expansion, program calls are executed as-is without any
     interpretation.  A shell can be called to execute shell commands.  (e.g. sh -c 'command
     string').

     Remember that when using ‘#’ in your program call, it must be escaped with a backslash, i.e.
     \#

     The following argument variables will be substituted for values at the time the program is
     spawned:

           $bar_border
           $bar_color
           $bar_color_selected
           $bar_font
           $bar_font_color
           $bar_font_color_selected
           $color_focus
           $color_unfocus
           $dmenu_bottom    -b if bar_at_bottom is enabled.
           $region_index
           $workspace_index

     Example:

           program[ff] = /usr/local/bin/firefox http://spectrwm.org/
           bind[ff] = MOD+Shift+b # Now M-S-b launches firefox

     To cancel the previous, unbind it:

           bind[] = MOD+Shift+b

     Default programs:
           term             x-terminal-emulator
           lock             slock
           menu             dmenu_run $dmenu_bottom -fn $bar_font -nb $bar_color -nf
                            $bar_font_color -sb $bar_color_selected -sf $bar_font_color_selected
           search           dmenu $dmenu_bottom -i -fn $bar_font -nb $bar_color -nf
                            $bar_font_color -sb $bar_color_selected -sf $bar_font_color_selected
           name_workspace   dmenu $dmenu_bottom -p Workspace -fn $bar_font -nb $bar_color -nf
                            $bar_font_color -sb $bar_color_selected -sf $bar_font_color_selected
           initscr          initscreen.sh        # optional
           screenshot_all   screenshot.sh full   # optional
           screenshot_wind  screenshot.sh window # optional

     Note that optional default programs will not be validated unless overridden.  If a default
     program fails validation, you can resolve the exception by installing the program, modifying
     the program call or disabling the program by freeing the respective binding.

     For example, to override lock:

           program[lock] = xscreensaver-command -lock

     To unbind lock and prevent it from being validated:

           bind[] = MOD+Shift+Delete

BINDINGS

     spectrwm provides many functions (or actions) accessed via key or pointer bindings.

     The default bindings are listed below:

           ⟨Button1⟩           focus
           M-⟨Button1⟩         move
           M-⟨Button3⟩         resize
           M-S-⟨Button3⟩       resize_centered
           M-S-⟨Return⟩        term
           M-p                 menu
           M-S-q               quit
           M-q                 restart
           ⟨unbound⟩           restart_of_day
           M-⟨Space⟩           cycle_layout
           M-S-\               flip_layout
           ⟨unbound⟩           layout_vertical
           ⟨unbound⟩           layout_horizontal
           ⟨unbound⟩           layout_max
           M-S-⟨Space⟩         stack_reset
           ⟨unbound⟩           stack_balance
           M-h                 master_shrink
           M-l                 master_grow
           M-,                 master_add
           M-.                 master_del
           M-S-,               stack_inc
           M-S-.               stack_dec
           M-⟨Return⟩          swap_main
           M-j, M-⟨TAB⟩        focus_next
           M-k, M-S-⟨TAB⟩      focus_prev
           M-m                 focus_main
           M-u                 focus_urgent
           M-S-j               swap_next
           M-S-k               swap_prev
           M-b                 bar_toggle
           M-S-b               bar_toggle_ws
           M-x                 wind_del
           M-S-x               wind_kill
           M-⟨1-9,0,F1-F12⟩    ws_⟨1-22⟩
           M-S-⟨1-9,0,F1-F12⟩  mvws_⟨1-22⟩
           M-⟨Keypad 1-9⟩      rg_⟨1-9⟩
           M-S-⟨Keypad 1-9⟩    mvrg_⟨1-9⟩
           ⟨unbound⟩           mvrg_next
           ⟨unbound⟩           mvrg_prev
           ⟨unbound⟩           ws_empty
           ⟨unbound⟩           ws_empty_move
           M-⟨Right⟩           ws_next
           M-⟨Left⟩            ws_prev
           M-⟨Up⟩              ws_next_all
           M-⟨Down⟩            ws_prev_all
           M-a                 ws_prior
           M-S-⟨Down⟩          ws_prev_move
           M-S-⟨Up⟩            ws_next_move
           M-S-⟨Right⟩         rg_next
           M-S-⟨Left⟩          rg_prev
           ⟨unbound⟩           rg_move_next
           ⟨unbound⟩           rg_move_prev
           M-s                 screenshot_all
           M-S-s               screenshot_wind
           M-S-v               version
           M-t                 float_toggle
           M-S-⟨Delete⟩        lock
           M-S-i               initscr
           M-w                 iconify
           M-S-w               uniconify
           M-e                 maximize_toggle
           M-S-e               fullscreen_toggle
           M-r                 raise
           M-S-r               always_raise
           M-v                 button2
           M--                 width_shrink
           M-=                 width_grow
           M-S--               height_shrink
           M-S-=               height_grow
           M-[                 move_left
           M-]                 move_right
           M-S-[               move_up
           M-S-]               move_down
           M-S-/               name_workspace
           M-/                 search_workspace
           M-f                 search_win

     The action names and descriptions are listed below:

           focus               Focus window/region under pointer.
           move                Move window with pointer while binding is pressed.
           resize              Resize window with pointer while binding is pressed.
           resize_centered     Same as resize but keep window centered.
           term                Spawn a new terminal (see PROGRAMS above).
           menu                Menu (see PROGRAMS above).
           quit                Quit spectrwm.
           restart             Restart spectrwm.
           restart_of_day      Same as restart but configuration file is loaded in full.
           cycle_layout        Cycle layout.
           flip_layout         Swap the master and stacking areas.
           layout_vertical     Switch to vertical layout.
           layout_horizontal   Switch to horizontal layout.
           layout_max          Switch to max layout.
           stack_reset         Reset layout.
           stack_balance       Balance master/stacking area.
           master_shrink       Shrink master area.
           master_grow         Grow master area.
           master_add          Add windows to master area.
           master_del          Remove windows from master area.
           stack_inc           Add columns/rows to stacking area.
           stack_dec           Remove columns/rows from stacking area.
           swap_main           Move current window to master area.
           focus_next          Focus next window in workspace.
           focus_prev          Focus previous window in workspace.
           focus_main          Focus on main window in workspace.
           focus_urgent        Focus on next window with the urgency hint flag set.  The
                               workspace is switched if needed.
           swap_next           Swap with next window in workspace.
           swap_prev           Swap with previous window in workspace.
           bar_toggle          Toggle overall visibility of status bars.
           bar_toggle_ws       Toggle status bar on current workspace.
           wind_del            Delete current window in workspace.
           wind_kill           Destroy current window in workspace.
           ws_n                Switch to workspace n, where n is 1 through workspace_limit.
           mvws_n              Move current window to workspace n, where n is 1 through
                               workspace_limit.
           rg_n                Focus on region n, where n is 1 through 9.
           mvrg_n              Move current window to region n, where n is 1 through 9.
           mvrg_next           Move current window to workspace in next region.
           mvrg_prev           Move current window to workspace in previous region.
           ws_empty            Switch to the first empty workspace.
           ws_empty_move       Switch to the first empty workspace and move current window.
           ws_next             Switch to next workspace with a window in it.
           ws_prev             Switch to previous workspace with a window in it.
           ws_next_all         Switch to next workspace.
           ws_prev_all         Switch to previous workspace.
           ws_next_move        Switch to next workspace with the current window.
           ws_prev_move        Switch to previous workspace with the current window.
           ws_prior            Switch to last visited workspace.
           rg_next             Switch to next region.
           rg_prev             Switch to previous region.
           rg_move_next        Switch region to next screen.
           rg_move_prev        Switch region to previous screen.
           screenshot_all      Take screenshot of entire screen (if enabled) (see PROGRAMS
                               above).
           screenshot_wind     Take screenshot of selected window (if enabled) (see PROGRAMS
                               above).
           version             Toggle version in status bar.
           float_toggle        Toggle focused window between tiled and floating.
           lock                Lock screen (see PROGRAMS above).
           initscr             Reinitialize physical screens (see PROGRAMS above).
           iconify             Minimize (unmap) currently focused window.
           uniconify           Restore (map) window returned by dmenu(1) selection.
           maximize_toggle     Toggle maximization of focused window.
           fullscreen_toggle   Toggle fullscreen state of focused window.
           raise               Raise the current window.
           always_raise        When set tiled windows are allowed to obscure floating windows.
           button2             Fake a middle mouse button click (Button2).
           width_shrink        Shrink the width of a floating window.
           width_grow          Grow the width of a floating window.
           height_shrink       Shrink the height of a floating window.
           height_grow         Grow the height of a floating window.
           move_left           Move a floating window a step to the left.
           move_right          Move a floating window a step to the right.
           move_up             Move a floating window a step upwards.
           move_down           Move a floating window a step downwards.
           name_workspace      Name the current workspace.
           search_workspace    Search for a workspace.
           search_win          Search the windows in the current workspace.

     Custom bindings in the configuration file are specified as follows:

           bind[action] = combo

     action is one of the actions listed above (or empty to unbind) and combo is in the form of
     zero or more modifier keys and/or special arguments (Mod1, Shift, MOD, etc.) and a normal
     key (b, Space, etc) or a button (Button1 .. Button255), separated by ‘+’.  Multiple
     key/button combinations may be bound to the same action.

     Special arguments:
           MOD         Substituted for the currently defined modkey.
           ANYMOD      Select all modifier combinations not handled by another binding.
           REPLAY      Reprocess binding press/release events for other programs to handle.
                       Unavailable for move, resize and resize_centered.

     MOD example:

           bind[reset] = Mod4+q # bind Windows-key + q to reset
           bind[] = Mod1+q # unbind Alt + q
           bind[move] = MOD+Button3 # Bind move to M-Button3
           bind[] = MOD+Button1 # Unbind default move binding.

     ANYMOD example:

           bind[focus] = ANYMOD+Button3
           bind[move] = MOD+Button3

     In the above example, M-⟨Button3⟩ initiates move and ⟨Button3⟩ pressed with any other
     combination of modifiers sets focus to the window/region under the pointer.

     REPLAY example:

           bind[focus] = REPLAY+Button3

     In the above example, when ⟨Button3⟩ is pressed without any modifier(s), focus is set to the
     window under the pointer and the button press is passed to the window.

     To bind non-latin characters such as å or π you must enter the xkb character name instead of
     the character itself.  Run xev(1), focus the window and press the specific key and in the
     terminal output read the symbol name.  In the following example for å:

           KeyPress event, serial 41, synthetic NO, window 0x2600001,
               root 0x15a, subw 0x0, time 106213808, (11,5), root:(359,823),
               state 0x0, keycode 24 (keysym 0xe5, aring), same_screen YES,
               XLookupString gives 2 bytes: (c3 a5) "å"
               XmbLookupString gives 2 bytes: (c3 a5) "å"
               XFilterEvent returns: False

     The xkb name is aring.  In other words, in spectrwm.conf add:

           bind[program] = MOD+aring

     To clear all default keyboard bindings and specify your own, see the keyboard_mapping
     option.

KEYBOARD MAPPING FILES

     Keyboard mapping files for several keyboard layouts are listed below.  These files can be
     used with the keyboard_mapping setting to load pre-defined key bindings for the specified
     keyboard layout.

           spectrwm_cz.conf     Czech Republic keyboard layout
           spectrwm_es.conf     Spanish keyboard layout
           spectrwm_fr.conf     French keyboard layout
           spectrwm_fr_ch.conf  Swiss French keyboard layout
           spectrwm_se.conf     Swedish keyboard layout
           spectrwm_us.conf     United States keyboard layout

QUIRKS

     spectrwm provides "quirks" which handle windows that must be treated specially in a tiling
     window manager, such as some dialogs and fullscreen apps.

     The default quirks are described below:

           Firefox-bin:firefox-bin                 TRANSSZ
           Firefox:Dialog                          FLOAT
           Gimp:gimp                               FLOAT + ANYWHERE
           MPlayer:xv                              FLOAT + FULLSCREEN + FOCUSPREV
           OpenOffice.org 2.4:VCLSalFrame          FLOAT
           OpenOffice.org 3.1:VCLSalFrame          FLOAT
           pcb:pcb                                 FLOAT
           xine:Xine Window                        FLOAT + ANYWHERE
           xine:xine Panel                         FLOAT + ANYWHERE
           xine:xine Video Fullscreen Window       FULLSCREEN + FLOAT
           Xitk:Xitk Combo                         FLOAT + ANYWHERE
           Xitk:Xine Window                        FLOAT + ANYWHERE
           XTerm:xterm                             XTERM_FONTADJ

     The quirks themselves are described below:

           ANYWHERE               Allow window to position itself, uncentered.
           FLOAT                  This window should not be tiled, but allowed to float freely.
           FOCUSONMAP_SINGLE      When the window first appears on the screen, change focus to
                                  the window if there are no other windows on the workspace with
                                  the same WM_CLASS class/instance value.  Has no effect when
                                  focus_mode is set to follow.
           FOCUSPREV              On exit force focus on previously focused application not
                                  previous application in the stack.
           FULLSCREEN             Remove border to allow window to use full region size.
           IGNOREPID              Ignore the PID when determining the initial workspace for a new
                                  window.  Especially useful for terminal windows that share a
                                  process.
           IGNORESPAWNWS          Ignore the spawn workspace when determining the initial
                                  workspace for a new window.
           MINIMALBORDER          Remove border when window is unfocused and floating.
           NOFOCUSCYCLE           Remove from normal focus cycle (focus_prev or focus_next). The
                                  window can still be focused using search_win.
           NOFOCUSONMAP           Don't change focus to the window when it first appears on the
                                  screen.  Has no effect when focus_mode is set to follow.
           OBEYAPPFOCUSREQ        When an application requests focus on the window via a
                                  _NET_ACTIVE_WINDOW client message (source indication of 1),
                                  comply with the request.  Note that a source indication of 0
                                  (unspecified) or 2 (pager) are always obeyed.
           TRANSSZ                Adjusts size on transient windows that are too small using
                                  dialog_ratio (see CONFIGURATION FILES).
           WS[n]                  Force a new window to appear on workspace n.
           XTERM_FONTADJ          Adjust xterm(1) fonts when resizing.

     Custom quirks in the configuration file are specified as follows:

           quirk[class[:instance[:name]]] = quirk [+ quirk ...]

     class, instance (optional) and name (optional) are patterns used to determine which
     window(s) the quirk(s) apply to and quirk is one of the quirks from the list above.

     Note that patterns are interpreted as POSIX Extended Regular Expressions.  Any ':', '[' or
     ']' must be escaped with '\'.  See regex(7) for more information on POSIX Extended Regular
     Expressions.

     For example:

           quirk[MPlayer] = FLOAT + FULLSCREEN + FOCUSPREV # Float all windows having a class of 'MPlayer'
           quirk[.*] = FLOAT # Float all windows by default.
           quirk[.*:.*:.*] = FLOAT # Same as above.
           quirk[Firefox:Navigator] = FLOAT # Float all Firefox browser windows.
           quirk[::Console] = FLOAT # Float windows with WM_CLASS not set and a window name of 'Console'.
           quirk[\[0-9\].*:.*:\[\[\:alnum\:\]\]*] = FLOAT # Float windows with WM_CLASS class beginning with a number, any WM_CLASS instance and a _NET_WM_NAME/WM_NAME either blank or containing alphanumeric characters without spaces.
           quirk[pcb:pcb] = NONE # remove existing quirk

     You can obtain class, instance and name by running xprop(1) and then clicking on the desired
     window.  In the following example the main window of Firefox was clicked:

           $ xprop | grep -E "^(WM_CLASS|_NET_WM_NAME|WM_NAME)"
           WM_CLASS(STRING) = "Navigator", "Firefox"
           WM_NAME(STRING) = "spectrwm - ConformalOpenSource"
           _NET_WM_NAME(UTF8_STRING) = "spectrwm - ConformalOpenSource"

     Note that xprop(1) displays WM_CLASS as:

           WM_CLASS(STRING) = "<instance>", "<class>"

     In the example above the quirk entry would be:

           quirk[Firefox:Navigator] = FLOAT

     spectrwm also automatically assigns quirks to windows based on the value of the window's
     _NET_WM_WINDOW_TYPE property as follows:

           _NET_WM_WINDOW_TYPE_DOCK             FLOAT + ANYWHERE
           _NET_WM_WINDOW_TYPE_TOOLBAR          FLOAT + ANYWHERE
           _NET_WM_WINDOW_TYPE_UTILITY          FLOAT + ANYWHERE
           _NET_WM_WINDOW_TYPE_SPLASH           FLOAT
           _NET_WM_WINDOW_TYPE_DIALOG           FLOAT

     In all other cases, no automatic quirks are assigned to the window.  Quirks specified in the
     configuration file override the automatic quirks.

EWMH

     spectrwm partially implements the Extended Window Manager Hints (EWMH) specification.  This
     enables controlling windows as well as spectrwm itself from external scripts and programs.
     This is achieved by spectrwm responding to certain ClientMessage events.  From the terminal
     these events can be conveniently sent using tools such as wmctrl(1) and xdotool(1).  For the
     actual format of these ClientMessage events, see the EWMH specification.

     The id of the currently focused window is stored in the _NET_ACTIVE_WINDOW property of the
     root window.  This can be used for example to retrieve the title of the currently active
     window with xprop(1) and grep(1):

           $ WINDOWID=`xprop -root _NET_ACTIVE_WINDOW | grep -o "0x.*"`
           $ xprop -id $WINDOWID _NET_WM_NAME | grep -o "\".*\""

     A window can be focused by sending a _NET_ACTIVE_WINDOW client message to the root window.
     For example, using wmctrl(1) to send the message (assuming 0x4a0000b is the id of the window
     to be focused):

           $ wmctrl -i -a 0x4a0000b

     Windows can be closed by sending a _NET_CLOSE_WINDOW client message to the root window.  For
     example, using wmctrl(1) to send the message (assuming 0x4a0000b is the id of the window to
     be closed):

           $ wmctrl -i -c 0x4a0000b

     Windows can be floated and un-floated by adding or removing the _NET_WM_STATE_ABOVE atom
     from the _NET_WM_STATE property of the window.  This can be achieved by sending a
     _NET_WM_STATE client message to the root window.  For example, the following toggles the
     floating state of a window using wmctrl(1) to send the message (assuming 0x4a0000b is the id
     of the window to be floated or un-floated):

           $ wmctrl -i -r 0x4a0000b -b toggle,_NET_WM_STATE_ABOVE

     Windows can also be iconified and un-iconified by substituting _NET_WM_STATE_HIDDEN for
     _NET_WM_STATE_ABOVE in the previous example:

           $ wmctrl -i -r 0x4a0000b -b toggle,_NET_WM_STATE_HIDDEN

     Floating windows can also be resized and moved by sending a _NET_MOVERESIZE_WINDOW client
     message to the root window.  For example, using wmctrl(1) to send the message (assuming
     0x4a0000b is the id of the window to be resize/moved):

           $ wmctrl -i -r 0x4a0000b -e 0,100,50,640,480

     This moves the window to (100,50) and resizes it to 640x480.

     Any _NET_MOVERESIZE_WINDOW events received for stacked windows are ignored.

SIGNALS

     Sending spectrwm a HUP signal will restart it.

FILES

     ~/.spectrwm.conf       spectrwm user specific settings.
     /etc/spectrwm.conf     spectrwm global settings.

HISTORY

     spectrwm was inspired by xmonad & dwm.

AUTHORS

     spectrwm was written by:

           Marco Peereboom ⟨marco@peereboom.us⟩
           Ryan Thomas McBride ⟨mcbride@countersiege.com⟩
           Darrin Chandler ⟨dwchandler@stilyagin.com⟩
           Pierre-Yves Ritschard ⟨pyr@spootnik.org⟩
           Tuukka Kataja ⟨stuge@xor.fi⟩
           Jason L. Wright ⟨jason@thought.net⟩
           Reginald Kennedy ⟨rk@rejii.com⟩
           Lawrence Teo ⟨lteo@lteo.net⟩
           Tiago Cunha ⟨tcunha@gmx.com⟩
           David Hill ⟨dhill@mindcry.org⟩

Powered by the Ubuntu Manpage Repository, file bugs in Launchpad

© 2019 Canonical Ltd. Ubuntu and Canonical are registered trademarks of Canonical Ltd.
User avatar
rockedge
Site Admin
Posts: 5827
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2079 times
Been thanked: 2174 times
Contact:

Re: Building a minimal KLV with a spectrwm + Rox Desktop

Post by rockedge »

@geo_c
KLV-spex-1 (585 mb) is ready for download and testing!

This KLV will boot to a login prompt : user = root, password = root which upon login will start the X server and spectrwm window manager and the Rox pinboard is commented out for start up in /root/.xinitrc and look at this page for how to navigate https://manpages.ubuntu.com/manpages/ja ... l#bindings
on my system and in a QEMU machine the following keys match up from the documentation

Code: Select all

M = alt key
S = shift key

This system in QEMU is fast

geo_c
Posts: 2555
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1843 times
Been thanked: 727 times

Re: Building a minimal KLV with a spectrwm + Rox Desktop

Post by geo_c »

rockedge wrote: Mon May 01, 2023 3:49 pm

This system in QEMU is fast

I might not get to it for a couple days, but I downloaded the iso and I will be giving this a whirl.

You amaze me. When an idea comes up in a topic, you run with it and crank out a new distro in a day.

geo_c
Old School Hipster, and Such

geo_c
Posts: 2555
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1843 times
Been thanked: 727 times

Re: Building a minimal KLV with a spectrwm + Rox Desktop

Post by geo_c »

Okay, poking around in KLV-spectr and this is fun. I opened a terminal and the first weird thing seems that /root only has a folder called startup in it.

So I typed geany in the terminal, that opened, then I tried Rox, that opened, and it's true, only a /Startup folder in /root. But now I can navigate.

Next took a look at the menu (M-p) Seems to be a menu of all the executables, of which there are quite a few, I suppose the base KLV system.

Probably should figure out how to connect to the web. But first figure out how this window manager works. Don't understand a lot of these terms, like "master-area" and "stacking"

Will keep you posted....posting from a second computer BTW

--------------------------------------

cycle layout, pretty cool (M-space), flip layout (M-S-\)

I can see getting to like a tiling window desktop, there's never a window hidden, although maybe there is an option for that.

Since the machine is wired to ethernet, firefox is connected and I just pulled up the forum with it. I'm going to try and configure Rox by pulling in some of my bookmarks. I take it because Rox is disabled as the pinboard manager, using a Rox panel would out of the question. At any rate I'm getting around my computer and moving files. There is no xbps installed apparently.

--------------------------------------

Well @mikewalsh portable Thunderbird runs just fine, and so does LibreWolf appimage. So with that taken care of, it looks to me like getting the package installations figured out will make this a new alternative for me. I can see running a system like this on my little net-book toshiba with 1 celeron 1.6ghz processor and 2GB of Ram. That little machine runs fossapup and browses, but rather slowly.

I could see loading this system up with all my favorite CLI apps and getting comfortable with the keystrokes and spectrwm config file and getting a lot work done.

And I am finally getting the hang of the master are and the stacking area. I loaded my Rox-MIME icons and bookmarks up and they run just fine. Also dark mode in the browsers.

I need to figure out how to configure the terminal so the font is a little bigger, and the colors are dark high contrast. I also need to figure how to control pulseaudio, and get the status bar loaded with useful monitors. I was reading in the Arch wiki that installing conky allows for monitoring system apps in the status bar.

geo_c
Old School Hipster, and Such

geo_c
Posts: 2555
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1843 times
Been thanked: 727 times

Re: Building a minimal KLV with a spectrwm + Rox Desktop

Post by geo_c »

Wow htop reports while running a hefty social media website in LibreWolf a whopping 783M of ram being used! Every other OS is sitting around 1.6GB of Ram with a browser and website running.

I could definitely use this on the single cpu netbook with only 2GB Ram

I'm just seriously enjoying this OS already. You've got another winner going here.

geo_c
Old School Hipster, and Such

User avatar
rockedge
Site Admin
Posts: 5827
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2079 times
Been thanked: 2174 times
Contact:

Re: Building a minimal KLV with a spectrwm + Rox Desktop

Post by rockedge »

@geo_c Added a bar action script to present some system information on the task bar / tray along with some more KLV-Airedale utilities, With gtk2dialog installed it is mostly a matter of transferring the packages from KLV-Airedale to KLV-Spectr.

I will have a fresh version ISO uploaded and ready in a few hours with the bar action script included. Also will continue to add a some small features but I am considering keeping the browser out of the root_fs SFS and having it as a browser only SFS loaded during system start up.

Once I got used to using the tiling window manager better it is really showing some big potential. The distro is fast and very efficient and still has room to ad in utiltites. The concept is to keep the OS on the basic side and let the user install the packages needed or desired with the XBPS package manager.

Should we add OctoXBPS ??? :geek:

Otherwise KLV-Spectr works mostly the same as KLV-Airedale but with an entirely different desktop concept.

geo_c
Posts: 2555
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1843 times
Been thanked: 727 times

Re: Building a minimal KLV with a spectrwm + Rox Desktop

Post by geo_c »

rockedge wrote: Thu May 04, 2023 10:46 am

Should we add OctoXBPS ??? :geek:

Otherwise KLV-Spectr works mostly the same as KLV-Airedale but with an entirely different desktop concept.

Well I was confused about that last night. The menu shows some xbps commands, so I guess command line xbps is included.

I had tried a system update, but maybe I used the wrong command, xbps -Sy but that's not right. I need to lookup the cli usage again.

I'd say command line package management would be fine being that people who would be inclined to use a system like this would probably prefer it anyway since it's so keystroke oriented.

All I need is a xbps command cheat sheet since I tend to forget things quickly.

geo_c
Old School Hipster, and Such

User avatar
Sofiya
Posts: 1859
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1231 times
Been thanked: 1119 times

Re: Building a minimal KLV with a spectrwm + Rox Desktop

Post by Sofiya »

geo_c wrote: Thu May 04, 2023 11:28 am
rockedge wrote: Thu May 04, 2023 10:46 am

Should we add OctoXBPS ??? :geek:

Otherwise KLV-Spectr works mostly the same as KLV-Airedale but with an entirely different desktop concept.

Well I was confused about that last night. The menu shows some xbps commands, so I guess command line xbps is included.

I had tried a system update, but maybe I used the wrong command, xbps -Sy but that's not right. I need to lookup the cli usage again.

I'd say command line package management would be fine being that people who would be inclined to use a system like this would probably prefer it anyway since it's so keystroke oriented.

All I need is a xbps command cheat sheet since I tend to forget things quickly.

Code: Select all

 xbps-install -Su

Vanilla Dpup 9.2.X - KLV-Airedale - KLA-OT2
PUPPY LINUX Simple fast free

geo_c
Posts: 2555
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1843 times
Been thanked: 727 times

Re: Building a minimal KLV with a spectrwm + Rox Desktop

Post by geo_c »

Sofiya wrote: Thu May 04, 2023 12:21 pm

Code: Select all

 xbps-install -Su

I think I was mixing up pacman with xbps.

geo_c
Old School Hipster, and Such

User avatar
rockedge
Site Admin
Posts: 5827
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2079 times
Been thanked: 2174 times
Contact:

Re: Building a minimal KLV with a spectrwm + Rox Desktop

Post by rockedge »

Here is more on XBPS -> https://docs.voidlinux.org/xbps/index.html

@geo_c Found a trick in a terminal that starts Thunar with gvfs working correctly:

Code: Select all

dbus-launch thunar
Screenshot(20).jpg
Screenshot(20).jpg (40.94 KiB) Viewed 720 times

This is the status bar with the bar action script running:

Screenshot(22).jpg
Screenshot(22).jpg (10.65 KiB) Viewed 720 times

rox -pinboard default running and Thunar launched with dbus and SAMBA connection to host machine:

Screenshot(23).jpg
Screenshot(23).jpg (28.17 KiB) Viewed 718 times
User avatar
rockedge
Site Admin
Posts: 5827
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2079 times
Been thanked: 2174 times
Contact:

Re: Building a minimal KLV with a spectrwm + Rox Desktop

Post by rockedge »

Fix for Thunar missing the gvfs components

Found that a dbus session wasn't started and Thunar needs a dbus-launch or the message that Thunar can not find gvfs appears. So to fix this we must start a dbus session for root and spot. We now do this in the /root/.xinitrc by adding:

Code: Select all

# start a D-Bus session bus for both root and spot, for PulseAudio and applications that don't work without it

eval `dbus-launch --exit-with-x11 --sh-syntax`
run-as-spot dbus-launch --exit-with-x11 > /tmp/.spot-session-bus

We can add run-as-spot from KLV-Airedale to /usr/local/bin/run-as-spot

The following is a replacement for /root/.xinitrc and can be swapped in. The next alpha2 will have this included.

/root/.xinitrc

Code: Select all

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then

    xrdb -merge $sysresources

fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then


    xrdb -merge "$userresources"

fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start a D-Bus session bus for both root and spot, for PulseAudio and applications that don't work without it

eval `dbus-launch --exit-with-x11 --sh-syntax`
run-as-spot dbus-launch --exit-with-x11 > /tmp/.spot-session-bus

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

# rox -p default
spectrwm
geo_c
Posts: 2555
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1843 times
Been thanked: 727 times

Re: Building a minimal KLV with a spectrwm + Rox Desktop

Post by geo_c »

rockedge wrote: Thu May 04, 2023 2:18 pm

rox -pinboard default running and Thunar launched with dbus and SAMBA connection to host machine:
Screenshot(23).jpg

So how does that start? Just typing rox -pinboard default in the terminal?

geo_c
Old School Hipster, and Such

User avatar
rockedge
Site Admin
Posts: 5827
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2079 times
Been thanked: 2174 times
Contact:

Re: Building a minimal KLV with a spectrwm + Rox Desktop

Post by rockedge »

geo_c wrote:

So how does that start? Just typing rox --pinboard default in the terminal?

Yes that would work OR make a modification to /root/.xinitrc by un-commenting around line 41:
From:

Code: Select all

# rox -p default
spectrwm

To:

Code: Select all

rox -p default
spectrwm

Use either form -> rox -p default or rox --pinboard default and it is possible to place a start script instead in /root/Startup which would auto-start during the system start.

geo_c
Posts: 2555
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1843 times
Been thanked: 727 times

Re: Building a minimal KLV with a spectrwm + Rox Desktop

Post by geo_c »

Installed a few things like Xfe file manager, scrot for screenshots, enabled the rox pinboard and loaded it up. Time to go to bed, it's 3am

Image

geo_c
Old School Hipster, and Such

geo_c
Posts: 2555
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1843 times
Been thanked: 727 times

Re: Building a minimal KLV with a spectrwm + Rox Desktop

Post by geo_c »

I switched the .xinitrc to the new one, then I lost all my pinboard launchers. So I switched it back to the original and rebooted, they were still gone, so l created them again. Also the new .xinitrc didn't seem to give me the status bar like yours @rockedge. Was it supposed to?

Also what's the proper command to shutdown? Poweroff shuts down instantly, under a second, maybe 100 miliseconds.

Boot time on this OS has got to be around 10 seconds, amazingly fast.

geo_c
Old School Hipster, and Such

User avatar
rockedge
Site Admin
Posts: 5827
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2079 times
Been thanked: 2174 times
Contact:

Re: Building a minimal KLV with a spectrwm + Rox Desktop

Post by rockedge »

@geo_c Starting to get more familiar with operating the Rox - spectrwm desktop and setting it up. We are still in a raw alpha stage but getting the pieces together. The key is the /root/.spectrwm.conf. In alpha2 the baraction.sh script and a screenshot.sh is added which will allow the default screenshot M-s to make a screenshot. Also added scrot in the root_fs

I will be uploading a alpha2 that hopefully has more of all of this refined a bit further, alt key - b or in official notation M - b turns the bar on and off.
Though in the .spectrwm.conf the bar_action is un-commented and set to bar_action /usr/local/bin/baraction.sh

I will have this straightened out in alpha2 hopefully. I added in Thunar and plugins plus installed xfe as well. and I am playing around with what is possible in customizing spectrwm. It seems like a lot can be done and in the text based configuration file.

I really am liking the direction your desktop going in. Really nice :thumbup2:

I am finding the system is performing very efficiently and is fast fast. Once getting use to how the tiling window manager works I begin to wonder why stay focused on stacking window managers. When one finds the work flow this is proving to be a really a get the job done type of system.

We will need to create a poweroff and reboot button or icon. Right now I am opening a terminal and using the poweroff or reboot typed in which is proving to be very fast in shutting down the machine.

geo_c
Posts: 2555
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1843 times
Been thanked: 727 times

Re: Building a minimal KLV with a spectrwm + Rox Desktop

Post by geo_c »

rockedge wrote: Sat May 06, 2023 2:38 pm

The key is the /root/.spectrwm.conf.

I really am liking the direction your desktop going in. Really nice :thumbup2:

I am finding the system is performing very efficiently and is fast fast. Once getting use to how the tiling window manager works I begin to wonder why stay focused on stacking window managers. When one finds the work flow this is proving to be a really a get the job done type of system.

We will need to create a poweroff and reboot button or icon. Right now I am opening a terminal and using the poweroff or reboot typed in which is proving to be very fast in shutting down the machine.

Yes I'm thinking about this system as a really good workflow platform. I was looking at the spectrwm.conf last night, but it was too late to start experimenting. This is the kind of desktop the average joe can customize quickly using the config file and then simply copy in the config to a clean system. Boom it's all there.

I installed lynx, elinks, micro, calcurse, neomutt, w3m, w3m-img and ranger. I like ranger, you can install it with w3m and w3m-img and it previews images. The scrot screenshot is easy enough. Next I'll throw in lilypond. I'm getting the hang of cli xbps. Command line package management is a heck of a lot faster than gui. I'm using the query also.

Image

geo_c
Old School Hipster, and Such

geo_c
Posts: 2555
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1843 times
Been thanked: 727 times

Re: Building a minimal KLV with a spectrwm + Rox Desktop

Post by geo_c »

running LibreWolf htop reports 586MB of ram being used in total. With the forum loaded 686MB.

true puppylike specs

geo_c
Old School Hipster, and Such

User avatar
rockedge
Site Admin
Posts: 5827
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2079 times
Been thanked: 2174 times
Contact:

Re: Building a minimal KLV with a spectrwm + Rox Desktop

Post by rockedge »

geo_c wrote:

This is the kind of desktop the average Joe can customize quickly using the config file and then simply copy in the config to a clean system. Boom it's all there.

No need to reboot to test a change, just use a M-q (alt key + q) keys combo to quickly restart spectrwm and the configuration changes will appear.

I have been looking around for any examples of different spectrwm config's but so far only found one or two that I looked over before trying it out. I did one whole sale change over to another config I found on GitHub and it did not go smoothly. Changed the default key combinations and I was kind of lost, so I am going slowly on too many changes at once without a test run in between the config changes. :geek:

geo_c
Posts: 2555
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1843 times
Been thanked: 727 times

Re: Building a minimal KLV with a spectrwm + Rox Desktop

Post by geo_c »

rockedge wrote: Sat May 06, 2023 3:51 pm

[No need to reboot to test a change, , just use a M-q (alt key + q) keys combo to quickly restart spectrwm and the configuration changes will appear.

good to know

rockedge wrote: Sat May 06, 2023 3:51 pm

I found on GitHub and it did not go smoothly. Changed the default key combinations and I was kind of lost, so I am going slowly on too many changes at once without a test run in between the config changes. :geek:

I'm always hesitant to mess with key bindings on any application, it gets complicated for one thing, especially with the terminal. Then there's keeping track of them all.

geo_c
Old School Hipster, and Such

geo_c
Posts: 2555
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1843 times
Been thanked: 727 times

Re: Building a minimal KLV with a spectrwm + Rox Desktop

Post by geo_c »

I'm trying to figure out how change the default colors in xterm or uxterm. It seems .Xdefaults is not the way. There isn't one in Void, and when I add one it doesn't do anything.

Is there a terminal control app I can install from the Void repos?

geo_c
Old School Hipster, and Such

User avatar
Sofiya
Posts: 1859
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1231 times
Been thanked: 1119 times

Re: Building a minimal KLV with a spectrwm + Rox Desktop

Post by Sofiya »

geo_c wrote: Sat May 06, 2023 4:20 pm

I'm trying to figure out how change the default colors in xterm or uxterm. It seems .Xdefaults is not the way. There isn't one in Void, and when I add one it doesn't do anything.

Is there a terminal control app I can install from the Void repos?

in /root/.Xresources

Code: Select all

Xft*antialias: true
Xft*autohint: true
XTerm*background: black
XTerm*foreground: grey
XTerm*cursorColor: grey
XTerm.vt100.geometry: 84x25+150
XTerm*faceName: Monospace Regular 
XTerm*faceSize: 9

UXft*antialias: true
UXft*autohint: true
UXTerm*background: black
UXTerm*foreground: grey
UXTerm*cursorColor: grey
UXTerm.vt100.geometry: 84x25+150
UXTerm*faceName: Monospace Regular 
UXTerm*faceSize: 8

Restart X

Last edited by Sofiya on Fri May 12, 2023 1:46 pm, edited 3 times in total.

Vanilla Dpup 9.2.X - KLV-Airedale - KLA-OT2
PUPPY LINUX Simple fast free

geo_c
Posts: 2555
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1843 times
Been thanked: 727 times

Re: Building a minimal KLV with a spectrwm + Rox Desktop

Post by geo_c »

Sofiya wrote: Sat May 06, 2023 4:36 pm

in /root/.Xresources

Thanks that's making things look a lot snappier!

I like the tiling window manager. I spend a lot of time resizing windows with the mouse in stacking desktops, and with the tiling wm everything comes out the same width. The tiling scripts included in puppies and Kennel-Linuxes is nice and effective, but still, this all happens on the fly. And the system is just so blazing fast.

Next I need to figure out how to change the gtk theme.

Btw, below is a little script I found online that lists the xterm color numbers:

Code: Select all

#!/bin/bash
for((i=16; i<256; i++)); do
    printf "\e[48;5;${i}m%03d" $i;
    printf '\e[0m';
    [ ! $((($i - 15) % 6)) -eq 0 ] && printf ' ' || printf '\n'
done

Image

geo_c
Old School Hipster, and Such

User avatar
rockedge
Site Admin
Posts: 5827
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2079 times
Been thanked: 2174 times
Contact:

Re: Building a minimal KLV with a spectrwm + Rox Desktop

Post by rockedge »

I like being able to tile 4 windows on a workspace and use M-e to maximize or minimize a focused tile. Also M-t to float or un-float a tile.

I am moving tiles around with pressing M - M1 (left mouse button) and dragging the tile around the workspace, Also the being able to send a floating tile back onto the tile grid.

Might be able to borrow the uxrvt configuration GUI from Puppy Linux, but I see the minlimism in using the method @Sofiya pointed out.

Might be worth making a more polished release of this KLV-Spectr............

maybe a slicker name? KLV-Spector or KLV-Bloodhound (just won Best Dog in the famous Westminster Dog Show last night)

geo_c
Posts: 2555
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 1843 times
Been thanked: 727 times

Re: Building a minimal KLV with a spectrwm + Rox Desktop

Post by geo_c »

rockedge wrote: Sat May 06, 2023 6:29 pm

I like being able to tile 4 windows on a workspace and use M-e to maximize or minimize a focused tile. Also M-t to float or un-float a tile.
I am moving tiles around with pressing M - M1 (left mouse button) and dragging the tile around the workspace, Also the being able to send a floating tile back onto the tile grid.
Might be able to borrow the uxrvt configuration GUI from Puppy Linux, but I see the minlimism in using the method @Sofiya pointed out.
Might be worth making a more polished release of this KLV-Spectr............
maybe a slicker name? KLV-Spector or KLV-Bloodhound (just won Best Dog in the famous Westminster Dog Show last night)

Yeah, thanks for the keystroke tips, I wasn't sure what (button1) meant in the key binding chart. With the ability to float the windows and reorganize the desktop with keystrokes it's really the best of both worlds.

How about KLV-Respector?

geo_c
Old School Hipster, and Such

Post Reply

Return to “KL-Dev_Work”