Add stumpwm configuration
This commit is contained in:
parent
7e621a8a22
commit
d8094dbd63
3 changed files with 82 additions and 3 deletions
|
@ -60,6 +60,9 @@
|
|||
home-polybar-configuration))
|
||||
#:use-module ((oni home services rofi)
|
||||
#:select (home-rofi-default-service))
|
||||
#:use-module ((oni home services stumpwm)
|
||||
#:select (home-stumpwm-service-type
|
||||
home-stumpwm-configuration))
|
||||
#:use-module ((oni home services syncthing)
|
||||
#:select (home-syncthing-service-type))
|
||||
#:use-module ((oni home services zsh)
|
||||
|
@ -157,8 +160,7 @@
|
|||
mpd-random-albums
|
||||
emacs-inkplate
|
||||
emacs-outli
|
||||
emacs-oni-org-roam
|
||||
stumpwm+swank))
|
||||
emacs-oni-org-roam))
|
||||
|
||||
(services
|
||||
(list
|
||||
|
@ -228,4 +230,8 @@
|
|||
#:path "/tmp/mpd.fifo"
|
||||
#:format "44100:16:2")))))
|
||||
(service home-mpc-update-service-type)
|
||||
(service home-mpd-notify-service-type))))
|
||||
(service home-mpd-notify-service-type)
|
||||
|
||||
(service home-stumpwm-service-type
|
||||
(home-stumpwm-configuration
|
||||
(package stumpwm+swank))))))
|
||||
|
|
43
oni/home/services/stumpwm.scm
Normal file
43
oni/home/services/stumpwm.scm
Normal file
|
@ -0,0 +1,43 @@
|
|||
(define-module (oni home services stumpwm)
|
||||
#:use-module ((gnu services configuration)
|
||||
#:select (serialize-package
|
||||
define-configuration))
|
||||
#:use-module ((gnu packages wm)
|
||||
#:select (stumpwm))
|
||||
#:use-module ((gnu home services)
|
||||
#:select (service-type
|
||||
service-extension
|
||||
home-profile-service-type
|
||||
home-xdg-configuration-files-service-type))
|
||||
#:use-module ((guix gexp)
|
||||
#:select (local-file))
|
||||
#:use-module ((guix packages)
|
||||
#:select (package?))
|
||||
|
||||
#:export (home-stumpwm-service-type
|
||||
home-stumpwm-configuration))
|
||||
|
||||
(define-configuration home-stumpwm-configuration
|
||||
(package
|
||||
(package stumpwm)
|
||||
"Package to use for setting Stumpwm"))
|
||||
|
||||
(define (add-stumpwm-packages config)
|
||||
(list (home-stumpwm-configuration-package config)))
|
||||
|
||||
(define (home-stumpwm-config-files config)
|
||||
`(("stumpwm/config" ,(local-file "stumpwm/config"))))
|
||||
|
||||
(define home-stumpwm-service-type
|
||||
(service-type
|
||||
(name 'home-stumpwm)
|
||||
(extensions
|
||||
(list (service-extension
|
||||
home-profile-service-type
|
||||
add-stumpwm-packages)
|
||||
(service-extension
|
||||
home-xdg-configuration-files-service-type
|
||||
home-stumpwm-config-files)))
|
||||
(compose identity)
|
||||
(default-value (home-stumpwm-configuration))
|
||||
(description "Install and configure stumpwm.")))
|
30
oni/home/services/stumpwm/config
Normal file
30
oni/home/services/stumpwm/config
Normal file
|
@ -0,0 +1,30 @@
|
|||
;; -*- mode: lisp; -*-
|
||||
(in-package :stumpwm-user)
|
||||
|
||||
(require 'swank)
|
||||
|
||||
(set-prefix-key (kbd "s-x"))
|
||||
|
||||
(defcommand raise-browser () ()
|
||||
"Open or show my browser"
|
||||
(run-or-raise "firefox" '(:class "firefox")))
|
||||
|
||||
(defcommand raise-emacs () ()
|
||||
"Open or show Emacs"
|
||||
(run-or-raise "emacsclient -c" '(:class "Emacs")))
|
||||
|
||||
(defcommand raise-terminal () ()
|
||||
"Open or show my terminal"
|
||||
(run-or-raise "kitty" '(:class "kitty")))
|
||||
|
||||
(define-key *top-map* (kbd "s-b") "raise-browser")
|
||||
(define-key *top-map* (kbd "s-e") "raise-emacs")
|
||||
(define-key *top-map* (kbd "s-t") "raise-terminal")
|
||||
|
||||
(define-remapped-keys
|
||||
'(("teams-for-linux"
|
||||
("C-M-Break" . "C-S-m"))))
|
||||
|
||||
(mode-line)
|
||||
(restore-from-file "default")
|
||||
(swank:create-server :dont-close t)
|
Loading…
Reference in a new issue