Compare commits
15 commits
a6be36fcbb
...
e6a5c692d3
Author | SHA1 | Date | |
---|---|---|---|
e6a5c692d3 | |||
8187a45c31 | |||
150273d741 | |||
0e0fccec88 | |||
0f6732d1c9 | |||
edfc8c2558 | |||
ee001a23f5 | |||
4cca6074fa | |||
9679603547 | |||
d968a40a27 | |||
94fe5db261 | |||
7a53f8302a | |||
cb90aa8b43 | |||
28ff76fc03 | |||
1cb472dd97 |
10 changed files with 400 additions and 91 deletions
|
@ -91,6 +91,7 @@
|
||||||
"alias scsh=\"rlwrap scsh\"\n"
|
"alias scsh=\"rlwrap scsh\"\n"
|
||||||
"alias sbcl=\"rlwrap sbcl\"\n"
|
"alias sbcl=\"rlwrap sbcl\"\n"
|
||||||
"alias hc=herbstclient\n"
|
"alias hc=herbstclient\n"
|
||||||
|
"alias reco=\"pushd ~/projects/new-dotfiles/ && guix home reconfigure config.scm; popd\"\n"
|
||||||
"setopt SHARE_HISTORY\n"
|
"setopt SHARE_HISTORY\n"
|
||||||
"setopt HIST_IGNORE_ALL_DUPS\n"
|
"setopt HIST_IGNORE_ALL_DUPS\n"
|
||||||
"setopt HIST_IGNORE_SPACE\n"
|
"setopt HIST_IGNORE_SPACE\n"
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
#:select (home-environment))
|
#:select (home-environment))
|
||||||
#:use-module ((gnu packages certs)
|
#:use-module ((gnu packages certs)
|
||||||
#:select (nss-certs))
|
#:select (nss-certs))
|
||||||
|
#:use-module ((gnu packages cdrom)
|
||||||
|
#:select (abcde))
|
||||||
#:use-module ((gnu packages databases)
|
#:use-module ((gnu packages databases)
|
||||||
#:select (recutils
|
#:select (recutils
|
||||||
emacs-rec-mode))
|
emacs-rec-mode))
|
||||||
|
@ -68,7 +70,10 @@
|
||||||
#:select (home-dunst-default-service))
|
#:select (home-dunst-default-service))
|
||||||
#:use-module ((oni home services emacs)
|
#:use-module ((oni home services emacs)
|
||||||
#:select (home-emacs-service-type
|
#:select (home-emacs-service-type
|
||||||
home-emacs-configuration))
|
home-emacs-configuration
|
||||||
|
home-emacs-helpful-service-type
|
||||||
|
home-emacs-helpful-configuration
|
||||||
|
home-emacs-yasnippet-capf-service-type))
|
||||||
#:use-module ((oni home services environment)
|
#:use-module ((oni home services environment)
|
||||||
#:select (home-environment-service))
|
#:select (home-environment-service))
|
||||||
#:use-module ((oni home services flameshot)
|
#:use-module ((oni home services flameshot)
|
||||||
|
@ -94,14 +99,19 @@
|
||||||
#:select (home-rofi-default-service))
|
#:select (home-rofi-default-service))
|
||||||
#:use-module ((oni home services stumpwm)
|
#:use-module ((oni home services stumpwm)
|
||||||
#:select (home-stumpwm-service-type
|
#:select (home-stumpwm-service-type
|
||||||
home-stumpwm-configuration))
|
home-stumpwm-configuration
|
||||||
|
home-stumpwm-gaps-service-type
|
||||||
|
home-stumpwm-gaps-configuration
|
||||||
|
home-stumpwm-stumptray-service-type
|
||||||
|
home-stumpwm-stumptray-configuration))
|
||||||
#:use-module ((oni home services syncthing)
|
#:use-module ((oni home services syncthing)
|
||||||
#:select (home-syncthing-service-type))
|
#:select (home-syncthing-service-type))
|
||||||
#:use-module ((oni home services utilities)
|
#:use-module ((oni home services utilities)
|
||||||
#:select (home-inkplate-display-service-type))
|
#:select (home-inkplate-display-service-type))
|
||||||
#:use-module ((oni home services zsh)
|
#:use-module ((oni home services zsh)
|
||||||
#:select (home-zsh-syntax-highlighting-service-type
|
#:select (home-zsh-syntax-highlighting-service-type
|
||||||
home-zsh-autosuggestions-service-type))
|
home-zsh-autosuggestions-service-type
|
||||||
|
home-zsh-autopair-service-type))
|
||||||
#:use-module ((oni packages count-emails)
|
#:use-module ((oni packages count-emails)
|
||||||
#:select (count-emails))
|
#:select (count-emails))
|
||||||
#:use-module ((oni packages emacs)
|
#:use-module ((oni packages emacs)
|
||||||
|
@ -238,6 +248,7 @@
|
||||||
gforth
|
gforth
|
||||||
recutils
|
recutils
|
||||||
emacs-rec-mode
|
emacs-rec-mode
|
||||||
|
abcde
|
||||||
;; Might be needed for certain icons?
|
;; Might be needed for certain icons?
|
||||||
hicolor-icon-theme
|
hicolor-icon-theme
|
||||||
;; Might be needed for cetrificates
|
;; Might be needed for cetrificates
|
||||||
|
@ -261,6 +272,7 @@
|
||||||
;; configuration last.
|
;; configuration last.
|
||||||
(service home-zsh-syntax-highlighting-service-type)
|
(service home-zsh-syntax-highlighting-service-type)
|
||||||
(service home-zsh-autosuggestions-service-type)
|
(service home-zsh-autosuggestions-service-type)
|
||||||
|
(service home-zsh-autopair-service-type)
|
||||||
|
|
||||||
(simple-service 'my-channel-service
|
(simple-service 'my-channel-service
|
||||||
home-channels-service-type
|
home-channels-service-type
|
||||||
|
@ -273,6 +285,15 @@
|
||||||
"646573578b7adfbff415645fed201269076cebf6"
|
"646573578b7adfbff415645fed201269076cebf6"
|
||||||
(openpgp-fingerprint
|
(openpgp-fingerprint
|
||||||
"061C C5C4 D936 C9A8 AECC 1A17 7D5C 407B 4350 25C1"))))
|
"061C C5C4 D936 C9A8 AECC 1A17 7D5C 407B 4350 25C1"))))
|
||||||
|
(channel
|
||||||
|
(name 'nonguix)
|
||||||
|
(url "https://gitlab.com/nonguix/nonguix")
|
||||||
|
;; Enable signature verification:
|
||||||
|
(introduction
|
||||||
|
(make-channel-introduction
|
||||||
|
"897c1a470da759236cc11798f4e0a5f7d4d59fbc"
|
||||||
|
(openpgp-fingerprint
|
||||||
|
"2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5"))))
|
||||||
(channel
|
(channel
|
||||||
(name 'guix-gaming-games)
|
(name 'guix-gaming-games)
|
||||||
(url "https://gitlab.com/guix-gaming-channels/games.git")
|
(url "https://gitlab.com/guix-gaming-channels/games.git")
|
||||||
|
@ -312,6 +333,12 @@
|
||||||
"(load custom-file)\n"
|
"(load custom-file)\n"
|
||||||
"(provide 'init)\n"
|
"(provide 'init)\n"
|
||||||
";;; init.el ends here\n")))))
|
";;; init.el ends here\n")))))
|
||||||
|
(service home-emacs-helpful-service-type
|
||||||
|
(home-emacs-helpful-configuration
|
||||||
|
(configurations
|
||||||
|
(list
|
||||||
|
(local-file "../services/emacs/oni-helpful.el")))))
|
||||||
|
(service home-emacs-yasnippet-capf-service-type)
|
||||||
|
|
||||||
(service home-flameshot-service-type)
|
(service home-flameshot-service-type)
|
||||||
|
|
||||||
|
@ -335,7 +362,19 @@
|
||||||
|
|
||||||
(service home-stumpwm-service-type
|
(service home-stumpwm-service-type
|
||||||
(home-stumpwm-configuration
|
(home-stumpwm-configuration
|
||||||
(package stumpwm+swank)))
|
(package stumpwm+swank)
|
||||||
|
(configurations
|
||||||
|
(list (local-file "../services/stumpwm/config")))))
|
||||||
|
(service home-stumpwm-gaps-service-type
|
||||||
|
(home-stumpwm-gaps-configuration
|
||||||
|
(configurations
|
||||||
|
(list (local-file "../services/stumpwm/config-gaps")))))
|
||||||
|
(service home-stumpwm-stumptray-service-type
|
||||||
|
(home-stumpwm-stumptray-configuration
|
||||||
|
(configurations
|
||||||
|
(list (mixed-text-file "config-stumptray"
|
||||||
|
"(require 'stumptray)\n"
|
||||||
|
"(stumptray::stumptray)\n")))))
|
||||||
|
|
||||||
(service home-inkplate-display-service-type)
|
(service home-inkplate-display-service-type)
|
||||||
(service home-notmuch-service-type
|
(service home-notmuch-service-type
|
||||||
|
|
|
@ -2,10 +2,13 @@
|
||||||
#:use-module ((gnu services configuration)
|
#:use-module ((gnu services configuration)
|
||||||
#:select (serialize-package
|
#:select (serialize-package
|
||||||
define-configuration
|
define-configuration
|
||||||
|
define-configuration/no-serialization
|
||||||
text-config?
|
text-config?
|
||||||
serialize-text-config))
|
serialize-text-config))
|
||||||
#:use-module ((gnu packages emacs)
|
#:use-module ((gnu packages emacs)
|
||||||
#:select (emacs))
|
#:select (emacs))
|
||||||
|
#:use-module ((gnu packages emacs-xyz)
|
||||||
|
#:select (emacs-helpful))
|
||||||
#:use-module ((gnu home services)
|
#:use-module ((gnu home services)
|
||||||
#:select (service-type
|
#:select (service-type
|
||||||
service-extension
|
service-extension
|
||||||
|
@ -22,13 +25,27 @@
|
||||||
#:use-module ((guix packages)
|
#:use-module ((guix packages)
|
||||||
#:select (package?))
|
#:select (package?))
|
||||||
|
|
||||||
|
#:use-module ((oni packages emacs)
|
||||||
|
#:select (emacs-yasnippet-capf))
|
||||||
|
|
||||||
#:export (home-emacs-service-type
|
#:export (home-emacs-service-type
|
||||||
home-emacs-configuration))
|
home-emacs-configuration
|
||||||
|
|
||||||
|
home-emacs-helpful-service-type
|
||||||
|
home-emacs-helpful-configuration
|
||||||
|
|
||||||
|
home-emacs-yasnippet-capf-service-type
|
||||||
|
home-emacs-yasnippet-capf-configuration))
|
||||||
|
|
||||||
|
(define-configuration/no-serialization home-emacs-extension
|
||||||
|
(configurations
|
||||||
|
(text-config '())
|
||||||
|
"The configuration for the extension."))
|
||||||
|
|
||||||
(define-configuration home-emacs-configuration
|
(define-configuration home-emacs-configuration
|
||||||
(package
|
(package
|
||||||
(package emacs)
|
(package emacs)
|
||||||
"Package to use for setting Emacs")
|
"Package to use for setting Emacs")
|
||||||
(configurations
|
(configurations
|
||||||
(text-config '())
|
(text-config '())
|
||||||
"A list of other configuration files to autoload"))
|
"A list of other configuration files to autoload"))
|
||||||
|
@ -36,6 +53,13 @@
|
||||||
(define (add-emacs-packages config)
|
(define (add-emacs-packages config)
|
||||||
(list (home-emacs-configuration-package config)))
|
(list (home-emacs-configuration-package config)))
|
||||||
|
|
||||||
|
(define (home-emacs-extensions original-config extension-configs)
|
||||||
|
(home-emacs-configuration
|
||||||
|
(inherit original-config)
|
||||||
|
(configurations
|
||||||
|
(apply append (home-emacs-configuration-configurations original-config)
|
||||||
|
(map home-emacs-extension-configurations extension-configs)))))
|
||||||
|
|
||||||
(define (home-emacs-shepherd-service config)
|
(define (home-emacs-shepherd-service config)
|
||||||
(list
|
(list
|
||||||
(shepherd-service
|
(shepherd-service
|
||||||
|
@ -69,5 +93,68 @@
|
||||||
home-files-service-type
|
home-files-service-type
|
||||||
home-emacs-config-files)))
|
home-emacs-config-files)))
|
||||||
(compose identity)
|
(compose identity)
|
||||||
|
(extend home-emacs-extensions)
|
||||||
(default-value (home-emacs-configuration))
|
(default-value (home-emacs-configuration))
|
||||||
(description "Install and configure Emacs.")))
|
(description "Install and configure Emacs.")))
|
||||||
|
|
||||||
|
(define-configuration/no-serialization home-emacs-helpful-configuration
|
||||||
|
(package
|
||||||
|
(package emacs-helpful)
|
||||||
|
"Package to use for setting emacs-helpful.")
|
||||||
|
(configurations
|
||||||
|
(text-config '())
|
||||||
|
"Configuration for emacs-helpful."))
|
||||||
|
|
||||||
|
(define (add-emacs-helpful config)
|
||||||
|
(home-emacs-extension
|
||||||
|
(configurations (home-emacs-helpful-configuration-configurations config))))
|
||||||
|
|
||||||
|
(define (add-emacs-helpful-packages config)
|
||||||
|
(list (home-emacs-helpful-configuration-package config)))
|
||||||
|
|
||||||
|
(define home-emacs-helpful-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'home-emacs-helpful)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension
|
||||||
|
home-emacs-service-type
|
||||||
|
add-emacs-helpful)
|
||||||
|
(service-extension
|
||||||
|
home-profile-service-type
|
||||||
|
add-emacs-helpful-packages)))
|
||||||
|
(compose identity)
|
||||||
|
(default-value (home-emacs-helpful-configuration))
|
||||||
|
(description "Install and configure emacs-helpful.")))
|
||||||
|
|
||||||
|
(define-configuration/no-serialization home-emacs-yasnippet-capf-configuration
|
||||||
|
(package
|
||||||
|
(package emacs-yasnippet-capf)
|
||||||
|
"Package to use for setting emacs-yasnippet-capf.")
|
||||||
|
(configurations
|
||||||
|
(text-config '())
|
||||||
|
"Configuration for emacs-yasnippet-capf."))
|
||||||
|
|
||||||
|
(define (add-emacs-yasnippet-capf config)
|
||||||
|
(home-emacs-extension
|
||||||
|
(configurations
|
||||||
|
(append
|
||||||
|
(list (mixed-text-file "yasnippet-capf-config"
|
||||||
|
"(with-eval-after-load 'minibuffer (add-to-list 'completion-at-point-functions #'yasnippet-capf))\n"))
|
||||||
|
(home-emacs-yasnippet-capf-configuration-configurations config)))))
|
||||||
|
|
||||||
|
(define (add-emacs-yasnippet-capf-packages config)
|
||||||
|
(list (home-emacs-yasnippet-capf-configuration-package config)))
|
||||||
|
|
||||||
|
(define home-emacs-yasnippet-capf-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'home-yasnippet-capf)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension
|
||||||
|
home-emacs-service-type
|
||||||
|
add-emacs-yasnippet-capf)
|
||||||
|
(service-extension
|
||||||
|
home-profile-service-type
|
||||||
|
add-emacs-yasnippet-capf-packages)))
|
||||||
|
(compose identity)
|
||||||
|
(default-value (home-emacs-yasnippet-capf-configuration))
|
||||||
|
(description "Install and configure emacs-yasnippet-capf.")))
|
||||||
|
|
37
oni/home/services/emacs/oni-helpful.el
Normal file
37
oni/home/services/emacs/oni-helpful.el
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
;;; oni-helpful.el --- Helpful configuration -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;; Copyright (C) 2023 Tom Willemse
|
||||||
|
|
||||||
|
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||||
|
;; Keywords: local
|
||||||
|
|
||||||
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
|
;; it under the terms of the GNU General Public License as published by
|
||||||
|
;; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
;; (at your option) any later version.
|
||||||
|
|
||||||
|
;; This program is distributed in the hope that it will be useful,
|
||||||
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
;; GNU General Public License for more details.
|
||||||
|
|
||||||
|
;; You should have received a copy of the GNU General Public License
|
||||||
|
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;; This is my helpful configuration.
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(use-package helpful
|
||||||
|
:bind (([remap describe-callable] . helpful-callable)
|
||||||
|
([remap describe-function] . helpful-function)
|
||||||
|
("C-h M" . helpful-macro)
|
||||||
|
([remap describe-command] . helpful-command)
|
||||||
|
([remap describe-key] . helpful-key)
|
||||||
|
([remap describe-variable] . helpful-variable)
|
||||||
|
("C-h T" . helpful--at-point)))
|
||||||
|
|
||||||
|
(provide 'oni-helpful)
|
||||||
|
;;; oni-helpful.el ends here
|
|
@ -1,13 +1,18 @@
|
||||||
(define-module (oni home services stumpwm)
|
(define-module (oni home services stumpwm)
|
||||||
|
#:use-module ((srfi srfi-1) #:select (every))
|
||||||
#:use-module ((gnu services configuration)
|
#:use-module ((gnu services configuration)
|
||||||
#:select (serialize-package
|
#:select (serialize-package
|
||||||
define-configuration))
|
define-configuration
|
||||||
|
define-configuration/no-serialization
|
||||||
|
text-config?
|
||||||
|
serialize-text-config))
|
||||||
#:use-module ((gnu packages lisp)
|
#:use-module ((gnu packages lisp)
|
||||||
#:select (sbcl))
|
#:select (sbcl))
|
||||||
#:use-module ((gnu packages wm)
|
#:use-module ((gnu packages wm)
|
||||||
#:select (stumpwm
|
#:select (stumpwm
|
||||||
stumpish
|
stumpish
|
||||||
sbcl-stumpwm-swm-gaps))
|
sbcl-stumpwm-swm-gaps
|
||||||
|
sbcl-stumpwm-stumptray))
|
||||||
#:use-module ((gnu home services)
|
#:use-module ((gnu home services)
|
||||||
#:select (service-type
|
#:select (service-type
|
||||||
service-extension
|
service-extension
|
||||||
|
@ -17,33 +22,55 @@
|
||||||
#:use-module ((guix gexp)
|
#:use-module ((guix gexp)
|
||||||
#:select (local-file
|
#:select (local-file
|
||||||
gexp
|
gexp
|
||||||
file-append))
|
file-append
|
||||||
|
mixed-text-file))
|
||||||
#:use-module ((guix packages)
|
#:use-module ((guix packages)
|
||||||
#:select (package?))
|
#:select (package?))
|
||||||
|
|
||||||
#:export (home-stumpwm-service-type
|
#:export (home-stumpwm-service-type
|
||||||
home-stumpwm-configuration))
|
home-stumpwm-configuration
|
||||||
|
home-stumpwm-extension
|
||||||
|
|
||||||
|
home-stumpwm-gaps-service-type
|
||||||
|
home-stumpwm-gaps-configuration
|
||||||
|
|
||||||
|
home-stumpwm-stumptray-service-type
|
||||||
|
home-stumpwm-stumptray-configuration))
|
||||||
|
|
||||||
|
(define-configuration/no-serialization home-stumpwm-extension
|
||||||
|
(configurations
|
||||||
|
(text-config '())
|
||||||
|
"The configuration for the extension."))
|
||||||
|
|
||||||
(define-configuration home-stumpwm-configuration
|
(define-configuration home-stumpwm-configuration
|
||||||
(package
|
(package
|
||||||
(package stumpwm)
|
(package stumpwm)
|
||||||
"Package to use for setting Stumpwm")
|
"Package to use for setting Stumpwm")
|
||||||
(gaps-package
|
(configurations
|
||||||
(package sbcl-stumpwm-swm-gaps)
|
(text-config '())
|
||||||
"Package to use for setting Stumpwm Gaps")
|
"The configuration to apply.")
|
||||||
(stumpish-package
|
(stumpish-package
|
||||||
(package stumpish)
|
(package stumpish)
|
||||||
"Package to use for setting Stumpish"))
|
"Package to use for setting Stumpish"))
|
||||||
|
|
||||||
(define (add-stumpwm-packages config)
|
(define (add-stumpwm-packages config)
|
||||||
(list sbcl
|
(append (list sbcl
|
||||||
(home-stumpwm-configuration-package config)
|
(home-stumpwm-configuration-package config)
|
||||||
(list stumpwm "lib")
|
(list stumpwm "lib")
|
||||||
(home-stumpwm-configuration-stumpish-package config)
|
(home-stumpwm-configuration-stumpish-package config))))
|
||||||
(home-stumpwm-configuration-gaps-package config)))
|
|
||||||
|
(define (home-stumpwm-extensions original-config extension-configs)
|
||||||
|
(home-stumpwm-configuration
|
||||||
|
(inherit original-config)
|
||||||
|
(configurations
|
||||||
|
(apply append (home-stumpwm-configuration-configurations original-config)
|
||||||
|
(map home-stumpwm-extension-configurations extension-configs)))))
|
||||||
|
|
||||||
(define (home-stumpwm-config-files config)
|
(define (home-stumpwm-config-files config)
|
||||||
`(("stumpwm/config" ,(local-file "stumpwm/config"))))
|
`(("stumpwm/config"
|
||||||
|
,(mixed-text-file
|
||||||
|
"config"
|
||||||
|
(serialize-text-config config (home-stumpwm-configuration-configurations config))))))
|
||||||
|
|
||||||
(define (reload-stumpwm-config-gexp _)
|
(define (reload-stumpwm-config-gexp _)
|
||||||
`(("files/.config/stumpwm/config"
|
`(("files/.config/stumpwm/config"
|
||||||
|
@ -63,5 +90,64 @@
|
||||||
home-run-on-change-service-type
|
home-run-on-change-service-type
|
||||||
reload-stumpwm-config-gexp)))
|
reload-stumpwm-config-gexp)))
|
||||||
(compose identity)
|
(compose identity)
|
||||||
|
(extend home-stumpwm-extensions)
|
||||||
(default-value (home-stumpwm-configuration))
|
(default-value (home-stumpwm-configuration))
|
||||||
(description "Install and configure stumpwm.")))
|
(description "Install and configure stumpwm.")))
|
||||||
|
|
||||||
|
(define-configuration/no-serialization home-stumpwm-gaps-configuration
|
||||||
|
(package
|
||||||
|
(package sbcl-stumpwm-swm-gaps)
|
||||||
|
"Package to use for setting stumpwm-gaps.")
|
||||||
|
(configurations
|
||||||
|
(text-config '())
|
||||||
|
"Configuration for stumpwm gaps"))
|
||||||
|
|
||||||
|
(define (add-stumpwm-gaps config)
|
||||||
|
(home-stumpwm-extension
|
||||||
|
(configurations (home-stumpwm-gaps-configuration-configurations config))))
|
||||||
|
|
||||||
|
(define (add-stumpwm-gaps-packages config)
|
||||||
|
(list (home-stumpwm-gaps-configuration-package config)))
|
||||||
|
|
||||||
|
(define home-stumpwm-gaps-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'home-stumpwm-gaps)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension
|
||||||
|
home-stumpwm-service-type
|
||||||
|
add-stumpwm-gaps)
|
||||||
|
(service-extension
|
||||||
|
home-profile-service-type
|
||||||
|
add-stumpwm-gaps-packages)))
|
||||||
|
(compose identity)
|
||||||
|
(default-value (home-stumpwm-gaps-configuration))
|
||||||
|
(description "Install and configure stumpwm-gaps.")))
|
||||||
|
|
||||||
|
(define-configuration/no-serialization home-stumpwm-stumptray-configuration
|
||||||
|
(package
|
||||||
|
(package sbcl-stumpwm-stumptray)
|
||||||
|
"Package to use for setting stumpwm-stumptray.")
|
||||||
|
(configurations
|
||||||
|
(text-config '())
|
||||||
|
"Configuration for stumpwm gaps"))
|
||||||
|
|
||||||
|
(define (add-stumpwm-stumptray config)
|
||||||
|
(home-stumpwm-extension
|
||||||
|
(configurations (home-stumpwm-stumptray-configuration-configurations config))))
|
||||||
|
|
||||||
|
(define (add-stumpwm-stumptray-packages config)
|
||||||
|
(list (home-stumpwm-stumptray-configuration-package config)))
|
||||||
|
|
||||||
|
(define home-stumpwm-stumptray-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'home-stumpwm-stumptray)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension
|
||||||
|
home-stumpwm-service-type
|
||||||
|
add-stumpwm-stumptray)
|
||||||
|
(service-extension
|
||||||
|
home-profile-service-type
|
||||||
|
add-stumpwm-stumptray-packages)))
|
||||||
|
(compose identity)
|
||||||
|
(default-value (home-stumpwm-stumptray-configuration))
|
||||||
|
(description "Install and configure stumpwm-stumptray.")))
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
(in-package :stumpwm-user)
|
(in-package :stumpwm-user)
|
||||||
|
|
||||||
(require 'swank)
|
(require 'swank)
|
||||||
(require 'swm-gaps)
|
|
||||||
|
|
||||||
(set-prefix-key (kbd "s-x"))
|
(set-prefix-key (kbd "s-x"))
|
||||||
|
|
||||||
|
@ -77,70 +76,6 @@ after it has been unlocked."
|
||||||
"%d "))
|
"%d "))
|
||||||
(mode-line)
|
(mode-line)
|
||||||
|
|
||||||
;;; Redefine this function again because for some reason on my system
|
|
||||||
;;; `(frame-width ...)' returns a ratio, not an integer, which is not accepted
|
|
||||||
;;; by `xlib:drawable-width'.
|
|
||||||
(defun stumpwm::maximize-window (win)
|
|
||||||
"Redefined gaps aware maximize function."
|
|
||||||
(multiple-value-bind (x y wx wy width height border stick)
|
|
||||||
(stumpwm::geometry-hints win)
|
|
||||||
|
|
||||||
(let ((ox 0) (oy 0) (ow 0) (oh 0)
|
|
||||||
(frame (stumpwm::window-frame win)))
|
|
||||||
(if (swm-gaps::apply-gaps-p win)
|
|
||||||
(multiple-value-setq (ox oy ow oh) (swm-gaps::gaps-offsets win)))
|
|
||||||
|
|
||||||
;; Only do width or height subtraction if result will be positive,
|
|
||||||
;; otherwise stumpwm will crash. Also, only modify window dimensions
|
|
||||||
;; if needed (i.e. window at least fills frame minus gap).
|
|
||||||
(when (and (< ow width)
|
|
||||||
(>= width (- (frame-width frame) ow)))
|
|
||||||
(setf width (- width ow)))
|
|
||||||
(when (and (< oh height)
|
|
||||||
(>= height (- (frame-height frame) oh)))
|
|
||||||
(setf height (- height oh)))
|
|
||||||
|
|
||||||
(setf x (+ x ox)
|
|
||||||
y (+ y oy))
|
|
||||||
|
|
||||||
;; This is the only place a window's geometry should change
|
|
||||||
(set-window-geometry win :x wx :y wy :width width :height height :border-width 0)
|
|
||||||
(xlib:with-state ((window-parent win))
|
|
||||||
;; FIXME: updating the border doesn't need to be run everytime
|
|
||||||
;; the window is maximized, but only when the border style or
|
|
||||||
;; window type changes. The overhead is probably minimal,
|
|
||||||
;; though.
|
|
||||||
(setf (xlib:drawable-x (window-parent win)) x
|
|
||||||
(xlib:drawable-y (window-parent win)) y
|
|
||||||
(xlib:drawable-border-width (window-parent win)) border)
|
|
||||||
;; the parent window should stick to the size of the window
|
|
||||||
;; unless it isn't being maximized to fill the frame.
|
|
||||||
(if (or stick
|
|
||||||
(find *window-border-style* '(:tight :none)))
|
|
||||||
(setf (xlib:drawable-width (window-parent win)) (window-width win)
|
|
||||||
(xlib:drawable-height (window-parent win)) (window-height win))
|
|
||||||
(let ((frame (stumpwm::window-frame win)))
|
|
||||||
(setf (xlib:drawable-width (window-parent win)) (- (round (frame-width frame))
|
|
||||||
(* 2 (xlib:drawable-border-width (window-parent win)))
|
|
||||||
ow)
|
|
||||||
(xlib:drawable-height (window-parent win)) (- (stumpwm::frame-display-height (window-group win) frame)
|
|
||||||
(* 2 (xlib:drawable-border-width (window-parent win)))
|
|
||||||
oh))))
|
|
||||||
;; update the "extents"
|
|
||||||
(xlib:change-property (window-xwin win) :_NET_FRAME_EXTENTS
|
|
||||||
(list wx
|
|
||||||
(- (xlib:drawable-width (window-parent win)) width wx)
|
|
||||||
wy
|
|
||||||
(- (xlib:drawable-height (window-parent win)) height wy))
|
|
||||||
:cardinal 32))
|
|
||||||
(update-configuration win))))
|
|
||||||
|
|
||||||
(setf swm-gaps:*head-gaps-size* 0)
|
|
||||||
(setf swm-gaps:*inner-gaps-size* 15)
|
|
||||||
(setf swm-gaps:*outer-gaps-size* 15)
|
|
||||||
|
|
||||||
(swm-gaps:toggle-gaps-on)
|
|
||||||
|
|
||||||
;;; Screenshots
|
;;; Screenshots
|
||||||
|
|
||||||
(defvar *screenshot-bindings*
|
(defvar *screenshot-bindings*
|
||||||
|
@ -168,3 +103,5 @@ after it has been unlocked."
|
||||||
(0 t t :class "teams-for-linux" :create t))
|
(0 t t :class "teams-for-linux" :create t))
|
||||||
|
|
||||||
(swank:create-server :dont-close t)
|
(swank:create-server :dont-close t)
|
||||||
|
|
||||||
|
(which-key-mode)
|
||||||
|
|
68
oni/home/services/stumpwm/config-gaps
Normal file
68
oni/home/services/stumpwm/config-gaps
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
;; -*- mode: lisp; -*-
|
||||||
|
(in-package :stumpwm-user)
|
||||||
|
|
||||||
|
(require 'swm-gaps)
|
||||||
|
|
||||||
|
;;; Redefine this function again because for some reason on my system
|
||||||
|
;;; `(frame-width ...)' returns a ratio, not an integer, which is not accepted
|
||||||
|
;;; by `xlib:drawable-width'.
|
||||||
|
(defun stumpwm::maximize-window (win)
|
||||||
|
"Redefined gaps aware maximize function."
|
||||||
|
(multiple-value-bind (x y wx wy width height border stick)
|
||||||
|
(stumpwm::geometry-hints win)
|
||||||
|
|
||||||
|
(let ((ox 0) (oy 0) (ow 0) (oh 0)
|
||||||
|
(frame (stumpwm::window-frame win)))
|
||||||
|
(if (swm-gaps::apply-gaps-p win)
|
||||||
|
(multiple-value-setq (ox oy ow oh) (swm-gaps::gaps-offsets win)))
|
||||||
|
|
||||||
|
;; Only do width or height subtraction if result will be positive,
|
||||||
|
;; otherwise stumpwm will crash. Also, only modify window dimensions
|
||||||
|
;; if needed (i.e. window at least fills frame minus gap).
|
||||||
|
(when (and (< ow width)
|
||||||
|
(>= width (- (frame-width frame) ow)))
|
||||||
|
(setf width (- width ow)))
|
||||||
|
(when (and (< oh height)
|
||||||
|
(>= height (- (frame-height frame) oh)))
|
||||||
|
(setf height (- height oh)))
|
||||||
|
|
||||||
|
(setf x (+ x ox)
|
||||||
|
y (+ y oy))
|
||||||
|
|
||||||
|
;; This is the only place a window's geometry should change
|
||||||
|
(set-window-geometry win :x wx :y wy :width width :height height :border-width 0)
|
||||||
|
(xlib:with-state ((window-parent win))
|
||||||
|
;; FIXME: updating the border doesn't need to be run everytime
|
||||||
|
;; the window is maximized, but only when the border style or
|
||||||
|
;; window type changes. The overhead is probably minimal,
|
||||||
|
;; though.
|
||||||
|
(setf (xlib:drawable-x (window-parent win)) x
|
||||||
|
(xlib:drawable-y (window-parent win)) y
|
||||||
|
(xlib:drawable-border-width (window-parent win)) border)
|
||||||
|
;; the parent window should stick to the size of the window
|
||||||
|
;; unless it isn't being maximized to fill the frame.
|
||||||
|
(if (or stick
|
||||||
|
(find *window-border-style* '(:tight :none)))
|
||||||
|
(setf (xlib:drawable-width (window-parent win)) (window-width win)
|
||||||
|
(xlib:drawable-height (window-parent win)) (window-height win))
|
||||||
|
(let ((frame (stumpwm::window-frame win)))
|
||||||
|
(setf (xlib:drawable-width (window-parent win)) (- (round (frame-width frame))
|
||||||
|
(* 2 (xlib:drawable-border-width (window-parent win)))
|
||||||
|
ow)
|
||||||
|
(xlib:drawable-height (window-parent win)) (- (stumpwm::frame-display-height (window-group win) frame)
|
||||||
|
(* 2 (xlib:drawable-border-width (window-parent win)))
|
||||||
|
oh))))
|
||||||
|
;; update the "extents"
|
||||||
|
(xlib:change-property (window-xwin win) :_NET_FRAME_EXTENTS
|
||||||
|
(list wx
|
||||||
|
(- (xlib:drawable-width (window-parent win)) width wx)
|
||||||
|
wy
|
||||||
|
(- (xlib:drawable-height (window-parent win)) height wy))
|
||||||
|
:cardinal 32))
|
||||||
|
(update-configuration win))))
|
||||||
|
|
||||||
|
(setf swm-gaps:*head-gaps-size* 0)
|
||||||
|
(setf swm-gaps:*inner-gaps-size* 15)
|
||||||
|
(setf swm-gaps:*outer-gaps-size* 15)
|
||||||
|
|
||||||
|
(swm-gaps:toggle-gaps-on)
|
|
@ -13,7 +13,9 @@
|
||||||
home-zsh-syntax-highlighting-service-type
|
home-zsh-syntax-highlighting-service-type
|
||||||
home-zsh-syntax-highlighting-configuration
|
home-zsh-syntax-highlighting-configuration
|
||||||
home-zsh-contextual-abbrevs-service-type
|
home-zsh-contextual-abbrevs-service-type
|
||||||
home-zsh-contextual-abbrevs-configuration))
|
home-zsh-contextual-abbrevs-configuration
|
||||||
|
home-zsh-autopair-service-type
|
||||||
|
home-zsh-autopair-configuration))
|
||||||
|
|
||||||
(define-configuration/no-serialization home-zsh-autosuggestions-configuration
|
(define-configuration/no-serialization home-zsh-autosuggestions-configuration
|
||||||
(package
|
(package
|
||||||
|
@ -105,3 +107,33 @@
|
||||||
(compose identity)
|
(compose identity)
|
||||||
(default-value (home-zsh-contextual-abbrevs-configuration))
|
(default-value (home-zsh-contextual-abbrevs-configuration))
|
||||||
(description "Install and configure zsh-contextual-abbrevs.")))
|
(description "Install and configure zsh-contextual-abbrevs.")))
|
||||||
|
|
||||||
|
(define-configuration/no-serialization home-zsh-autopair-configuration
|
||||||
|
(package
|
||||||
|
(package zsh-autopair)
|
||||||
|
"Package to use for setting zsh-autopair."))
|
||||||
|
|
||||||
|
(define (add-zsh-autopair config)
|
||||||
|
(home-zsh-extension
|
||||||
|
(zshrc
|
||||||
|
(list
|
||||||
|
(mixed-text-file
|
||||||
|
"zshrc"
|
||||||
|
"source " (home-zsh-autopair-configuration-package config) "/share/zsh/plugins/zsh-autopair/zsh-autopair.zsh")))))
|
||||||
|
|
||||||
|
(define (add-zsh-autopair-packages config)
|
||||||
|
(list (home-zsh-autopair-configuration-package config)))
|
||||||
|
|
||||||
|
(define home-zsh-autopair-service-type
|
||||||
|
(service-type
|
||||||
|
(name 'home-zsh-autopair)
|
||||||
|
(extensions
|
||||||
|
(list (service-extension
|
||||||
|
home-zsh-service-type
|
||||||
|
add-zsh-autopair)
|
||||||
|
(service-extension
|
||||||
|
home-profile-service-type
|
||||||
|
add-zsh-autopair-packages)))
|
||||||
|
(compose identity)
|
||||||
|
(default-value (home-zsh-autopair-configuration))
|
||||||
|
(description "Install and configure zsh-autopair.")))
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#:use-module (oni packages go))
|
#:use-module (oni packages go))
|
||||||
|
|
||||||
(define-public emacs-oni-config
|
(define-public emacs-oni-config
|
||||||
(let ((commit "072934a99ec4b9d3af7fbd92b243ea73dbb68ca3")
|
(let ((commit "6698c28e49456e532fc7a2f190193656b1a4101a")
|
||||||
(revision "0"))
|
(revision "0"))
|
||||||
(package
|
(package
|
||||||
(name "emacs-oni-config")
|
(name "emacs-oni-config")
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
(commit commit)))
|
(commit commit)))
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "06hmvh35v4s6wk129y9hfp6d5ki61wfydf4g6rgjnhgk17v0k1lf"))))
|
(base32 "0x2slp01ziw05n084kd1sv9fbqy0c7fvq6j0c94q10s4wcbw277n"))))
|
||||||
(build-system emacs-build-system)
|
(build-system emacs-build-system)
|
||||||
(home-page "https://code.ryuslash.org/ryuslash/emacs-config")
|
(home-page "https://code.ryuslash.org/ryuslash/emacs-config")
|
||||||
(synopsis "My Emacs configuration")
|
(synopsis "My Emacs configuration")
|
||||||
|
|
|
@ -369,11 +369,11 @@ key features.")
|
||||||
(license license:gpl3+))))
|
(license license:gpl3+))))
|
||||||
|
|
||||||
(define-public emacs-yoshi-theme
|
(define-public emacs-yoshi-theme
|
||||||
(let ((commit "ba9427329ac49fa2e060da2c16507feed62ad890")
|
(let ((commit "8faa406152f76452bda765ed4dafd41cd67f3afb")
|
||||||
(revision "0"))
|
(revision "0"))
|
||||||
(package
|
(package
|
||||||
(name "emacs-yoshi-theme")
|
(name "emacs-yoshi-theme")
|
||||||
(version (git-version "6.2.0" revision commit))
|
(version (git-version "7.0.0" revision commit))
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
|
@ -382,7 +382,7 @@ key features.")
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "0f57qz8fxn4bncmd8ak9n0s8h4b0kba7nfmkb475djlhn2n2xxl9"))))
|
(base32 "0bb5mf194iw72w7zcvs9jmlxx5ngvslx5i6c6rna9bj3y0zm8jlb"))))
|
||||||
(build-system emacs-build-system)
|
(build-system emacs-build-system)
|
||||||
(home-page "https://code.ryuslash.org/ryuslash/yoshi-theme")
|
(home-page "https://code.ryuslash.org/ryuslash/yoshi-theme")
|
||||||
(synopsis "Emacs theme named after my cat")
|
(synopsis "Emacs theme named after my cat")
|
||||||
|
@ -390,3 +390,25 @@ key features.")
|
||||||
new-theme for a while. I couldn't think of a name so I named it after him.")
|
new-theme for a while. I couldn't think of a name so I named it after him.")
|
||||||
(license license:gpl3+))))
|
(license license:gpl3+))))
|
||||||
|
|
||||||
|
(define-public emacs-yasnippet-capf
|
||||||
|
(let ((commit "40654214db7a44db3a99321447632b43a10fae57")
|
||||||
|
(revision "0"))
|
||||||
|
(package
|
||||||
|
(name "emacs-yasnippet-capf")
|
||||||
|
(version (git-version "7.0.0" revision commit))
|
||||||
|
(source
|
||||||
|
(origin
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://github.com/elken/yasnippet-capf.git")
|
||||||
|
(commit commit)))
|
||||||
|
(method git-fetch)
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
(sha256
|
||||||
|
(base32 "1kywl7jblrmixr0vwycpil5hyk4p5qlc3gxg9w25xga4jj91r663"))))
|
||||||
|
(propagated-inputs
|
||||||
|
(list emacs-yasnippet))
|
||||||
|
(build-system emacs-build-system)
|
||||||
|
(home-page "https://github.com/elken/yasnippet-capf")
|
||||||
|
(synopsis "Completion-At-Point Extension for YASnippet")
|
||||||
|
(description "A simple capf (Completion-At-Point Function) for completing yasnippet snippets.")
|
||||||
|
(license license:gpl3))))
|
||||||
|
|
Loading…
Reference in a new issue