diff options
author | bd <bdunahu@operationnull.com> | 2024-06-03 23:27:47 -0600 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2024-06-04 02:26:57 -0600 |
commit | a8bcda5d7dc0b05c2b8ea7375ae79c2a0c4c7a2e (patch) | |
tree | 0d98e683efa6b1ee724f22eb3acc7f0901b242a7 | |
parent | 7c2478b08e616b2f4155355cc128bd2fb1d879d1 (diff) |
xorg->wayland, dwm->dwl, vali only to usable
-rw-r--r-- | .config/dwl-guile/init.scm | 110 | ||||
-rw-r--r-- | .config/emacs/init.el | 3 | ||||
-rw-r--r-- | .config/emacs/modules/bd--essentials.el | 10 | ||||
-rw-r--r-- | .config/emacs/modules/bd--windows.el | 11 | ||||
-rw-r--r-- | .config/guix/channels.scm | 11 | ||||
-rw-r--r-- | .config/guix/hati.scm | 2 | ||||
-rw-r--r-- | .config/guix/modules/base.scm | 16 | ||||
-rw-r--r-- | .config/guix/modules/emacs.scm | 1 | ||||
-rw-r--r-- | .config/guix/modules/wayland.scm | 47 | ||||
-rw-r--r-- | .config/guix/modules/xorg.scm | 13 | ||||
-rw-r--r-- | .config/guix/vali.scm | 6 |
11 files changed, 205 insertions, 25 deletions
diff --git a/.config/dwl-guile/init.scm b/.config/dwl-guile/init.scm new file mode 100644 index 0000000..b0e5491 --- /dev/null +++ b/.config/dwl-guile/init.scm @@ -0,0 +1,110 @@ +;; Default bindings. +;; This file will only be loaded if 'inhibit-defaults? is #f. +(setq inhibit-defaults? #t) +;; M-x geiser-connect-local /tmp/dwl-guile.socket +(dwl:start-repl-server) + +(dwl:set-tty-keys "C-M") +(dwl:set-tag-keys "s" "s-S") + +(setq tags (list "dev" "web" "doc" "wte" "art" "ws6" "img" "vid" "agd")) +(set-layouts 'default "[]=" 'dwl:tile + 'monocle "[M]" 'dwl:monocle) + +;; TODO add back hyper! +(set-xkb-rules '((layout . us) + (options . "ctrl:nocaps"))) + +(setq repeat-rate 70 + repeat-delay 250 + ;; aka focus follows mouse + sloppy-focus? #f) + +;; colors :) +(setq focus-color "#ffffff" + border-color "#666666") + +(set-rules '((id . "emacs") + (tags . 1) + (floating? . #f) + (monitor . -1) + (id . "icecat") + (tags . 2) + (floating? . #f) + (monitor . -1) + (id . "librewolf") + (tags . 2) + (floating? . #f) + (monitor . -1) + (id . "Zathura") + (tags . 3) + (floating? . #f) + (monitor . -1) + (id . "libreoffice") + (tags . 4) + (floating? . #f) + (monitor . -1) + (id . "gimp") + (tags . 5) + (floating? . #t) + (monitor . -1) + (id . "imv") + (tags . 7) + (floating? . #f) + (monitor . -1) + (id . "Mpv") + (tags . 8) + (floating? . #f) + (monitor . -1))) + + +(set-keys "s-x" '(dwl:spawn "bemenu-run") + "s-<return>" '(dwl:spawn "emacsclient" "-nce" "(switch-to-buffer nil)") + "s-S-b" '(dwl:spawn "icecat") + "s-S-c" '(dwl:spawn "librewolf") + ;; "s-S-o" '(dwl:spawn "BOOKMARKS!") + ;; "s-S-p" '(dwl:spawn "PASSMENU!") + ;; BRIGHTNESS + ;; VOL + ;; MPD + "s-<print>" '(dwl:spawn "flameshot launcher") + "<print>" '(dwl:spawn "flameshot full") + "s-n" '(dwl:focus-stack 1) + "s-p" '(dwl:focus-stack -1) + "s-f" '(dwl:change-master-factor 0.01) + "s-b" '(dwl:change-master-factor -0.01) + "s-<page-up>" '(dwl:change-masters 1) + "s-<page-down>" '(dwl:change-masters -1) + "s-t" '(dwl:cycle-layout 1) + "s-<left>" '(dwl:focus-monitor 'DIRECTION-LEFT) + "s-<right>" '(dwl:focus-monitor 'DIRECTION-RIGHT) + "s-<up>" '(dwl:focus-monitor 'DIRECTION-UP) + "s-<down>" '(dwl:focus-monitor 'DIRECTION-DOWN) + "s-S-<left>" '(dwl:tag-monitor 'DIRECTION-LEFT) + "s-S-<right>" '(dwl:tag-monitor 'DIRECTION-RIGHT) + "s-S-<up>" '(dwl:tag-monitor 'DIRECTION-UP) + "s-S-<down>" '(dwl:tag-monitor 'DIRECTION-DOWN) + "s-q" 'dwl:kill-client + "s-<space>" 'dwl:zoom + "s-<tab>" 'dwl:view + "s-0" '(dwl:view 0) ;; 0 will show all tags + "s-m" '(dwl:set-layout "monocle") + "s-t" '(dwl:set-layout "default") + "s-S-<space>" 'dwl:toggle-floating + "s-S-q" 'dwl:quit + "s-<mouse-left>" 'dwl:move + "s-<mouse-right>" 'dwl:resize + "s-=" '(dwl:change-gaps -4) + "s-<backspace>" '(dwl:change-gaps 4)) + +(set-monitor-rules '((masters . 1) + (master-factor . 0.55) + (scale . 1) + (transform . TRANSFORM-NORMAL) + (layout . default))) + +(add-hook! dwl:hook-startup + (lambda () + (dwl:spawn "set-bg") + (dwl:change-gaps 8) + (dwl:spawn "emacs" "--daemon"))) diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 5670895..edbf190 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -14,7 +14,8 @@ backup-directory-alist `(("." . ,(expand-file-name "tmp/backups/" user-emacs-directory)))) (make-directory (expand-file-name "tmp/auto_saves/" user-emacs-directory) t) - +;;;; display type +(setq display (getenv "XDG_SESSION_TYPE")) ;;;; path (setenv "PATH" (format "%s:%s" (expand-file-name "~/.local/bin/") (getenv "PATH"))) diff --git a/.config/emacs/modules/bd--essentials.el b/.config/emacs/modules/bd--essentials.el index de72c20..49e50e3 100644 --- a/.config/emacs/modules/bd--essentials.el +++ b/.config/emacs/modules/bd--essentials.el @@ -18,10 +18,18 @@ (pulse-momentary-highlight-one-line (point))) (dolist (command '(scroll-up-command scroll-down-command - recenter-top-bottom other-window)) + recenter-top-bottom other-window)) (advice-add command :after #'pulse-line)) +;;;; insecure passwording +(use-package pinentry + :init + (pinentry-start) + :custom + (pinentry-popup-prompt-window nil)) + + ;;;; defaults ;; basic editing (setopt kill-whole-line t diff --git a/.config/emacs/modules/bd--windows.el b/.config/emacs/modules/bd--windows.el index 81ea1df..b92eb1a 100644 --- a/.config/emacs/modules/bd--windows.el +++ b/.config/emacs/modules/bd--windows.el @@ -42,12 +42,17 @@ dedicated buffer will never be automatically orphaned." (max lower-bound (min value upper-bound))) (defun set-frame-alpha (value) - "Sets the transparency of the frame background. 0=transparent/100=opaque" + "Sets the transparency of the frame background. 0=transparent/100=opaque +Due to a bug with guix-packaged emacs, only uses true-transparency on wayland." (interactive "nTransparency Value (30 - 100 opaque): ") (setq value (bd/clamp 30 100 value)) - (set-frame-parameter (selected-frame) 'alpha `(,value . ,value)) + (if (equal display "wayland") + (set-frame-parameter (selected-frame) 'alpha-background value) + (set-frame-parameter (selected-frame) 'alpha `(,value . ,value))) (message "Alpha set to %d" value)) -(add-to-list 'default-frame-alist '(alpha . (82 . 82))) +(if (equal display "wayland") + (add-to-list 'default-frame-alist '(alpha-background . 66)) + (add-to-list 'default-frame-alist '(alpha . (82 . 82)))) (require 'project) diff --git a/.config/guix/channels.scm b/.config/guix/channels.scm new file mode 100644 index 0000000..3276ada --- /dev/null +++ b/.config/guix/channels.scm @@ -0,0 +1,11 @@ +;; Add variant packages to those Guix provides. +(cons (channel + (name 'variant-packages) + (url "https://github.com/engstrand-config/home-service-dwl-guile") + (branch "main") + (introduction + (make-channel-introduction + "314453a87634d67e914cfdf51d357638902dd9fe" + (openpgp-fingerprint + "C9BE B8A0 4458 FDDF 1268 1B39 029D 8EB7 7E18 D68C")))) + %default-channels) diff --git a/.config/guix/hati.scm b/.config/guix/hati.scm index a9b1e03..04251b1 100644 --- a/.config/guix/hati.scm +++ b/.config/guix/hati.scm @@ -14,7 +14,7 @@ #:use-module (gnu services guix) #:use-module (guix gexp) #:use-module (modules base) - #:use-module (modules desktop) + #:use-module (modules xorg) #:use-module (modules mpd) #:use-module (modules ymir)) diff --git a/.config/guix/modules/base.scm b/.config/guix/modules/base.scm index c84a8de..290e32b 100644 --- a/.config/guix/modules/base.scm +++ b/.config/guix/modules/base.scm @@ -32,13 +32,12 @@ cryptsetup ;; cryptsetup curl ;; curl databases ;; recutils - emacs ;; emacs fonts ;; font-google-noto-emoji, font-terminus fontutils ;; fontconfig - gimp ;; gimp - gnupg ;; gnupg, pinentry, + gimp ;; gimp-next + gnupg ;; gnupg, pinentry, pinentry-emacs gnuzilla ;; icecat - gtk ;; gtk+ + image ;; flameshot imagemagick ;; imagemagick librewolf ;; librewolf mail ;; notmuch, offlineimap @@ -62,14 +61,13 @@ offlineimap3 pass-otp password-store - pinentry + pinentry-emacs transmission xpdf ; pdftotext yt-dlp cryptsetup curl - emacs git jq netcat @@ -84,11 +82,11 @@ (define desk (list ffmpeg + flameshot fontconfig font-google-noto-emoji font-terminus - gimp - gtk+ + gimp-next icecat imagemagick librewolf @@ -158,7 +156,7 @@ (service home-gpg-agent-service-type (home-gpg-agent-configuration (pinentry-program - (file-append pinentry "/bin/pinentry")) + (file-append pinentry-emacs "/bin/pinentry-emacs")) (ssh-support? #t))) (service home-bash-service-type diff --git a/.config/guix/modules/emacs.scm b/.config/guix/modules/emacs.scm index b78c2d5..de75e9d 100644 --- a/.config/guix/modules/emacs.scm +++ b/.config/guix/modules/emacs.scm @@ -41,6 +41,7 @@ emacs-orderless emacs-org-roam emacs-paredit + emacs-pinentry emacs-popper emacs-rainbow-delimiters emacs-rainbow-mode diff --git a/.config/guix/modules/wayland.scm b/.config/guix/modules/wayland.scm new file mode 100644 index 0000000..eac31b9 --- /dev/null +++ b/.config/guix/modules/wayland.scm @@ -0,0 +1,47 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Provides a set of my preferred program ;; +;; and services for wayland desktops ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(define-module (modules wayland) + #:use-module (dwl-guile packages) + #:use-module (gnu) + #:use-module (gnu home services) + #:use-module (gnu home services desktop) + #:use-module (gnu home services sound) + #:use-module (guix gexp) + #:use-module (guix packages) + #:export (bd-desktop-system-packages + bd-desktop-home-services)) + +(use-service-modules audio desktop networking + sound) + +(use-package-modules + emacs ;; emacs-pgtk + image-viewers ;; imv + qt ;; qt-wayland, qt-base + wm ;; sway-bg, mako + xdisorg ;; bemenu + ) + +(define bd-desktop-system-packages + (list + bemenu + dwl-guile + emacs-pgtk + imv + mako + qtbase + qtwayland + swaybg + )) + +;; (define bd-desktop-system-services +;; (list +;; )) + +(define bd-desktop-home-services + (list + (service home-pipewire-service-type) + (service home-dbus-service-type))) diff --git a/.config/guix/modules/xorg.scm b/.config/guix/modules/xorg.scm index 9a94f8b..eb057bc 100644 --- a/.config/guix/modules/xorg.scm +++ b/.config/guix/modules/xorg.scm @@ -8,7 +8,6 @@ #:use-module (gnu) #:use-module (gnu home services) #:use-module (gnu home services desktop) - #:use-module (gnu home services shells) #:use-module (guix gexp) #:use-module (guix packages) #:export (bd-desktop-system-packages @@ -19,14 +18,14 @@ sound xorg) (use-package-modules - image ;; flameshot, - suckless ;; dmenu, - gnome ;; libnotify, - pulseaudio ;; pavucontrol, pulseaudio, compton ;; picom + emacs ;; emacs + gnome ;; libnotify, image-viewers ;; sxiv, feh - xorg ;; xprop, xf86-input-libinput, xf86-video-fbdev, xinit... + pulseaudio ;; pavucontrol, pulseaudio, + suckless ;; dmenu, xdisorg ;; xdotool + xorg ;; xprop, xf86-input-libinput, xf86-video-fbdev, xinit... ) (define dwm-package @@ -39,7 +38,7 @@ (define bd-desktop-system-packages (list dmenu - flameshot + emacs libnotify pavucontrol picom diff --git a/.config/guix/vali.scm b/.config/guix/vali.scm index 3e2acfc..afc50fd 100644 --- a/.config/guix/vali.scm +++ b/.config/guix/vali.scm @@ -15,8 +15,8 @@ #:use-module (guix gexp) #:use-module (modules base) #:use-module (modules mpd) - #:use-module (modules ymir) - #:use-module (modules xorg)) + #:use-module (modules wayland) + #:use-module (modules ymir)) (define home @@ -43,7 +43,7 @@ (services `(,@bd-base-system-services - ,@bd-desktop-system-services + ;; ,@bd-desktop-system-services ,@bd-mpd-service ,(service guix-home-service-type `((,username ,home))))) |