From: Nam Nguyen <namn@berkeley.edu>
To: 33753@debbugs.gnu.org
Subject: [bug#33753] stumpwm-contrib
Date: Fri, 14 Dec 2018 18:50:31 -0800 [thread overview]
Message-ID: <20181215025031.GA2694@antelope> (raw)
In-Reply-To: <20181215020600.2713-1-namn@berkeley.edu>
I am trying to make stumpwm-contrib less of a "grab bag" and more modular
and well-tested by breaking all the stumpwm extensions/modules into
separate recipes.
stumpwm-contrib deletes the source code and child
recipes copies their source code from their directory to
$(out)/share/common-lisp/stumpwm-contrib.
To test this, install stumpwm and stumpwm-cpu.
~/.stumpwmrc
********************************************************************************
(set-module-dir "~/.guix-profile/share/common-lisp/sbcl-bundle-systems")
(load-module "cpu")
(setf *screen-mode-line-format* '("%c %C %t %f [%n] %W"))
;; %c (CPU usage as %)
;; %C (CPU usage as bar graph)
;; %t (CPU temperature)
;; %f (CPU frequency)
********************************************************************************
To toggle the mode-line:
C-t semicolon mode-line <RET>
I violated the "Don't Repeat Yourself" (DRY) principle and have
stumpwm-{battery-portable,cpu,mem,pinentry,winner-mode} all tested and
working. I will postpone submission of those until stumpwm-cpu has been
accepted. All these submodules are nearly identical with only different
cat and mod variables. pinentry has some additional inputs. This results
in a lot of repeated code that looks nearly identical to stumpwm-cpu.
Another concern I had was for ~/.stumpwmrc, including sbcl-bundle-systems
(which contains symlinks to the compiled code) is necessary for
stumpwm-pinentry to work correctly. The other plugins can just use the
stumpwm-contrib directory I created.
;; (set-module-dir "~/.guix-profile/share/common-lisp/stumpwm-contrib")
(set-module-dir "~/.guix-profile/share/common-lisp/sbcl-bundle-systems")
Documentation (org-mode files) can be found in the stumpwm-contrib
directory.
Here is the general directory structure:
********************************************************************************
/home/user/.guix-profile/share/common-lisp:
.
..
sbcl-bundle-systems
stumpwm-contrib
/home/user/.guix-profile/share/common-lisp/sbcl-bundle-systems:
.
..
battery-portable.asd -> /gnu/store/...-stumpwm-battery-portable-0.0.1-1.bd47cec/share/common-lisp/sbcl-bundle-systems/battery-portable.asd
cpu.asd -> /gnu/store/...-stumpwm-cpu-0.0.1-1.bd47cec/share/common-lisp/sbcl-bundle-systems/cpu.asd
mem.asd -> /gnu/store/...-stumpwm-mem-0.0.1-1.bd47cec/share/common-lisp/sbcl-bundle-systems/mem.asd
pinentry.asd -> /gnu/store/...-stumpwm-pinentry-0.0.1-1.bd47cec/share/common-lisp/sbcl-bundle-systems/pinentry.asd
swm-gaps.asd -> /gnu/store/...-stumpwm-gaps-0.0.1-1.bd47cec/share/common-lisp/sbcl-bundle-systems/swm-gaps.asd
winner-mode.asd -> /gnu/store/...-stumpwm-winner-mode-0.0.1-1.bd47cec/share/common-lisp/sbcl-bundle-systems/winner-mode.asd
/home/user/.guix-profile/share/common-lisp/stumpwm-contrib:
.
..
battery-portable -> /gnu/store/...-stumpwm-battery-portable-0.0.1-1.bd47cec/share/common-lisp/stumpwm-contrib/battery-portable
cpu -> /gnu/store/...-stumpwm-cpu-0.0.1-1.bd47cec/share/common-lisp/stumpwm-contrib/cpu
mem -> /gnu/store/...-stumpwm-mem-0.0.1-1.bd47cec/share/common-lisp/stumpwm-contrib/mem
pinentry -> /gnu/store/...-stumpwm-pinentry-0.0.1-1.bd47cec/share/common-lisp/stumpwm-contrib/pinentry
swm-gaps -> /gnu/store/...-stumpwm-gaps-0.0.1-1.bd47cec/share/common-lisp/stumpwm-contrib/swm-gaps
winner-mode -> /gnu/store/...-stumpwm-winner-mode-0.0.1-1.bd47cec/share/common-lisp/stumpwm-contrib/winner-mode
/home/user/.guix-profile/share/common-lisp/stumpwm-contrib/cpu:
.
..
cpu.asd
cpu.lisp
package.lisp
README.org
********************************************************************************
Summary of questions:
1. Should the entire repository be bundled together instead of breaking
it into individual modules?
2. Should asdf-build-system/source be used instead of sbcl? I had initially
copied the entire repository with all the source code, and it still worked.
3. Is there a way to by more DRY?
4. Should the stumpwm-contrib directory be named sbcl-sources (can't
recall the default directory of asdf-build-system/source)?
next prev parent reply other threads:[~2018-12-15 2:52 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-15 2:06 [bug#33753] [PATCH 1/3] gnu: Add stumpwm-contrib Nam Nguyen
2018-12-15 2:09 ` [bug#33753] [PATCH 2/3] gnu: Add stumpwm-cpu Nam Nguyen
2018-12-15 2:09 ` [bug#33753] [PATCH 3/3] gnu: emacs-stumpwm-mode: Use source and version of stumpwm-cpu Nam Nguyen
2018-12-15 2:50 ` Nam Nguyen [this message]
2018-12-21 17:06 ` [bug#33753] stumpwm-contrib Ludovic Courtès
2018-12-21 18:18 ` Pierre Neidhardt
[not found] ` <875zvlv8r1.fsf@dustycloud.org>
2018-12-24 10:01 ` Nam Nguyen
2018-12-24 10:14 ` Pierre Neidhardt
2018-12-24 10:20 ` Efraim Flashner
2018-12-25 9:01 ` Nam Nguyen
2018-12-26 7:13 ` Nam Nguyen
2018-12-27 10:51 ` Pierre Neidhardt
2018-12-24 9:21 ` [bug#33753] [PATCH 1/3] gnu: Add stumpwm modules Nam Nguyen
2018-12-24 9:21 ` [bug#33753] [PATCH 2/3] gnu: Add sbcl-percent-encoding Nam Nguyen
2018-12-24 9:21 ` [bug#33753] [PATCH 3/3] gnu: emacs-stumpwm-mode: Use source and version of stumpwm-cpu Nam Nguyen
2018-12-25 8:19 ` [bug#33753] [PATCH 1/3] gnu: Add stumpwm modules Nam Nguyen
2018-12-25 8:19 ` [bug#33753] [PATCH 2/3] gnu: Add sbcl-percent-encoding Nam Nguyen
2020-03-23 7:16 ` [bug#33753] [PATCH 0/3] ttf-fonts module in StumpWM Oleg Pykhalov
2020-03-23 7:24 ` [bug#33753] [PATCH 1/3] gnu: Add sbcl-clx-truetype Oleg Pykhalov
2020-03-23 7:24 ` [bug#33753] [PATCH 2/3] gnu: emacs-stumpwm-mode: Update to 0.0.1-1.dd5b037 Oleg Pykhalov
2020-03-23 7:24 ` [bug#33753] [PATCH 3/3] gnu: Add sbcl-stumpwm-ttf-fonts Oleg Pykhalov
2020-03-23 9:06 ` [bug#33753] [PATCH 1/3] gnu: Add sbcl-clx-truetype Guillaume Le Vaillant
2020-03-30 20:24 ` bug#33753: " Oleg Pykhalov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181215025031.GA2694@antelope \
--to=namn@berkeley.edu \
--cc=33753@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).