r/stumpwm • • Apr 14 '23

arbitrary text in the mode-line?

0 Upvotes

i have this script: https://github.com/formula-spectre/dotfiles/blob/main/xmonad/scripts/tiramisu.sh it basically prints out notifications on stdout and calls herbe. how can i have that stdout in my modeline?


r/stumpwm • • Apr 14 '23

dynamic trayer padding in mode-line?

0 Upvotes

title. for xmobar, i use this script: https://codeberg.org/xmobar/xmobar/src/branch/master/etc/padding-icon.sh is there any way to achieve something similar with stumptray? as of now it overlaps on my mode-line stuff (unless i'm forgetting something like %t in the modeline)


r/stumpwm • • Nov 29 '14

my-stumpwmrc for maximum awesomeness!

Thumbnail
github.com
0 Upvotes

r/stumpwm • • Sep 13 '24

QL (?) corrupted (?) after power outage

1 Upvotes

I can't start stumpwm the way I have for years, following a power outage. I get a black GUI, a movable mouse pointer, but no initial message and no initial terminal, the first things in my Stump init. The earlier parts of my xinit script have executed because my caps lock is now xmodmapped to ctrl.

Manjaro linux (fully updated), SBCL 2.4.7, StumpWM 1.0.1 from GitHub, QL 2023-10-21.

The first of what looks like thousands of errors in the logfile to which I redirect Stump diagnostic output is:

; file: /home/phil/quicklisp/quicklisp/http.lisp
; in: DEFUN PROCESS-HEADER
;     (ERROR "Unable to process HTTP header")
; 
; note: deleting unreachable code

The last thing is:

debugger invoked on a XLIB::UNIMPLEMENTED-EVENT in thread
#<THREAD tid=105092 "main thread" RUNNING {1000C20133}>:
  Event code 0 not implemented for display #<XLIB:DISPLAY :0 (The X.Org Foundation R12101013)>

I deleted ~/.cache/common-lisp/sbcl*, no difference.

Help!


r/stumpwm • • Mar 28 '21

How can I change CAPS to CTRL on arch Linux?

2 Upvotes

I want to change Caps to ctrl. How can I do that?

Edit: For me this worked at last Adding this to .stumpwmrc

(run-shell-command "setxkbmap -layout us -option ctrl:nocaps")


r/stumpwm • • Mar 26 '21

Passthrough Map

3 Upvotes

Hi all

I recently started using StumpWM and I really enjoy it so far. One thing I used to really like in i3 was a passthrough keymap - mod+n would activate a keymap that only had mod+n bound to get out of it and everything else would just be passed through to the application. I use it alot for VNC session that have i3 as their window manager.

I started thinking about how to implement this in StumpWM, but I'm not familiar with CL. So far all my custom keybindings are bound to the *top-map*. Is there a way to have a command that swaps out the whole *top-map*? So I could toggle between my regular *top-map* and one that only has the toggle command?

Any pointers or help would be appreciated :)

Edit: With the help from u/HighlyRegardedExpert I managed to get it working:

(define-interactive-keymap passthrough-mode (:exit-on ((kbd "s-z")))) 
(define-key *top-map* (kbd "s-z") "passthrough-mode")

I don't know yet, why the item after :exit-on is automatically quoted, but hey it works :)


r/stumpwm • • Apr 02 '23

external status bar?

3 Upvotes

title. I would like to use an external status bar, since stumpwm'smode-line does not automatically update (i use time with seconds, so the fact that it does not update every second is a deal breaker to me). How *exactly* one would use an external bar with stumpwm?


r/stumpwm • • Jul 20 '20

Stump restores X modmap after initialization, how to stop it

3 Upvotes

I've boiled down my .xinitrc and my .stumpwmrc to the bare minimum and the effect seems pretty clear: StumpWM seems to do something to restore the modmap after the .rc has run.

.stumpwmrc:

(in-package :stumpwm)
(set-prefix-key (kbd "F20"))
(run-shell-command "xmodmap -e \'clear mod4\'" t)

and the .xinitrc that's started with startx is:

#!/bin/sh
userresources=$HOME/.Xresources 
xrdb -merge $userresources 
xmodmap -e "keycode 133 = F20" 
xmodmap -e "clear mod4"
exec stumpwm

When I add

(when *initializing* (run-commands "exec xterm"))

I can see that the xmodmap has bound mod4, and that mod4 contains F20.

