Emacs tune, some updates, direnv

This commit is contained in:
Aleksandr Lebedev 2025-11-21 23:57:30 +01:00
parent 1511f0cd92
commit 244edc5ca6
7 changed files with 77 additions and 40 deletions

View file

@ -272,9 +272,10 @@ layout {
// See the binds section below for more spawn examples. // See the binds section below for more spawn examples.
spawn-sh-at-startup "emacs --daemon" spawn-sh-at-startup "emacs --daemon"
spawn-at-startup "secretsd"
// To run a shell command (with variables, pipes, etc.), use spawn-sh-at-startup: // To run a shell command (with variables, pipes, etc.), use spawn-sh-at-startup:
spawn-sh-at-startup "qs -c dms" //spawn-sh-at-startup "qs -c dms"
spawn-sh-at-startup "wl-paste --watch cliphist store &" spawn-sh-at-startup "wl-paste --watch cliphist store &"
spawn-sh-at-startup "nextcloud --background" spawn-sh-at-startup "nextcloud --background"
@ -382,42 +383,42 @@ binds {
// Use spawn-sh to run a shell command. Do this if you need pipes, multiple commands, etc. // Use spawn-sh to run a shell command. Do this if you need pipes, multiple commands, etc.
Mod+Space hotkey-overlay-title="Application Launcher" { Mod+Space hotkey-overlay-title="Application Launcher" {
spawn-sh "qs -c dms ipc call spotlight toggle"; spawn-sh "dms ipc call spotlight toggle";
} }
Mod+V hotkey-overlay-title="Clipboard Manager" { Mod+V hotkey-overlay-title="Clipboard Manager" {
spawn-sh "qs -c dms ipc call clipboard toggle"; spawn-sh "dms ipc call clipboard toggle";
} }
Mod+M hotkey-overlay-title="Task Manager" { Mod+M hotkey-overlay-title="Task Manager" {
spawn-sh "qs -c dms ipc call processlist toggle"; spawn-sh "dms ipc call processlist toggle";
} }
Super+L hotkey-overlay-title="Lock Screen" { Super+L hotkey-overlay-title="Lock Screen" {
spawn-sh "qs -c dms ipc call lock lock"; spawn-sh "dms ipc call lock lock";
} }
Mod+Y hotkey-overlay-title="Browse Wallpapers" { Mod+Y hotkey-overlay-title="Browse Wallpapers" {
spawn-sh "qs -c dms ipc call dankdash wallpaper"; spawn-sh "dms ipc call dankdash wallpaper";
} }
XF86AudioRaiseVolume allow-when-locked=true { XF86AudioRaiseVolume allow-when-locked=true {
spawn-sh "qs -c dms ipc call audio increment 3"; spawn-sh "dms ipc call audio increment 3";
} }
XF86AudioLowerVolume allow-when-locked=true { XF86AudioLowerVolume allow-when-locked=true {
spawn-sh "qs -c dms ipc call audio decrement 3"; spawn-sh "dms ipc call audio decrement 3";
} }
XF86AudioMute allow-when-locked=true { XF86AudioMute allow-when-locked=true {
spawn-sh "qs -c dms ipc call audio mute"; spawn-sh "dms ipc call audio mute";
} }
XF86AudioMicMute allow-when-locked=true { XF86AudioMicMute allow-when-locked=true {
spawn-sh "qs -c dms ipc call audio micmute"; spawn-sh "dms ipc call audio micmute";
} }
XF86MonBrightnessUp allow-when-locked=true { XF86MonBrightnessUp allow-when-locked=true {
spawn-sh "qs -c dms ipc call brightness increment 5 ''"; spawn-sh "dms ipc call brightness increment 5 ''";
} }
// You can override the default device for e.g. keyboards by adding the device name to the last param // You can override the default device for e.g. keyboards by adding the device name to the last param
XF86MonBrightnessDown allow-when-locked=true { XF86MonBrightnessDown allow-when-locked=true {
spawn-sh "qs -c dms ipc call brightness decrement 5 ''"; spawn-sh "dms ipc call brightness decrement 5 ''";
} }
// Night mode toggle // Night mode toggle
Mod+Shift+N allow-when-locked=true { Mod+Shift+N allow-when-locked=true {
spawn "dms" "ipc" "call" "night" "toggle"; spawn-sh "dms ipc call night toggle";
} }
// Open/close the Overview: a zoomed-out view of workspaces and windows. // Open/close the Overview: a zoomed-out view of workspaces and windows.
// You can also move the mouse into the top-left hot corner, // You can also move the mouse into the top-left hot corner,

View file

@ -3,7 +3,7 @@
(url "https://git.guix.gnu.org/guix.git") (url "https://git.guix.gnu.org/guix.git")
(branch "master") (branch "master")
(commit (commit
"b1c1e42215190b67db55117509dc9ee4af434246") "157f2e8732157ecb5d3084afbbb8fb2891cbf342")
(introduction (introduction
(make-channel-introduction (make-channel-introduction
"9edb3f66fd807b096b48283debdcddccfea34bad" "9edb3f66fd807b096b48283debdcddccfea34bad"

View file

@ -0,0 +1 @@
eval "$(direnv hook bash)"

View file

@ -547,6 +547,12 @@ DIR must include a .project file to be considered a project."
(add-to-list 'auto-mode-alist '("CMakeLists\\.txt\\'" . cmake-ts-mode)) (add-to-list 'auto-mode-alist '("CMakeLists\\.txt\\'" . cmake-ts-mode))
(add-to-list 'auto-mode-alist '("\\.cmake\\'" . cmake-ts-mode)) (add-to-list 'auto-mode-alist '("\\.cmake\\'" . cmake-ts-mode))
(use-package zig-mode
:ensure t)
(autoload 'zig-mode "zig-mode" nil t)
(add-to-list 'auto-mode-alist '("\\.\\(zig\\|zon\\)\\'" . zig-mode))
(use-package treesit-auto (use-package treesit-auto
:ensure t :ensure t
:demand t :demand t
@ -592,6 +598,29 @@ DIR must include a .project file to be considered a project."
(add-hook 'c-ts-mode-hook #'eglot-ensure) (add-hook 'c-ts-mode-hook #'eglot-ensure)
(add-hook 'c++-ts-mode-hook #'eglot-ensure)) (add-hook 'c++-ts-mode-hook #'eglot-ensure))
(with-eval-after-load 'eglot
(add-to-list 'eglot-server-programs
'(zig-mode . (
;; Use `zls` if it is in your PATH
"zls"
;; There are two ways to set config options:
;; - edit your `zls.json` that applies to any editor that uses ZLS
;; - set in-editor config options with the `initializationOptions` field below.
;;
;; Further information on how to configure ZLS:
;; https://zigtools.org/zls/configure/
:initializationOptions
(;; Whether to enable build-on-save diagnostics
;;
;; Further information about build-on save:
;; https://zigtools.org/zls/guides/build-on-save/
;;enable_build_on_save t
;; omit the following line if `zig` is in your PATH
;:zig_exe_path "/path/to/zig_executable"
))))
(add-hook 'zig-mode-hook #'eglot-ensure))
(with-eval-after-load 'eglot (with-eval-after-load 'eglot
(add-to-list 'eglot-server-programs (add-to-list 'eglot-server-programs
'(csharp-ts-mode '(csharp-ts-mode

View file

@ -2,6 +2,7 @@
#:use-module (gnu home) #:use-module (gnu home)
#:use-module (gnu packages emacs) #:use-module (gnu packages emacs)
#:use-module (gnu packages glib) #:use-module (gnu packages glib)
#:use-module (gnu packages shellutils)
#:use-module (gnu packages gnuzilla) #:use-module (gnu packages gnuzilla)
#:use-module (gnu packages mail) #:use-module (gnu packages mail)
#:use-module (gnu packages messaging) #:use-module (gnu packages messaging)
@ -11,6 +12,7 @@
#:use-module (gnu packages wm) #:use-module (gnu packages wm)
#:use-module (gnu packages terminals) #:use-module (gnu packages terminals)
#:use-module (gnu packages xorg) #:use-module (gnu packages xorg)
#:use-module (gnu packages kde-internet)
#:use-module (gnu packages linux) #:use-module (gnu packages linux)
#:use-module (gnu packages freedesktop) #:use-module (gnu packages freedesktop)
#:use-module (gnu packages rust-apps) #:use-module (gnu packages rust-apps)
@ -35,7 +37,14 @@
#:use-module (guix-config home services emacs) #:use-module (guix-config home services emacs)
#:use-module (guix-config home services flatpak) #:use-module (guix-config home services flatpak)
#:use-module (guix-config home services secretsd) #:use-module (guix-config home services secretsd)
#:use-module (gnu home services niri)) #:use-module (gnu home services niri)
#:use-module (guix transformations)
#:use-module (guix packages)
#:use-module (gnu home services dankmaterialshell)
)
(define tune
(options->transformation '((tune . "alderlake"))))
(home-environment (home-environment
;; Below is the list of packages that will show up in your ;; Below is the list of packages that will show up in your
@ -49,29 +58,27 @@
vlc vlc
font-google-noto-emoji font-google-noto-emoji
font-openmoji font-openmoji
direnv
(package
(inherit neochat)
(propagated-inputs (modify-inputs (package-propagated-inputs neochat)
(append qtpositioning))))
;birdtray birdtray
nextcloud-client nextcloud-client
icedove
nautilus nautilus
xournalpp xournalpp))
quickshell
cava
wl-clipboard
cliphist
brightnessctl
qtmultimedia
`(,glib "bin")
matugen
dgop
wayland
xwayland-satellite
qtwayland))
;; Below is the list of Home services. To search for available ;; Below is the list of Home services. To search for available
;; services, run 'guix home search KEYWORD' in a terminal. ;; services, run 'guix home search KEYWORD' in a terminal.
(services (services
(append (list (service home-niri-service-type) (append (list (service home-dankmaterialshell-service-type
(home-dankmaterialshell-configuration
(launch-command (file-append niri "/bin/niri msg action spawn-sh --"))))
(service home-niri-service-type)
(service home-pipewire-service-type) (service home-pipewire-service-type)
(service home-wayland-service-type)
(service home-dbus-service-type) (service home-dbus-service-type)
(service home-bash-service-type (service home-bash-service-type
(home-bash-configuration (home-bash-configuration
@ -89,17 +96,18 @@
("guix-full-upgrade" ("guix-full-upgrade"
. "guix-pull && reconfigure"))) . "guix-pull && reconfigure")))
(bashrc (bashrc
(list (local-file "prompt.sh"))))) (list (local-file "prompt.sh")
(local-file "direnv.sh")))))
(service home-dotfiles-service-type (service home-dotfiles-service-type
(home-dotfiles-configuration (home-dotfiles-configuration
(directories '("../../files")))) (directories '("../../files"))))
(service home-secretsd-service-type) ;(service home-secretsd-service-type)
(service home-flatpak-service-type ;(service home-flatpak-service-type
(home-flatpak-configuration ; (home-flatpak-configuration
(apps '("in.cinny.Cinny")))) ; (apps '("in.cinny.Cinny"))))
(service home-emacs-service-type (service home-emacs-service-type
(home-emacs-configuration (home-emacs-configuration
(emacs guixmacs) (emacs (tune guixmacs))
(config-file (config-file
(local-file "./emacs/config.el")) (local-file "./emacs/config.el"))
(early-config-file (early-config-file

View file

@ -44,6 +44,7 @@
emacs-cape emacs-cape
emacs-vertico emacs-vertico
emacs-orderless emacs-orderless
emacs-zig-mode
font-iosevka font-iosevka

View file

@ -11,10 +11,7 @@
(define %my-desktop-services (define %my-desktop-services
(modify-services %desktop-services (modify-services %desktop-services
(gdm-service-type config => (delete gdm-service-type)
(gdm-configuration
(inherit config)
(wayland? #t)))
(elogind-service-type config => (elogind-service-type config =>
(elogind-configuration (elogind-configuration
(inherit config) (inherit config)