mirror of
https://codeberg.org/hako/Rosenthal.git
synced 2026-11-29 22:58:06 +00:00
services: Add a few desktop services.
* LICENSES/CC-BY-SA-4.0.txt: New file. * modules/rosenthal/examples/emacs/fonts.el: New file. * modules/rosenthal/examples/emacs/init.el: New file. * modules/rosenthal/examples/mako.conf: New file. * modules/rosenthal/examples/niri.kdl: New file. * modules/rosenthal/examples/wallpaper.jpg: New file. * modules/rosenthal/examples/waybar/config.jsonc: New file. * modules/rosenthal/examples/waybar/style.css: New file. * modules/rosenthal/services/desktop.scm (%rosenthal-example-emacs-fonts) (%rosenthal-example-emacs-init, %rosenthal-desktop-home-services) (home-blueman-applet-service-type, home-fcitx5-service-type) (home-mako-service-type, home-network-manager-applet-service-type) (home-niri-service-type, home-rofi-service-type, home-swaybg-service-type) (home-waybar-service-type): New variables. (home-blueman-applet-configuration, home-fcitx5-configuration) (home-mako-configuration, home-network-manager-applet-configuration) (home-niri-configuration, home-rofi-configuration, home-swaybg-configuration) (home-waybar-configuration): New data types.
This commit is contained in:
10 files changed
+2014
-3
No files matched your search
@@ -0,0 +1,69 @@
|
||||
;; SPDX-FileCopyrightText: DogLooksGood <doglooksgood@hotmail.com>
|
||||
;; SPDX-FileCopyrightText: 2022 Nyk Ma <i@nyk.ma>
|
||||
;;
|
||||
;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
;; https://github.com/DogLooksGood/meomacs/blob/master/laf.org
|
||||
;; https://github.com/nykma/nema/blob/develop/my-sample/font.el
|
||||
|
||||
(defvar nema--font-size 12 "Font size")
|
||||
(defvar nema-fonts '((mono . "monospace")
|
||||
(sans . "sans")
|
||||
(serif . "serif")
|
||||
(cjk . "Noto Serif CJK SC")
|
||||
(symbol . "Noto Color Emoji")
|
||||
(modeline . "Source Serif 4"))
|
||||
"Fonts to use.")
|
||||
|
||||
(defun nema//get-font-family (key)
|
||||
(alist-get key nema-fonts))
|
||||
|
||||
(defun nema//generate-font-spec (key)
|
||||
(format "%s-%d"
|
||||
(nema//get-font-family key)
|
||||
nema--font-size))
|
||||
|
||||
(defun nema//load-base-font ()
|
||||
"Load the default font for ascii characters."
|
||||
(let* ((font-spec (nema//generate-font-spec 'mono)))
|
||||
(set-frame-parameter nil 'font font-spec)
|
||||
(add-to-list 'default-frame-alist (cons 'font font-spec))))
|
||||
|
||||
(defun nema//load-face-font ()
|
||||
"Load fonts used in faces.
|
||||
|
||||
This function must be called after frame creation."
|
||||
(let ((mono (nema//generate-font-spec 'mono))
|
||||
(sans (nema//generate-font-spec 'sans))
|
||||
(serif (nema//generate-font-spec 'sans-serif))
|
||||
(modeline (nema//generate-font-spec 'modeline)))
|
||||
(set-face-attribute 'variable-pitch nil :font sans)
|
||||
(set-face-attribute 'variable-pitch-text nil :font serif)
|
||||
(set-face-attribute 'fixed-pitch nil :font mono)
|
||||
(set-face-attribute 'fixed-pitch-serif nil :font mono)
|
||||
(set-face-attribute 'mode-line nil :font modeline)
|
||||
(set-face-attribute 'mode-line-inactive nil :font modeline)))
|
||||
|
||||
(defun nema//load-ext-font ()
|
||||
"Load fonts used for non-ascii characters.
|
||||
|
||||
This function must be called after frame creation."
|
||||
(let ((font (frame-parameter nil 'font))
|
||||
(font-spec-cjk (font-spec :family (nema//get-font-family 'cjk)))
|
||||
(font-spec-symbol (font-spec :family (nema//get-font-family 'symbol))))
|
||||
(dolist (charset '(kana han hangul cjk-misc bopomofo))
|
||||
(set-fontset-font font charset font-spec-cjk))
|
||||
(set-fontset-font font 'symbol font-spec-symbol)))
|
||||
|
||||
(defun nema/load-font ()
|
||||
"Load all font configuration."
|
||||
(interactive)
|
||||
(when (display-graphic-p)
|
||||
(nema//load-base-font)
|
||||
(nema//load-ext-font)
|
||||
(nema//load-face-font)))
|
||||
|
||||
(if (daemonp)
|
||||
(add-hook 'server-after-make-frame-hook #'nema/load-font)
|
||||
;; Else: not in daemon
|
||||
(add-hook 'after-init-hook #'nema/load-font))
|
||||
@@ -0,0 +1,179 @@
|
||||
;;; -*- lexical-binding: t -*-
|
||||
;;; SPDX-FileCopyrightText: 2025 Hilton Chain <hako@ultrarare.space>
|
||||
;;;
|
||||
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
;;;
|
||||
;;; Init
|
||||
;;;
|
||||
|
||||
(use-package emacs
|
||||
:custom
|
||||
(blink-cursor-mode nil)
|
||||
(browse-url-firefox-program "librewolf")
|
||||
(completion-ignore-case t)
|
||||
(enable-recursive-minibuffers t)
|
||||
(fringe-mode 0)
|
||||
(global-completion-preview-mode t)
|
||||
(indent-tabs-mode nil)
|
||||
(pixel-scroll-precision-mode t)
|
||||
(read-buffer-completion-ignore-case t)
|
||||
(read-extended-command-predicate 'command-completion-default-include-p)
|
||||
(read-file-name-completion-ignore-case t)
|
||||
(scroll-bar-mode nil)
|
||||
(shell-file-name "/bin/sh")
|
||||
(tool-bar-mode nil)
|
||||
(tooltip-mode nil)
|
||||
(word-wrap-by-category t)
|
||||
(modus-themes-italic-constructs t)
|
||||
:init
|
||||
(setopt custom-file (locate-user-emacs-file "custom.el"))
|
||||
(if (not (file-exists-p custom-file))
|
||||
(make-empty-file custom-file)
|
||||
(load custom-file))
|
||||
(gcmh-mode 1)
|
||||
(no-littering-theme-backups)
|
||||
(load-file (locate-user-emacs-file "fonts.el"))
|
||||
:config
|
||||
(setopt electric-indent-inhibit t)
|
||||
:hook
|
||||
((after-init . electric-pair-mode)
|
||||
(after-init . menu-bar-mode)
|
||||
(after-init . minibuffer-depth-indicate-mode)
|
||||
(after-init . savehist-mode)
|
||||
(before-save . delete-trailing-whitespace)
|
||||
(prog-mode . display-fill-column-indicator-mode))
|
||||
:bind (([remap list-buffers] . switch-to-buffer)))
|
||||
|
||||
|
||||
;;;
|
||||
;;; Interface
|
||||
;;;
|
||||
|
||||
(use-package emacs
|
||||
:custom
|
||||
(modus-themes-italic-constructs t)
|
||||
:config
|
||||
(load-theme 'modus-operandi-tinted :no-confirm))
|
||||
|
||||
(use-package doom-modeline
|
||||
:custom
|
||||
(doom-modeline-icon nil)
|
||||
(doom-modeline-height 18)
|
||||
:hook
|
||||
(after-init . doom-modeline-mode))
|
||||
|
||||
(use-package helpful
|
||||
:bind
|
||||
(([remap describe-function] . helpful-callable)
|
||||
([remap describe-variable] . helpful-variable)
|
||||
([remap describe-key] . helpful-key)
|
||||
([remap describe-command] . helpful-command)
|
||||
([remap describe-symbol] . helpful-symbol)
|
||||
("C-c C-d" . helpful-at-point)))
|
||||
|
||||
(use-package hl-todo
|
||||
:custom
|
||||
(hl-todo-highlight-punctuation ":")
|
||||
:hook
|
||||
(prog-mode . hl-todo-mode))
|
||||
|
||||
(use-package isearch
|
||||
:custom
|
||||
(isearch-lazy-count t)
|
||||
(isearch-wrap-pause 'no-ding)
|
||||
(regexp-search-ring-max 200)
|
||||
(search-ring-max 200))
|
||||
|
||||
(use-package mwim
|
||||
:bind
|
||||
(([remap move-beginning-of-line] . mwim-beginning)
|
||||
([remap move-end-of-line] . mwim-end)))
|
||||
|
||||
(use-package orderless
|
||||
:custom
|
||||
(completion-styles '(orderless basic))
|
||||
(completion-category-overrides '((file (styles basic partial-completion))))
|
||||
(orderless-matching-styles '(orderless-literal orderless-flex orderless-regexp)))
|
||||
|
||||
(use-package paren
|
||||
:custom
|
||||
(show-paren-context-when-offscreen 'overlay)
|
||||
:hook
|
||||
(after-init . show-paren-mode))
|
||||
|
||||
(use-package rainbow-delimiters
|
||||
:hook
|
||||
(prog-mode . rainbow-delimiters-mode))
|
||||
|
||||
(use-package vertico
|
||||
:hook
|
||||
(after-init . vertico-mode))
|
||||
|
||||
(use-package vertico-directory
|
||||
:after (vertico)
|
||||
:bind
|
||||
(:map vertico-map
|
||||
("RET" . vertico-directory-enter)
|
||||
("DEL" . vertico-directory-delete-char)
|
||||
("M-DEL" . vertico-directory-delete-word))
|
||||
:hook
|
||||
(rfn-eshadow-update-overlay . vertico-directory-tidy))
|
||||
|
||||
(use-package which-key
|
||||
:config
|
||||
(which-key-setup-side-window-right-bottom)
|
||||
:hook
|
||||
(after-init . which-key-mode))
|
||||
|
||||
|
||||
;;;
|
||||
;;; Editing
|
||||
;;;
|
||||
|
||||
(use-package macrostep
|
||||
:bind
|
||||
("C-c e" . macrostep-expand))
|
||||
|
||||
(use-package puni
|
||||
:hook
|
||||
((eval-expression-minibuffer-setup nxml-mode prog-mode sgml-mode tex-mode) . puni-mode))
|
||||
|
||||
|
||||
;;;
|
||||
;;; Miscellaneous
|
||||
;;;
|
||||
|
||||
(use-package daemons
|
||||
:custom
|
||||
(daemons-list-fill-frame t))
|
||||
|
||||
(use-package dired
|
||||
:custom
|
||||
(dired-listing-switches
|
||||
"-lv --all --group-directories-first --human-readable")
|
||||
:bind
|
||||
([remap list-directory] . dired))
|
||||
|
||||
(use-package dired-aux
|
||||
:custom
|
||||
(dired-compress-directory-default-suffix ".tar.zst")
|
||||
(dired-create-destination-dirs 'ask)
|
||||
(dired-create-destination-dirs-on-trailing-dirsep t)
|
||||
(dired-vc-rename-file t))
|
||||
|
||||
(use-package envrc
|
||||
:hook
|
||||
(after-init . envrc-global-mode))
|
||||
|
||||
(use-package magit
|
||||
:custom
|
||||
(git-commit-cd-to-toplevel t)
|
||||
:config
|
||||
(add-to-list 'project-switch-commands '(magit-project-status "Magit") t)
|
||||
:bind
|
||||
(:map project-prefix-map
|
||||
("m" . magit-project-status)))
|
||||
|
||||
(use-package forge
|
||||
:after (magit))
|
||||
Reference in new issue
Block a user