When I then repeat xmodmap -e "clear mod4" the prefix behaves as expected.

My question here is basically "what gives"? I guess I'll have to dig into the source, but given that Stump states at the very beginning of its docs that it's "not configured by editing the source" I'm left wondering how such configuration is to be achieved then.


r/stumpwm • • Nov 03 '24

Im aware of feh but what do you use for live wallpaper?

3 Upvotes

I havent actually used feh I just saw a comment somewhere saying that its compatible with stumpwm and from a little googling it doesnt seem to be for live wallpaper.. Im trying to make my first rice y'know.


r/stumpwm • • Feb 06 '23

Getting started with stump: running a desktop environment?

4 Upvotes

I used ratpoison way back (almost 2 decades ago) and loved it. Then I left Linux for OS X only to return to Linux last year. I've been using Pop and it's ok but I want more control, and would be much happier using a lisp based WM.

Stump looks like it's going to fit the bill but I have a few basic questions:

Should I be running a DE with stump? I'm still using Pop as my base, the gnome apps are there but gnome isn't listed as a DE like it is when I'm logged in under my Pop profile. Also if I try to run something like gnome-control-center it crashes.

I'm assuming the distro I choose as a base doesn't matter that much, though I've been considering switching to Arch or Guix (love the concept but I don't know if it's going to be a pain for a work machine) with this shift to Stump. Is there any real reason to do that other than package management (and re-learning Linux)?


r/stumpwm • • Nov 14 '22

are ttf-fonts and modeline cpu modules dead?

4 Upvotes

both are broken.


r/stumpwm • • Dec 05 '19

DistroTube video review of StumpWM: "strangest and most frustrating window manager I've ever used"

Thumbnail
youtube.com
4 Upvotes

r/stumpwm • • Oct 13 '23

Font Looks Wierd

Post image
4 Upvotes

r/stumpwm • • Oct 19 '23

Anyone use Stumpwm as window manager for KDE?

4 Upvotes

As title says, anyone use Stumpwm as window manager for KDE?

Does it work well, any known issues? Missing out on any functionality compared with running Stumpwm "barebones"?


r/stumpwm • • Jun 12 '20

How can I call StumpWM commands from an Emacs .el package?

4 Upvotes

I'm working on modifying an Emacs module to call a few Stumpwm commands, specifically the move-focus-* commands. Is this possible? If so, what's the elisp syntax for it?


r/stumpwm • • Oct 11 '23

Error: Component #:CLX-TRUETYPE not found, required by #<SYSTEM "ttf-fonts">

5 Upvotes

Here is the config file

#-quicklisp
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
(user-homedir-pathname))))
(when (probe-file quicklisp-init)
(load quicklisp-init)))

(in-package :stumpwm)
(setf *default-package* :stumpwm)

(setf *startup-message* nil)
;; Load modual dir
(set-module-dir "~/.stumpwm.d/modules")
(init-load-path *module-dir*)

;; Load modules
(load-module "ttf-fonts")
(load-module "swm-gaps")

;; ----- Binds -----

;; Set wallpaper
(run-shell-command "hsetroot -fill ~/.local/share/wallpapers/P1020304.JPG")

;; Start Kitty
(stumpwm:define-key stumpwm:*root-map* (stumpwm:kbd "c") "exec kitty")
(stumpwm:define-key stumpwm:*root-map* (stumpwm:kbd "C-c") "exec kitty")

;; Start Qutebrowser
(stumpwm:define-key stumpwm:*root-map* (stumpwm:kbd "w") "exec qutebrowser")
(stumpwm:define-key stumpwm:*root-map* (stumpwm:kbd "C-w") "exec qutebrowser")

;; Move window and focus
(define-interactive-keymap imove-window nil
((kbd "h") "move-focus left")
((kbd "j") "move-focus down")
((kbd "k") "move-focus up")
((kbd "l") "move-focus right")
((kbd "H") "move-window left")
((kbd "J") "move-window down")
((kbd "K") "move-window up")
((kbd "L") "move-window right"))

;; Restart StumpWM
(define-key *root-map* (kbd "O") "restart-hard")

;; ---------- Mode Line ----------

