Compare commits
No commits in common. "e6a5c692d34c67122311d4b1c47e25f04c6fb6ec" and "a6be36fcbb7a136d3e09a90a7cf55c82cafa9c98" have entirely different histories.
e6a5c692d3
...
a6be36fcbb
10 changed files with 91 additions and 400 deletions
|
@ -91,7 +91,6 @@
|
|||
"alias scsh=\"rlwrap scsh\"\n"
|
||||
"alias sbcl=\"rlwrap sbcl\"\n"
|
||||
"alias hc=herbstclient\n"
|
||||
"alias reco=\"pushd ~/projects/new-dotfiles/ && guix home reconfigure config.scm; popd\"\n"
|
||||
"setopt SHARE_HISTORY\n"
|
||||
"setopt HIST_IGNORE_ALL_DUPS\n"
|
||||
"setopt HIST_IGNORE_SPACE\n"
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
#:select (home-environment))
|
||||
#:use-module ((gnu packages certs)
|
||||
#:select (nss-certs))
|
||||
#:use-module ((gnu packages cdrom)
|
||||
#:select (abcde))
|
||||
#:use-module ((gnu packages databases)
|
||||
#:select (recutils
|
||||
emacs-rec-mode))
|
||||
|
@ -70,10 +68,7 @@
|
|||
#:select (home-dunst-default-service))
|
||||
#:use-module ((oni home services emacs)
|
||||
#:select (home-emacs-service-type
|
||||
home-emacs-configuration
|
||||
home-emacs-helpful-service-type
|
||||
home-emacs-helpful-configuration
|
||||
home-emacs-yasnippet-capf-service-type))
|
||||
home-emacs-configuration))
|
||||
#:use-module ((oni home services environment)
|
||||
#:select (home-environment-service))
|
||||
#:use-module ((oni home services flameshot)
|
||||
|
@ -99,19 +94,14 @@
|
|||
#:select (home-rofi-default-service))
|
||||
#:use-module ((oni home services stumpwm)
|
||||
#:select (home-stumpwm-service-type
|
||||
home-stumpwm-configuration
|
||||
home-stumpwm-gaps-service-type
|
||||
home-stumpwm-gaps-configuration
|
||||
home-stumpwm-stumptray-service-type
|
||||
home-stumpwm-stumptray-configuration))
|
||||
home-stumpwm-configuration))
|
||||
#:use-module ((oni home services syncthing)
|
||||
#:select (home-syncthing-service-type))
|
||||
#:use-module ((oni home services utilities)
|
||||
#:select (home-inkplate-display-service-type))
|
||||
#:use-module ((oni home services zsh)
|
||||
#:select (home-zsh-syntax-highlighting-service-type
|
||||
home-zsh-autosuggestions-service-type
|
||||
home-zsh-autopair-service-type))
|
||||
home-zsh-autosuggestions-service-type))
|
||||
#:use-module ((oni packages count-emails)
|
||||
#:select (count-emails))
|
||||
#:use-module ((oni packages emacs)
|
||||
|
@ -248,7 +238,6 @@
|
|||
gforth
|
||||
recutils
|
||||
emacs-rec-mode
|
||||
abcde
|
||||
;; Might be needed for certain icons?
|
||||
hicolor-icon-theme
|
||||
;; Might be needed for cetrificates
|
||||
|
@ -272,7 +261,6 @@
|
|||
;; configuration last.
|
||||
(service home-zsh-syntax-highlighting-service-type)
|
||||
(service home-zsh-autosuggestions-service-type)
|
||||
(service home-zsh-autopair-service-type)
|
||||
|
||||
(simple-service 'my-channel-service
|
||||
home-channels-service-type
|
||||
|
@ -285,15 +273,6 @@
|
|||
"646573578b7adfbff415645fed201269076cebf6"
|
||||
(openpgp-fingerprint
|
||||
"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
|
||||
(name 'guix-gaming-games)
|
||||
(url "https://gitlab.com/guix-gaming-channels/games.git")
|
||||
|
@ -333,12 +312,6 @@
|
|||
"(load custom-file)\n"
|
||||
"(provide 'init)\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)
|
||||
|
||||
|
@ -362,19 +335,7 @@
|
|||
|
||||
(service home-stumpwm-service-type
|
||||
(home-stumpwm-configuration
|
||||
(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")))))
|
||||
(package stumpwm+swank)))
|
||||
|
||||
(service home-inkplate-display-service-type)
|
||||
(service home-notmuch-service-type
|
||||
|
|
|
@ -2,13 +2,10 @@
|
|||
#:use-module ((gnu services configuration)
|
||||
#:select (serialize-package
|
||||
define-configuration
|
||||
define-configuration/no-serialization
|
||||
text-config?
|
||||
serialize-text-config))
|
||||
#:use-module ((gnu packages emacs)
|
||||
#:select (emacs))
|
||||
#:use-module ((gnu packages emacs-xyz)
|
||||
#:select (emacs-helpful))
|
||||
#:use-module ((gnu home services)
|
||||
#:select (service-type
|
||||
service-extension
|
||||
|
@ -25,27 +22,13 @@
|
|||
#:use-module ((guix packages)
|
||||
#:select (package?))
|
||||
|
||||
#:use-module ((oni packages emacs)
|
||||
#:select (emacs-yasnippet-capf))
|
||||
|
||||
#:export (home-emacs-service-type
|
||||
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."))
|
||||
home-emacs-configuration))
|
||||
|
||||
(define-configuration home-emacs-configuration
|
||||
(package
|
||||
(package emacs)
|
||||
"Package to use for setting Emacs")
|
||||
(package emacs)
|
||||
"Package to use for setting Emacs")
|
||||
(configurations
|
||||
(text-config '())
|
||||
"A list of other configuration files to autoload"))
|
||||
|
@ -53,13 +36,6 @@
|
|||
(define (add-emacs-packages 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)
|
||||
(list
|
||||
(shepherd-service
|
||||
|
@ -93,68 +69,5 @@
|
|||
home-files-service-type
|
||||
home-emacs-config-files)))
|
||||
(compose identity)
|
||||
(extend home-emacs-extensions)
|
||||
(default-value (home-emacs-configuration))
|
||||
(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.")))
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
;;; 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,18 +1,13 @@
|
|||
(define-module (oni home services stumpwm)
|
||||
#:use-module ((srfi srfi-1) #:select (every))
|
||||
#:use-module ((gnu services configuration)
|
||||
#:select (serialize-package
|
||||
define-configuration
|
||||
define-configuration/no-serialization
|
||||
text-config?
|
||||
serialize-text-config))
|
||||
define-configuration))
|
||||
#:use-module ((gnu packages lisp)
|
||||
#:select (sbcl))
|
||||
#:use-module ((gnu packages wm)
|
||||
#:select (stumpwm
|
||||
stumpish
|
||||
sbcl-stumpwm-swm-gaps
|
||||
sbcl-stumpwm-stumptray))
|
||||
sbcl-stumpwm-swm-gaps))
|
||||
#:use-module ((gnu home services)
|
||||
#:select (service-type
|
||||
service-extension
|
||||
|
@ -22,55 +17,33 @@
|
|||
#:use-module ((guix gexp)
|
||||
#:select (local-file
|
||||
gexp
|
||||
file-append
|
||||
mixed-text-file))
|
||||
file-append))
|
||||
#:use-module ((guix packages)
|
||||
#:select (package?))
|
||||
|
||||
#:export (home-stumpwm-service-type
|
||||
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."))
|
||||
home-stumpwm-configuration))
|
||||
|
||||
(define-configuration home-stumpwm-configuration
|
||||
(package
|
||||
(package stumpwm)
|
||||
"Package to use for setting Stumpwm")
|
||||
(configurations
|
||||
(text-config '())
|
||||
"The configuration to apply.")
|
||||
(gaps-package
|
||||
(package sbcl-stumpwm-swm-gaps)
|
||||
"Package to use for setting Stumpwm Gaps")
|
||||
(stumpish-package
|
||||
(package stumpish)
|
||||
"Package to use for setting Stumpish"))
|
||||
|
||||
(define (add-stumpwm-packages config)
|
||||
(append (list sbcl
|
||||
(home-stumpwm-configuration-package config)
|
||||
(list stumpwm "lib")
|
||||
(home-stumpwm-configuration-stumpish-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)))))
|
||||
(list sbcl
|
||||
(home-stumpwm-configuration-package config)
|
||||
(list stumpwm "lib")
|
||||
(home-stumpwm-configuration-stumpish-package config)
|
||||
(home-stumpwm-configuration-gaps-package config)))
|
||||
|
||||
(define (home-stumpwm-config-files config)
|
||||
`(("stumpwm/config"
|
||||
,(mixed-text-file
|
||||
"config"
|
||||
(serialize-text-config config (home-stumpwm-configuration-configurations config))))))
|
||||
`(("stumpwm/config" ,(local-file "stumpwm/config"))))
|
||||
|
||||
(define (reload-stumpwm-config-gexp _)
|
||||
`(("files/.config/stumpwm/config"
|
||||
|
@ -90,64 +63,5 @@
|
|||
home-run-on-change-service-type
|
||||
reload-stumpwm-config-gexp)))
|
||||
(compose identity)
|
||||
(extend home-stumpwm-extensions)
|
||||
(default-value (home-stumpwm-configuration))
|
||||
(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,6 +2,7 @@
|
|||
(in-package :stumpwm-user)
|
||||
|
||||
(require 'swank)
|
||||
(require 'swm-gaps)
|
||||
|
||||
(set-prefix-key (kbd "s-x"))
|
||||
|
||||
|
@ -76,6 +77,70 @@ after it has been unlocked."
|
|||
"%d "))
|
||||
(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
|
||||
|
||||
(defvar *screenshot-bindings*
|
||||
|
@ -103,5 +168,3 @@ after it has been unlocked."
|
|||
(0 t t :class "teams-for-linux" :create t))
|
||||
|
||||
(swank:create-server :dont-close t)
|
||||
|
||||
(which-key-mode)
|
||||
|
|
|
@ -1,68 +0,0 @@
|
|||
;; -*- 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,9 +13,7 @@
|
|||
home-zsh-syntax-highlighting-service-type
|
||||
home-zsh-syntax-highlighting-configuration
|
||||
home-zsh-contextual-abbrevs-service-type
|
||||
home-zsh-contextual-abbrevs-configuration
|
||||
home-zsh-autopair-service-type
|
||||
home-zsh-autopair-configuration))
|
||||
home-zsh-contextual-abbrevs-configuration))
|
||||
|
||||
(define-configuration/no-serialization home-zsh-autosuggestions-configuration
|
||||
(package
|
||||
|
@ -107,33 +105,3 @@
|
|||
(compose identity)
|
||||
(default-value (home-zsh-contextual-abbrevs-configuration))
|
||||
(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))
|
||||
|
||||
(define-public emacs-oni-config
|
||||
(let ((commit "6698c28e49456e532fc7a2f190193656b1a4101a")
|
||||
(let ((commit "072934a99ec4b9d3af7fbd92b243ea73dbb68ca3")
|
||||
(revision "0"))
|
||||
(package
|
||||
(name "emacs-oni-config")
|
||||
|
@ -26,7 +26,7 @@
|
|||
(commit commit)))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32 "0x2slp01ziw05n084kd1sv9fbqy0c7fvq6j0c94q10s4wcbw277n"))))
|
||||
(base32 "06hmvh35v4s6wk129y9hfp6d5ki61wfydf4g6rgjnhgk17v0k1lf"))))
|
||||
(build-system emacs-build-system)
|
||||
(home-page "https://code.ryuslash.org/ryuslash/emacs-config")
|
||||
(synopsis "My Emacs configuration")
|
||||
|
|
|
@ -369,11 +369,11 @@ key features.")
|
|||
(license license:gpl3+))))
|
||||
|
||||
(define-public emacs-yoshi-theme
|
||||
(let ((commit "8faa406152f76452bda765ed4dafd41cd67f3afb")
|
||||
(let ((commit "ba9427329ac49fa2e060da2c16507feed62ad890")
|
||||
(revision "0"))
|
||||
(package
|
||||
(name "emacs-yoshi-theme")
|
||||
(version (git-version "7.0.0" revision commit))
|
||||
(version (git-version "6.2.0" revision commit))
|
||||
(source
|
||||
(origin
|
||||
(uri (git-reference
|
||||
|
@ -382,7 +382,7 @@ key features.")
|
|||
(method git-fetch)
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32 "0bb5mf194iw72w7zcvs9jmlxx5ngvslx5i6c6rna9bj3y0zm8jlb"))))
|
||||
(base32 "0f57qz8fxn4bncmd8ak9n0s8h4b0kba7nfmkb475djlhn2n2xxl9"))))
|
||||
(build-system emacs-build-system)
|
||||
(home-page "https://code.ryuslash.org/ryuslash/yoshi-theme")
|
||||
(synopsis "Emacs theme named after my cat")
|
||||
|
@ -390,25 +390,3 @@ key features.")
|
|||
new-theme for a while. I couldn't think of a name so I named it after him.")
|
||||
(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