diff options
author | Timo Wilken | 2022-11-21 23:56:20 +0100 |
---|---|---|
committer | Timo Wilken | 2022-11-22 00:13:24 +0100 |
commit | 214bdb10b93216cfd7020f5bdd1ed0804804d711 (patch) | |
tree | 58e1e96795ec560b3e2ad1dba1abeddbf0928b82 /home-configuration.scm | |
parent | 82cdee10870cfcfdb0f66b811e0b67f35cf9aecb (diff) |
Improve Xorg setup
Diffstat (limited to 'home-configuration.scm')
-rw-r--r-- | home-configuration.scm | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/home-configuration.scm b/home-configuration.scm index 271bcf93..2e81ed05 100644 --- a/home-configuration.scm +++ b/home-configuration.scm @@ -202,10 +202,27 @@ replacement spec (to which `regexp-substitute/global' is applied)." (provision '(xrdb)) (one-shot? #t) (start #~(lambda _ - ;; TODO: put these files in ~/.config. (invoke #$(package-binary "xrdb") "-merge" - (string-append (getenv "HOME") "/.Xdefaults") - (string-append (getenv "HOME") "/.Xresources"))))) + (string-append (getenv "XDG_CONFIG_HOME") "/X11/Xresources"))))) + + ;; By default, xdotool gets most of "#@\|~()<>[]{} wrong. Make + ;; it use the correct keymap by re-setting the same one again. + (shepherd-service + (documentation "Fix X keyboard map on login; passmenu needs this.") + (provision '(fix-xdotool)) + (one-shot? #t) + (start #~(lambda _ + (use-modules (ice-9 rdelim) + (ice-9 regex) + (ice-9 popen)) + (let ((port (open-pipe* OPEN_READ #$(package-binary "setxkbmap") "-query"))) + (let loop ((line (read-line port))) + (unless (eof-object? line) + (let ((mtch (string-match "^layout:[[:space:]]*" line))) + (if mtch + (system* #$(package-binary "setxkbmap") (match:suffix mtch)) + (loop (read-line port)))))))))) + (shepherd-service (documentation "Set up X displays on login.") (provision '(xorg-setup)) @@ -220,7 +237,12 @@ replacement spec (to which `regexp-substitute/global' is applied)." ;; configures it at 60 Hz, which causes ;; it to briefly turn off every few minutes. "--output" "HDMI-1-1" "--mode" "2560x1440" "--rate" "120.00" - "--right-of" "eDP-1")))))) + "--right-of" "eDP-1") + ;; Set the desktop background picture. Hopefully doing this just after + ;; xrandr works and sets it for both screens. + (invoke #$(package-binary "hsetroot") "-cover" + (string-append (getenv "HOME") + "/pictures/Backgrounds/greece/IMG_20181201_104748_DRO.jpg"))))))) ;; Configuration files for GUI programs in $XDG_CONFIG_HOME. (simple-service @@ -497,7 +519,10 @@ replacement spec (to which `regexp-substitute/global' is applied)." "catppuccin/neomutt/neomuttrc"))) ("lesskey" ,(local-file "lesskey")) ("ranger/rc.conf" ,(local-file "ranger.conf")) - ("X11/XCompose" ,(local-file "XCompose")))) ; see also: $XCOMPOSEFILE variable + ("user-dirs.locale" ,(plain-file "user-dirs.locale" "C")) ; Not sure if this is needed. Arch has it. + ("user-dirs.dirs" ,(local-file "user-dirs.dirs")) + ("X11/XCompose" ,(local-file "XCompose")) ; see also: $XCOMPOSEFILE variable + ("X11/Xresources" ,(local-file "Xresources")))) (simple-service 'terminal-files home-files-service-type |