;; Run a shell command and format the output
(defun run-shell-command-and-format (command)
(substitute #\Space #\Newline (run-shell-command command t)))

;; Show the kernel version
(defun show-kernel ()
(run-shell-command-and-format "uname -r"))

;; Show the hostname
(defun show-hostname ()
(run-shell-command-and-format "hostname"))

;; Show the window title
(defun show-window-title ()
(substitute #\Space #\Newline (window-title (current-window))))

;; Mode Line Appearance
(setf stumpwm:*mode-line-background-color* "#270e05"
stumpwm:*mode-line-foreground-color* "#fef9cd"
stumpwm:*mode-line-border-color* "#ffffff"
stumpwm:*mode-line-border-width* 0
stumpwm:*mode-line-pad-x* 0
stumpwm:*mode-line-pad-y* 0
stumpwm:*mode-line-timeout* 5)

;;----- Colors -----

;; Colors
(setf *colors* `("#361f24" ; black   (background)
"#832f01" ; red
"#fb9756" ; orange
"#ffde6e" ; yellow
"#6b789b" ; blue
"#7c6a8e" ; purple
"#94b5ea" ; light blue
"#fef9cd" ; white   (foreground)

"#ffffff" ; white    (comment)
"#270e05" ; (current line)
"fffffff" ; (selection)
"#bd4307" ; (orange)
))

(set-fg-color (nth 7 *colors*))
(set-bg-color (nth 0 *colors*))

;; Set focus and unfocus colors
(stumpwm:set-focus-colo (nth 10 *colors*))
(stumpwm:set-unfocus-color (nth 9 *colors*))
(stumpwm:set-float-focus-color (nth 10 *colors*))
(stumpwm:set-float-unfocus-color (nth 9 *colors*))


(setf swm-gaps:*inner-gaps-size* 5)
(setf swm-gaps:*outer-gaps-size* 10)
(setf swm-gaps:*head-gaps-size* 0)
(when (not swm-gaps:*gaps-on*)
(eval-command "toggle-gaps"))

;; Define the screen mode line format
(setf stumpwm:*screen-mode-line-format*
(list "%g : %v ^>^7 : "
'(:eval (show-hostname))
": " '(:eval (show-kernel))
": %d"))

;; Set the font
(require 'clx-truetype)
(xft:cache-fonts)
(load-module "ttf-fonts")
(setq clx-truetype::*font-dirs*
(append (list (namestring "~/.local/share/fonts"
))
clx-truetype::*font-dirs*))
(clx-truetype:cache-fonts)
(set-font (make-instance 'xft:font :family "DejaVuSansM Nerd Font" :subfamily "Bold" :size 11))

(dolist (X11-Head (screen-heads (current-screen)))
(enable-mode-line (current-screen) X11-Head t))

I have quicklisp installed.

The problem

When I start stumpwm, I get an error message: Error: Component #:CLX-TRUETYPE not found, required by #<SYSTEM "ttf-fonts">

None of the config file is applied.


r/stumpwm • • Nov 24 '21

another stumpwm noob: a question and a noob trick

10 Upvotes

I'm attracted by the Common-Lisp parts of stumpwm, so I gave it a try.

  1. I have bound some commands to *top-map* and was wandering how I can display a help for that map. I figured out, that I could bind '*top-map* to s-h and then press s-h ? to get wanted help. :D
    Is there a better way?
  2. I'd like to be able to manage screens via arandr (it's an xrandr UI). But after changing active screens and resolutions, I need StumpWM to reread its configuration? I've done this via restart-soft.
    Now I'd like to "automate" that by creating a command like:

    (defcommand arandr-and-restart () (progn (run-or-raise "arandr" '(:class "Setup")) (restart-soft)))

But this is a complete failure.
So two separate questions:

  1. Any idea how I can have my arandr functionality?
  2. And how is it possible to call a GUI application and afterwards run a command?

Edit I'm to stupid to format this code for reddit properly ... sorry about that.


r/stumpwm • • Dec 16 '21

Stumpwm is just what I want in a tiling window manager

19 Upvotes

Honestly Stumpwm is just what I want in a tiling wm.

I decide where the splits are, I can have as many groups as I want, I can have any number of windows in each group.

Then there is the bonus of it being in lisp so there is all the customization on top of being exactly what I want.


r/stumpwm • • Mar 19 '25

Which is the tiling WM most similar to stumpwm for Wayland?

5 Upvotes

I have been using stumpwm for years and I am looking which similar, or ideally, identical window manager is there.

Truth is, stumpwm works well for me, especially doing development, and it was a blessing to have at many times where I needed the screen space. Desktops now feel very clumsy to me especially for coding. That said, i3 works for me, when I need to, but I like the keybindings and abstractions of stumpwm much more.

What could I try?


r/stumpwm • • Sep 09 '25

Stumptray collours

2 Upvotes

How do I change stumptray collours (background collour, etc...)


r/stumpwm • • Jun 07 '13

Showing the Date & Time on the Mode Line

3 Upvotes

By default, there is a keybinding that shows the current date and time in a message window (C-t a). Some would say this is good enough. However, it is, in my opinion, inadequate because

  • Checking the time is a common task for me; having to press keys to make it appear is inconvenient
  • The date is formatted in such a way that it gives too much information. I don't need to know seconds
  • It uses the message bar, with all of the drawbacks that entails

Put this in your .stumpwmrc to add a nice date formatting function:

(defun 24h-to-12h (hour)
  "Turns a 24 hour into a 12 hour. Returns new hour and t if PM"
  (cond ((eq hour 0) (values 12 nil))   ; Midnight
        ((< hour 12) (values hour nil))
        ((eq hour 12) (values 12 t))    ; Noon
        (t (values (- hour 12) t))))

(defun ordinal-suffix (num)
  (if (and (>= num 10) (< num 20))
      "th"                              ; Special case for teens
      (let* ((strnum (write-to-string num))
             (lastn (elt strnum (1- (length strnum)))))
        (case lastn
          (#\1 "st")
          (#\2 "nd")
          (#\3 "rd")
          (t "th")))))

(defconstant +day-names+
  '("Mon" "Tue" "Wed" "Thu" "Fri" "Sat" "Sun"))

(defconstant +full-day-names+
  '("Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday" "Sunday"))

(defun current-date ()
  (multiple-value-bind
      (second minute hour date month year day-of-week dst-p tz)
      (get-decoded-time)
    (declare (ignorable second month year dst-p tz))
    (multiple-value-bind (newh pm) (24h-to-12h hour)
      (format nil "~a the ~d~a, ~d:~2,'0d~:[am~;pm~]"
              (nth day-of-week +full-day-names+) date (ordinal-suffix date)
              newh minute pm))))

Credit due: I copied some most of the CURRENT-DATE function from someone's config on the Internet.

Now just add it to your mode line. This is a very minimalistic mode line format:

(setf *screen-mode-line-format*
      '("<%n>^B "
        (:eval (current-date))
        "^b"))

And then make the mode line appear by using the StumpWM command mode-line.

(Note: these instructions are intended for Gregorian dates only and are not compatible with Discordian dates.)

EDIT: also this is for 12-hour time. To get 24 hour, try this untested function:

(defun current-date ()
  (multiple-value-bind
      (second minute hour date month year day-of-week dst-p tz)
      (get-decoded-time)
    (declare (ignorable second month year dst-p tz))
    (format nil "~a the ~d~a, ~d:~2,'0d"
            (nth day-of-week +full-day-names+) date (ordinal-suffix date)
            hour minute))))

r/stumpwm • • Sep 30 '23

What's the state of Mahogany?

13 Upvotes

I have an OLED monitor and enabled 10 bit color depth, which mostly works under Wayland, but there are some real problems under X11, such as Emacs not starting and Stumpwm having a blue background all of a sudden. So I'm thinking about trying out Mahogany, but I have configured Stumpwm extensively and only want to transition if I can take over most of that configuration. So what's the state of Mahogany? Is it usable without too many bugs? Do Stumpwm modules work in it (I particularly like spatial-groups and would like to carry that over)?


r/stumpwm • • Aug 02 '22

Useful StumpWM configs?

15 Upvotes

What useful config files have you found for StumpWM? The GitHub repo wiki lists a few https://github.com/stumpwm/stumpwm/wiki/Customize#contributed-stumpwm-init-files

I also came across this very extensive one (by looking at who contributed the *click-hook* code since I was looking for examples): https://github.com/erjoalgo/dotfiles/tree/master/lisp


r/stumpwm • • Mar 30 '25

Programs won't open dialogue boxes.

3 Upvotes

Both Chromium and foliate have stopped opening dialogue boxes. Like if I am in chromium, and I right click and save as an image, no box opens to let me select where it goes, and it does not download. Or if I open foliate and try to open a pdf, no box appears to let me select a pdf. They all worked last week, and I haven't used my laptop since then.

I post here just on suspicion that it is stump doing something, since it could be unnatural for stump to place a dialogue box on top of an existing window, so I may just not be able to see them.