guix-config

guix system configuration/declaration
git clone git://git.eonn.xyz/guix-config.git
Log | Files | Refs | LICENSE

commit 175cf44ad9293955c49ca2656954758d4596142f
parent 59fbca26c19b2d89e2aee696783e261438e9b52f
Author: Ian Ressa <ian@eonn.xyz>
Date:   Wed, 19 Oct 2022 17:48:50 -0400

[WIP] experimenting with using Guix Home to manage dotfiles and stuffs

Diffstat:
Adotfiles | 2++
Ahome/cocles.scm | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/shmage/guix/dotfiles.scm | 73+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/shmage/guix/dotfiles/Xresources | 2++
Amodules/shmage/guix/dotfiles/bash_profile | 45+++++++++++++++++++++++++++++++++++++++++++++
Amodules/shmage/guix/dotfiles/bashrc | 31+++++++++++++++++++++++++++++++
Amodules/shmage/guix/dotfiles/bin/guix-reconfigure.sh | 16++++++++++++++++
Amodules/shmage/guix/dotfiles/bin/guix-update-profiles.sh | 56++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/shmage/guix/dotfiles/bin/lockscreen.sh | 28++++++++++++++++++++++++++++
Amodules/shmage/guix/dotfiles/bin/session-reboot | 3+++
Amodules/shmage/guix/dotfiles/bin/session-shutdown | 3+++
Amodules/shmage/guix/dotfiles/bin/session-suspend | 4++++
Amodules/shmage/guix/dotfiles/config/alacritty/alacritty.yml | 18++++++++++++++++++
Amodules/shmage/guix/dotfiles/config/dunst/dunstrc | 436+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/shmage/guix/dotfiles/config/gtk-3.0/settings.ini | 16++++++++++++++++
Amodules/shmage/guix/dotfiles/emacs.d/init.el | 29+++++++++++++++++++++++++++++
Amodules/shmage/guix/dotfiles/emacs.d/init/custom.el | 28++++++++++++++++++++++++++++
Amodules/shmage/guix/dotfiles/emacs.d/init/irc.el | 5+++++
Amodules/shmage/guix/dotfiles/emacs.d/init/org.el | 26++++++++++++++++++++++++++
Amodules/shmage/guix/dotfiles/emacs.d/init/packages.el | 27+++++++++++++++++++++++++++
Amodules/shmage/guix/dotfiles/emacs.d/init/visual.el | 11+++++++++++
Amodules/shmage/guix/dotfiles/emacs.d/snippets/latex-mode/generic-section | 7+++++++
Amodules/shmage/guix/dotfiles/emacs.d/snippets/latex-mode/generic-subsection | 7+++++++
Amodules/shmage/guix/dotfiles/emacs.d/snippets/latex-mode/inlinemath | 7+++++++
Amodules/shmage/guix/dotfiles/emacs.d/snippets/latex-mode/math | 9+++++++++
Amodules/shmage/guix/dotfiles/emacs.d/snippets/latex-mode/power | 7+++++++
Amodules/shmage/guix/dotfiles/emacs.d/snippets/latex-mode/proof | 9+++++++++
Amodules/shmage/guix/dotfiles/emacs.d/snippets/latex-mode/subscript | 7+++++++
Amodules/shmage/guix/dotfiles/emacs.d/snippets/latex-mode/subscriptston | 7+++++++
Amodules/shmage/guix/dotfiles/emacs.d/themes/wizard-theme.el | 52++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/shmage/guix/dotfiles/gtkrc-2.0 | 19+++++++++++++++++++
Amodules/shmage/guix/dotfiles/icons/default/index.theme | 2++
Amodules/shmage/guix/dotfiles/stumpwm.d/binds.lisp | 78++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amodules/shmage/guix/dotfiles/stumpwm.d/init.lisp | 36++++++++++++++++++++++++++++++++++++
Amodules/shmage/guix/dotfiles/stumpwm.d/mode-line.lisp | 22++++++++++++++++++++++
Amodules/shmage/guix/dotfiles/stumpwm.d/visual.lisp | 17+++++++++++++++++
Amodules/shmage/guix/dotfiles/tmux.conf | 8++++++++
Amodules/shmage/guix/dotfiles/xinitrc | 15+++++++++++++++
38 files changed, 1229 insertions(+), 0 deletions(-)

diff --git a/dotfiles b/dotfiles @@ -0,0 +1 @@ +modules/shmage/guix/dotfiles +\ No newline at end of file diff --git a/home/cocles.scm b/home/cocles.scm @@ -0,0 +1,61 @@ +;; This "home-environment" file can be passed to 'guix home reconfigure' +;; to reproduce the content of your profile. This is "symbolic": it only +;; specifies package names. To reproduce the exact same profile, you also +;; need to capture the channels being used, as returned by "guix describe". +;; See the "Replicating Guix" section in the manual. + +(use-modules (gnu home) + (gnu packages) + (gnu services) + (guix gexp) + (gnu home services shells) + (shmage guix dotfiles)) + +(home-environment + ;; Below is the list of packages that will show up in your + ;; Home profile, under ~/.guix-home/profile. + (packages (specifications->packages (list + "obs" + "gimp" + "nheko" + "gparted" + "parted" + "minetest" + "vlc" + "sdl2" + "piper" + "xfontsel" + "go" + "flameshot" + "lxappearance" + "tootle" + "godot" + "lmms" + "blender" + "inkscape" + "monero-gui" + "xfce4-taskmanager" + "git" + "flatpak" + "git:send-email" + "dolphin-emu" + "ardour" + "bind:utils" + "python-posix-ipc" + "figlet" + "vulkan-loader" + "libxinerama" + "openssl" + "p7zip" + "vde2" + "qrencode" + "nethack" + "xorgproto" + "font-wqy-microhei" + "guile" + "bridge-utils" + "neofetch"))) + + ;; Below is the list of Home services. To search for available + ;; services, run 'guix home search KEYWORD' in a terminal. + (services home-services)) diff --git a/modules/shmage/guix/dotfiles.scm b/modules/shmage/guix/dotfiles.scm @@ -0,0 +1,73 @@ +(define-module (shmage guix dotfiles) + #:use-module (gnu home) + #:use-module (gnu home services) + #:use-module (gnu home services symlink-manager) + #:use-module (gnu packages) + #:use-module (gnu services) + #:use-module (guix gexp) + #:use-module (gnu home services shells) + #:export (home-services) + #:export (dotfile->dotfile-pair) + #:export (dotfiles)) + +(define (undotify-dotfile file) +;; Guix Home is kind of silly and doesn't like it when your dotfiles repository +;; has actual dotfiles in it. +(let ((l (string->list file))) (if (char=? #\. (car l)) (list->string (cdr l)) file))) + +(define-syntax-rule (dotfile->dotfilepair dotfile) + (list dotfile (local-file (string-append "/home/ian/guix-config/dotfiles/" (undotify-dotfile dotfile))))) + +(define-syntax-rule (dotfiles->dotfilepairs file ...) + (map (lambda (n) (dotfile->dotfilepair n)) (list file ...))) + +(define home-services + (list (service home-bash-service-type + (home-bash-configuration + (bashrc (list (local-file "dotfiles/bashrc" + (undotify-dotfile ".bashrc")))) + (bash-profile (list (local-file + "dotfiles/bash_profile" + (undotify-dotfile ".bash_profile")))))) + + (simple-service 'dotfiles-init + home-files-service-type + (dotfiles->dotfilepairs + ;; Emacs + ".emacs.d/init.el" + ".emacs.d/init/irc.el" + ".emacs.d/init/org.el" + ".emacs.d/init/packages.el" + ".emacs.d/init/visual.el" + ;;;; YASnippet + ".emacs.d/snippets/latex-mode/generic-section" + ".emacs.d/snippets/latex-mode/generic-subsection" + ".emacs.d/snippets/latex-mode/inlinemath" + ".emacs.d/snippets/latex-mode/math" + ".emacs.d/snippets/latex-mode/proof" + ;;;; Themes + ".emacs.d/themes/wizard-theme.el" + + ;; Scripts + "bin/guix-reconfigure.sh" + "bin/guix-update-profiles.sh" + "bin/lockscreen.sh" + "bin/session-reboot" + "bin/session-shutdown" + "bin/session-suspend" + + ;;misc HOME/.files + ".Xresources" + ".tmux.conf" + ".xinitrc" + ".gtkrc-2.0" + ".icons/default/index.theme" + )) + + (simple-service 'xdg-config-init + home-xdg-configuration-files-service-type + (dotfiles->dotfilepairs + ".config/alacritty/alacritty.yml" + ".config/dunst/dunstrc" + ".config/gtk-3.0/settings.ini" + )))) diff --git a/modules/shmage/guix/dotfiles/Xresources b/modules/shmage/guix/dotfiles/Xresources @@ -0,0 +1 @@ +Xcursor.size: 12 +\ No newline at end of file diff --git a/modules/shmage/guix/dotfiles/bash_profile b/modules/shmage/guix/dotfiles/bash_profile @@ -0,0 +1,45 @@ +xorg_start(){ + SYSTEM_PROFILE="/run/current-system/profile" + exec $SYSTEM_PROFILE/bin/xinit -- $SYSTEM_PROFILE/bin/Xorg :0 vt1 -keeptty \ + -configdir $SYSTEM_PROFILE/share/X11/xorg.conf.d \ + -modulepath $SYSTEM_PROFILE/lib/xorg/modules +} + +SYSTEM_PROFILE="/run/current-system/profile" +GUIX_PROFILE="/home/ian/.guix-profile" +. "$GUIX_PROFILE"/etc/profile +XDG_DATA_DIRS="$SYSTEM_PROFILE"/share:"$GUIX_PROFILE"/share +XDG_CONFIG_DIRS="$SYSTEM_PROFILE"/etc:"$GUIX_PROFILE"/etc + +GUIX_EXTRA_PROFILES="/home/ian/.guix-extra-profiles" + +for i in $GUIX_EXTRA_PROFILES/*; do + profile=$i/$(basename "$i") + if [ -f "$profile"/etc/profile ]; then + GUIX_PROFILE="$profile" + . "$GUIX_PROFILE"/etc/profile + XDG_DATA_DIRS="$XDG_DATA_DIRS":"$GUIX_PROFILE"/share + XDG_CONFIG_DIRS="$XDG_CONFIG_DIRS":"$GUIX_PROFILE"/etc + fi + unset profile +done + +GUIX_PROFILE="/home/ian/.guix-profile" + +export XDG_DATA_DIRS +export XDG_CONFIG_DIRS + +export HOME=/home/ian +export PATH="$PATH:$HOME/bin" +export EDITOR="emacs" + +export GUIX_PACKAGE_PATH="/home/ian/guix-config/guix-package-path" +export GUILE_LOAD_PATH="$GUILE_LOAD_PATH":/home/ian/guix-config/modules + +EMACS_PROFILE="$GUIX_EXTRA_PROFILES"/emacs/emacs +export EMACSLOADPATH="$EMACSLOADPATH":"$EMACS_PROFILE"/share/emacs/site-lisp:"$GUIX_PROFILE"/share/emacs/site-lisp + +if shopt -q login_shell; then + [[ -f ~/.bashrc ]] && source ~/.bashrc + [[ -t 0 && $(tty) == /dev/tty1 && ! $DISPLAY ]] && xorg_start +fi diff --git a/modules/shmage/guix/dotfiles/bashrc b/modules/shmage/guix/dotfiles/bashrc @@ -0,0 +1,31 @@ +export SHELL + +if [[ $- != *i* ]] +then + [[ -n "$SSH_CLIENT" ]] && source /etc/profile + + return +fi + +source /etc/bashrc + +if command -v tmux >/dev/null 2>&1 && ! shopt -q login_shell ; then + [ -z "${TMUX}" ] && (tmux attach || tmux) >/dev/null 2>&1 +fi + +if [ -n "$GUIX_ENVIRONMENT" ] +then + PS1='\[\033[1;32m\]\u@\h\[\033[0m\] (\[\033[0;36m\]\W\[\033[0m\])[\t] [env]\$ ' +else + PS1='\[\033[1;32m\]\u@\h\[\033[0m\] (\[\033[0;36m\]\W\[\033[0m\])[\t] \$ ' +fi + +alias scrot="scrot -s ~/Pictures/screenshots/%Y-%m%d$s.png" +alias ls="ls -lah --color=always" +alias reboot="sudo reboot" + +alias orgpush="rsync --filter='- *~' -azv ~/.org/ ian@eonn.xyz:/home/ian/.org/" +alias orgpull="rsync --filter='- *~' -azv ian@eonn.xyz:/home/ian/.org/ ~/.org/" + +alias dot="git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME" +alias tphack="sudo modprobe -r psmouse; sudo modprobe psmouse" diff --git a/modules/shmage/guix/dotfiles/bin/guix-reconfigure.sh b/modules/shmage/guix/dotfiles/bin/guix-reconfigure.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +GUIX_SYSTEMS=~/guix-config/system +HOST="" + +if [ "$#" -eq 0 ]; then + if [ -f "$GUIX_SYSTEMS"/"$(hostname)".scm ]; then + HOST="$(hostname)" + else + echo "Please provide a system configuration name." && exit 1 + fi +else + HOST="$1" +fi +CMD="sudo -E guix system --no-bootloader reconfigure "$HOME"/guix-config/system/"$HOST".scm" +echo "$CMD" && $CMD diff --git a/modules/shmage/guix/dotfiles/bin/guix-update-profiles.sh b/modules/shmage/guix/dotfiles/bin/guix-update-profiles.sh @@ -0,0 +1,56 @@ +#!/bin/sh + +GUIX_EXTRA_PROFILES="$HOME/.guix-extra-profiles" +GUIX_EXTRA_MANIFESTS="$HOME/guix-config/manifest" +USER_PROFILE="$HOME/.guix-profile" +UPDATE_USER_PROFILE=false + +declare -a PROFILEDIRS +if [ "$#" -eq 0 ]; then + mapfile -d '' PROFILEDIRS < <(find "$GUIX_EXTRA_PROFILES"/ -maxdepth 1 -not -path "$GUIX_EXTRA_PROFILES"/ -print0) + UPDATE_USER_PROFILE=true +else + for i in "$@"; do + profiledirs="$(find "$GUIX_EXTRA_PROFILES"/ -maxdepth 1 -not -path "$GUIX_EXTRA_PROFILES"/ -name "$i")" + if $(echo "$profiledirs" | grep -v .); then + if [ "$i" == "user" ]; then + UPDATE_USER_PROFILE=true + else + echo "WARNING: Can't find profile \""$i"\" in GUIX_EXTRA_PROFILES, skipping" + fi + else + [[ "$PROFILEDIRS[*]" =~ "$profiledirs" ]] || PROFILEDIRS+=("$profiledirs") + fi + done +fi + +$UPDATE_USER_PROFILE && echo "Queueing user profile "$USER_PROFILE"..." && CMDS+=("guix package -u") +for i in "${PROFILEDIRS[@]}"; do + profile="$i"/$(basename "$i") + manifest="$GUIX_EXTRA_MANIFESTS"/"$(basename "$i")".scm + if [ -f "$manifest" ]; then + echo "Queueing "$i"..." + CMDS+=("guix package --manifest="$manifest" --profile="$profile"") + else + echo "WARNING: Can't find manifest \""$manifest"\" for \""$profile"\", skipping" + fi +done + +if (( ${#CMDS[@]} == 0 )); then + echo "Nothing to do, quitting..." +else + echo "The following will be run:" + for cmd in "${CMDS[@]}"; do + echo "$cmd" + done + read -p "Proceed? [Y/n] " re + case "$re" in [yY][eE][sS]|[yY]|'') + echo + for cmd in "${CMDS[@]}"; do + echo "$cmd" + $cmd + done + echo "Done with updates, exiting..." + ;; + esac +fi diff --git a/modules/shmage/guix/dotfiles/bin/lockscreen.sh b/modules/shmage/guix/dotfiles/bin/lockscreen.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +FORTUNE_TEXT=$(fortune -s) + +i3lock \ + --radius 80 \ + --ring-color='#999999ff' \ + --ring-width=5 \ + --line-uses-inside \ + --inside-color='#ffffff33' \ + --keyhl-color='#145ba6ff' \ + --separator-color='#00000000' \ + --greeter-text="$FORTUNE_TEXT" \ + --verif-text='' \ + --wrong-text='' \ + --noinput-text='' \ + --lock-text='' \ + --time-font=Termsyn.Icons-Regular \ + --date-font=Termsyn.Icons-Regular \ + --greeter-font=sans-serif \ + --verif-font=Termsyn.Icons-Regular \ + --wrong-font=Termsyn.Icons-Regular \ + --time-size=13 \ + --date-size=13 \ + --greeter-size=14 \ + --indicator \ + --clock \ + --blur 8 diff --git a/modules/shmage/guix/dotfiles/bin/session-reboot b/modules/shmage/guix/dotfiles/bin/session-reboot @@ -0,0 +1,3 @@ +#!/bin/sh + +loginctl reboot diff --git a/modules/shmage/guix/dotfiles/bin/session-shutdown b/modules/shmage/guix/dotfiles/bin/session-shutdown @@ -0,0 +1,3 @@ +#!/bin/sh + +loginctl poweroff diff --git a/modules/shmage/guix/dotfiles/bin/session-suspend b/modules/shmage/guix/dotfiles/bin/session-suspend @@ -0,0 +1,4 @@ +#!/bin/sh + +/home/ian/bin/lockscreen.sh & +loginctl suspend diff --git a/modules/shmage/guix/dotfiles/config/alacritty/alacritty.yml b/modules/shmage/guix/dotfiles/config/alacritty/alacritty.yml @@ -0,0 +1,17 @@ +background_opacity: 0.85 + +font: + normal: + family: Termsyn + style: Regular + + bold: + family: Termsyn + style: Bold + + size: 13 + +colors: + primary: + background: '#15132f' + foreground: '#bbbbff' +\ No newline at end of file diff --git a/modules/shmage/guix/dotfiles/config/dunst/dunstrc b/modules/shmage/guix/dotfiles/config/dunst/dunstrc @@ -0,0 +1,436 @@ +# See dunst(5) for all configuration options + +[global] + ### Display ### + + # Which monitor should the notifications be displayed on. + monitor = 0 + + # Display notification on focused monitor. Possible modes are: + # mouse: follow mouse pointer + # keyboard: follow window with keyboard focus + # none: don't follow anything + # + # "keyboard" needs a window manager that exports the + # _NET_ACTIVE_WINDOW property. + # This should be the case for almost all modern window managers. + # + # If this option is set to mouse or keyboard, the monitor option + # will be ignored. + follow = none + + ### Geometry ### + + # dynamic width from 0 to 300 + # width = (0, 300) + # constant width of 300 + width = 300 + + # The maximum height of a single notification, excluding the frame. + height = 300 + + # Position the notification in the top right corner + origin = top-right + + # Offset from the origin + offset = 10x50 + + # Scale factor. It is auto-detected if value is 0. + scale = 0 + + # Maximum number of notification (0 means no limit) + notification_limit = 0 + + ### Progress bar ### + + # Turn on the progess bar. It appears when a progress hint is passed with + # for example dunstify -h int:value:12 + progress_bar = true + + # Set the progress bar height. This includes the frame, so make sure + # it's at least twice as big as the frame width. + progress_bar_height = 10 + + # Set the frame width of the progress bar + progress_bar_frame_width = 1 + + # Set the minimum width for the progress bar + progress_bar_min_width = 150 + + # Set the maximum width for the progress bar + progress_bar_max_width = 300 + + + # Show how many messages are currently hidden (because of + # notification_limit). + indicate_hidden = yes + + # The transparency of the window. Range: [0; 100]. + # This option will only work if a compositing window manager is + # present (e.g. xcompmgr, compiz, etc.). (X11 only) + transparency = 0 + + # Draw a line of "separator_height" pixel height between two + # notifications. + # Set to 0 to disable. + separator_height = 2 + + # Padding between text and separator. + padding = 8 + + # Horizontal padding. + horizontal_padding = 8 + + # Padding between text and icon. + text_icon_padding = 0 + + # Defines width in pixels of frame around the notification window. + # Set to 0 to disable. + frame_width = 3 + + # Defines color of the frame around the notification window. + frame_color = "#aaaaaa" + + # Define a color for the separator. + # possible values are: + # * auto: dunst tries to find a color fitting to the background; + # * foreground: use the same color as the foreground; + # * frame: use the same color as the frame; + # * anything else will be interpreted as a X color. + separator_color = frame + + # Sort messages by urgency. + sort = yes + + # Don't remove messages, if the user is idle (no mouse or keyboard input) + # for longer than idle_threshold seconds. + # Set to 0 to disable. + # A client can set the 'transient' hint to bypass this. See the rules + # section for how to disable this if necessary + # idle_threshold = 120 + + ### Text ### + + font = Termsyn 10 + + # The spacing between lines. If the height is smaller than the + # font height, it will get raised to the font height. + line_height = 0 + + # Possible values are: + # full: Allow a small subset of html markup in notifications: + # <b>bold</b> + # <i>italic</i> + # <s>strikethrough</s> + # <u>underline</u> + # + # For a complete reference see + # <https://docs.gtk.org/Pango/pango_markup.html>. + # + # strip: This setting is provided for compatibility with some broken + # clients that send markup even though it's not enabled on the + # server. Dunst will try to strip the markup but the parsing is + # simplistic so using this option outside of matching rules for + # specific applications *IS GREATLY DISCOURAGED*. + # + # no: Disable markup parsing, incoming notifications will be treated as + # plain text. Dunst will not advertise that it has the body-markup + # capability if this is set as a global setting. + # + # It's important to note that markup inside the format option will be parsed + # regardless of what this is set to. + markup = full + + # The format of the message. Possible variables are: + # %a appname + # %s summary + # %b body + # %i iconname (including its path) + # %I iconname (without its path) + # %p progress value if set ([ 0%] to [100%]) or nothing + # %n progress value if set without any extra characters + # %% Literal % + # Markup is allowed + format = "<b>%s</b>\n%b" + + # Alignment of message text. + # Possible values are "left", "center" and "right". + alignment = left + + # Vertical alignment of message text and icon. + # Possible values are "top", "center" and "bottom". + vertical_alignment = center + + # Show age of message if message is older than show_age_threshold + # seconds. + # Set to -1 to disable. + show_age_threshold = 60 + + # Specify where to make an ellipsis in long lines. + # Possible values are "start", "middle" and "end". + ellipsize = middle + + # Ignore newlines '\n' in notifications. + ignore_newline = no + + # Stack together notifications with the same content + stack_duplicates = true + + # Hide the count of stacked notifications with the same content + hide_duplicate_count = false + + # Display indicators for URLs (U) and actions (A). + show_indicators = yes + + ### Icons ### + + # Align icons left/right/off + icon_position = left + + # Scale small icons up to this size, set to 0 to disable. Helpful + # for e.g. small files or high-dpi screens. In case of conflict, + # max_icon_size takes precedence over this. + min_icon_size = 0 + + # Scale larger icons down to this size, set to 0 to disable + max_icon_size = 32 + + # Paths to default icons. + icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/ + + ### History ### + + # Should a notification popped up from history be sticky or timeout + # as if it would normally do. + sticky_history = yes + + # Maximum amount of notifications kept in history + history_length = 20 + + ### Misc/Advanced ### + + # dmenu path. + dmenu = /usr/bin/dmenu -p dunst: + + # Browser for opening urls in context menu. + browser = /usr/bin/xdg-open + + # Always run rule-defined scripts, even if the notification is suppressed + always_run_script = true + + # Define the title of the windows spawned by dunst + title = Dunst + + # Define the class of the windows spawned by dunst + class = Dunst + + # Define the corner radius of the notification window + # in pixel size. If the radius is 0, you have no rounded + # corners. + # The radius will be automatically lowered if it exceeds half of the + # notification height to avoid clipping text and/or icons. + corner_radius = 0 + + # Ignore the dbus closeNotification message. + # Useful to enforce the timeout set by dunst configuration. Without this + # parameter, an application may close the notification sent before the + # user defined timeout. + ignore_dbusclose = false + + ### Wayland ### + # These settings are Wayland-specific. They have no effect when using X11 + + # Uncomment this if you want to let notications appear under fullscreen + # applications (default: overlay) + # layer = top + + # Set this to true to use X11 output on Wayland. + force_xwayland = false + + ### Legacy + + # Use the Xinerama extension instead of RandR for multi-monitor support. + # This setting is provided for compatibility with older nVidia drivers that + # do not support RandR and using it on systems that support RandR is highly + # discouraged. + # + # By enabling this setting dunst will not be able to detect when a monitor + # is connected or disconnected which might break follow mode if the screen + # layout changes. + force_xinerama = false + + ### mouse + + # Defines list of actions for each mouse event + # Possible values are: + # * none: Don't do anything. + # * do_action: Invoke the action determined by the action_name rule. If there is no + # such action, open the context menu. + # * open_url: If the notification has exactly one url, open it. If there are multiple + # ones, open the context menu. + # * close_current: Close current notification. + # * close_all: Close all notifications. + # * context: Open context menu for the notification. + # * context_all: Open context menu for all notifications. + # These values can be strung together for each mouse event, and + # will be executed in sequence. + mouse_left_click = close_current + mouse_middle_click = do_action, close_current + mouse_right_click = close_all + +# Experimental features that may or may not work correctly. Do not expect them +# to have a consistent behaviour across releases. +[experimental] + # Calculate the dpi to use on a per-monitor basis. + # If this setting is enabled the Xft.dpi value will be ignored and instead + # dunst will attempt to calculate an appropriate dpi value for each monitor + # using the resolution and physical size. This might be useful in setups + # where there are multiple screens with very different dpi values. + per_monitor_dpi = false + + +[urgency_low] + # IMPORTANT: colors have to be defined in quotation marks. + # Otherwise the "#" and following would be interpreted as a comment. + background = "#222222" + foreground = "#888888" + timeout = 4 + # Icon for notifications with low urgency, uncomment to enable + #default_icon = /path/to/icon + +[urgency_normal] + background = "#444444" + foreground = "#ffffff" + timeout = 4 + # Icon for notifications with normal urgency, uncomment to enable + #default_icon = /path/to/icon + +[urgency_critical] + background = "#900000" + foreground = "#ffffff" + frame_color = "#ff0000" + timeout = 0 + # Icon for notifications with critical urgency, uncomment to enable + #default_icon = /path/to/icon + +# Every section that isn't one of the above is interpreted as a rules to +# override settings for certain messages. +# +# Messages can be matched by +# appname (discouraged, see desktop_entry) +# body +# category +# desktop_entry +# icon +# match_transient +# msg_urgency +# stack_tag +# summary +# +# and you can override the +# background +# foreground +# format +# frame_color +# fullscreen +# new_icon +# set_stack_tag +# set_transient +# set_category +# timeout +# urgency +# skip_display +# history_ignore +# action_name +# word_wrap +# ellipsize +# alignment +# +# Shell-like globbing will get expanded. +# +# Instead of the appname filter, it's recommended to use the desktop_entry filter. +# GLib based applications export their desktop-entry name. In comparison to the appname, +# the desktop-entry won't get localized. +# +# SCRIPTING +# You can specify a script that gets run when the rule matches by +# setting the "script" option. +# The script will be called as follows: +# script appname summary body icon urgency +# where urgency can be "LOW", "NORMAL" or "CRITICAL". +# +# NOTE: It might be helpful to run dunst -print in a terminal in order +# to find fitting options for rules. + +# Disable the transient hint so that idle_threshold cannot be bypassed from the +# client +#[transient_disable] +# match_transient = yes +# set_transient = no +# +# Make the handling of transient notifications more strict by making them not +# be placed in history. +#[transient_history_ignore] +# match_transient = yes +# history_ignore = yes + +# fullscreen values +# show: show the notifications, regardless if there is a fullscreen window opened +# delay: displays the new notification, if there is no fullscreen window active +# If the notification is already drawn, it won't get undrawn. +# pushback: same as delay, but when switching into fullscreen, the notification will get +# withdrawn from screen again and will get delayed like a new notification +#[fullscreen_delay_everything] +# fullscreen = delay +#[fullscreen_show_critical] +# msg_urgency = critical +# fullscreen = show + +#[espeak] +# summary = "*" +# script = dunst_espeak.sh + +#[script-test] +# summary = "*script*" +# script = dunst_test.sh + +#[ignore] +# # This notification will not be displayed +# summary = "foobar" +# skip_display = true + +#[history-ignore] +# # This notification will not be saved in history +# summary = "foobar" +# history_ignore = yes + +#[skip-display] +# # This notification will not be displayed, but will be included in the history +# summary = "foobar" +# skip_display = yes + +#[signed_on] +# appname = Pidgin +# summary = "*signed on*" +# urgency = low +# +#[signed_off] +# appname = Pidgin +# summary = *signed off* +# urgency = low +# +#[says] +# appname = Pidgin +# summary = *says* +# urgency = critical +# +#[twitter] +# appname = Pidgin +# summary = *twitter.com* +# urgency = normal +# +#[stack-volumes] +# appname = "some_volume_notifiers" +# set_stack_tag = "volume" +# +# vim: ft=cfg diff --git a/modules/shmage/guix/dotfiles/config/gtk-3.0/settings.ini b/modules/shmage/guix/dotfiles/config/gtk-3.0/settings.ini @@ -0,0 +1,16 @@ +[Settings] +gtk-theme-name=wizard +gtk-icon-theme-name=Delft +gtk-font-name=Termsyn 10 +gtk-cursor-theme-name=Hackneyed +gtk-cursor-theme-size=1 +gtk-toolbar-style=GTK_TOOLBAR_BOTH +gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR +gtk-button-images=1 +gtk-menu-images=1 +gtk-enable-event-sounds=1 +gtk-enable-input-feedback-sounds=1 +gtk-xft-antialias=1 +gtk-xft-hinting=1 +gtk-xft-hintstyle=hintfull +gtk-xft-rgba=rgb diff --git a/modules/shmage/guix/dotfiles/emacs.d/init.el b/modules/shmage/guix/dotfiles/emacs.d/init.el @@ -0,0 +1,29 @@ +(tool-bar-mode -1) +(menu-bar-mode -1) +(scroll-bar-mode -1) +(global-set-key (kbd "C-c C") 'org-capture) +(global-set-key (kbd "C-c l") 'org-store-link) +(global-set-key (kbd "C-c a") 'org-agenda) +(global-set-key (kbd "C-c t") 'org-insert-date) +(global-set-key (kbd "C-c c") 'vterm) + +(setq initial-buffer-choice (or (getenv "PWD") ("~"))) + +(add-to-list 'load-path "/home/ian/.guix-profile/share/emacs/site-lisp") +(guix-emacs-autoload-packages) +(package-initialize) + +(defvar init-directory (expand-file-name "~/.emacs.d/init")) +(setq custom-file (format "%s/%s" init-directory "custom.el")) + +(defun load-init-file (filename) + (let ((location (format "%s/%s%s" init-directory filename ".el"))) + (or (load location 'noerror) + (apply #'message + (concat "the init file does not exist: " location))))) + +(load-init-file "visual") +(load-init-file "org") +(load-init-file "packages") +(load-init-file "irc") +(load-init-file "custom") diff --git a/modules/shmage/guix/dotfiles/emacs.d/init/custom.el b/modules/shmage/guix/dotfiles/emacs.d/init/custom.el @@ -0,0 +1,28 @@ +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(warning-suppress-types + '((comp) + (comp) + (comp) + (comp) + (comp) + (comp) + (comp) + (comp) + (comp) + (comp) + (comp) + (comp) + (comp) + (comp) + (comp) + (comp)))) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + ) diff --git a/modules/shmage/guix/dotfiles/emacs.d/init/irc.el b/modules/shmage/guix/dotfiles/emacs.d/init/irc.el @@ -0,0 +1,5 @@ +(rcirc-track-minor-mode 1) + +(setq rcirc-server-alist + '(("irc.libera.chat" :port 6697 :encryption tls + :nick "shmage"))) diff --git a/modules/shmage/guix/dotfiles/emacs.d/init/org.el b/modules/shmage/guix/dotfiles/emacs.d/init/org.el @@ -0,0 +1,26 @@ +(setq org-log-done 'time) +(setq org-todo-keywords + '((sequence "TODO(t)" + "NEXT(n)" + "START(s)" + "WAIT(w)" + "DONE(d)" + "CANCEL(c)"))) +(setq org-agenda-custom-commands + '(("c" "Simple agenda view" + ((agenda "") + (alltodo ""))))) +(setq org-capture-templates + '(("t" "TODO") + )) + +(defun org-insert-date () + (interactive) + (require 'org) + (insert (format-time-string "%m-%d-%Y" (org-read-date nil 'to-time nil "Date: ")))) + +(with-eval-after-load 'custom + (setq + org-directory "~/.org/" + org-agenda-files (list org-directory) + org-modules '(ol-bbdb ol-bibtex ol-docview ol-eww ol-gnus org-habit ol-info ol-irc ol-mhe ol-rmail ol-w3m))) diff --git a/modules/shmage/guix/dotfiles/emacs.d/init/packages.el b/modules/shmage/guix/dotfiles/emacs.d/init/packages.el @@ -0,0 +1,27 @@ +;; ParEdit +(autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t) +(add-hook 'emacs-lisp-mode-hook #'enable-paredit-mode) +(add-hook 'eval-expression-minibuffer-setup-hook #'enable-paredit-mode) +(add-hook 'ielm-mode-hook #'enable-paredit-mode) +(add-hook 'lisp-mode-hook #'enable-paredit-mode) +(add-hook 'lisp-interaction-mode-hook #'enable-paredit-mode) +(add-hook 'scheme-mode-hook #'enable-paredit-mode) +;; + +;; Geiser +(with-eval-after-load 'geiser-guile + (add-to-list 'geiser-guile-load-path "~/repos/guix")) +;; + +;; YASnippet +(require 'yasnippet) +(yas-global-mode 1) +(setq yas-snippet-dirs + '("~/.emacs.d/snippets")) +;; + +;; melpa +(require 'package) +(add-to-list 'package-archives + '("melpa" . "http://melpa.org/packages/") t) +;; diff --git a/modules/shmage/guix/dotfiles/emacs.d/init/visual.el b/modules/shmage/guix/dotfiles/emacs.d/init/visual.el @@ -0,0 +1,11 @@ +;; Transparency + (set-frame-parameter (selected-frame) 'alpha '(96 96)) + (add-to-list 'default-frame-alist '(alpha 96 96)) + +(setq custom-theme-directory (expand-file-name "~/.emacs.d/themes")) + +(with-eval-after-load 'custom + (setq custom-safe-themes t) + custom-enabled-themes '(wizard default)) + +(load-theme 'wizard) diff --git a/modules/shmage/guix/dotfiles/emacs.d/snippets/latex-mode/generic-section b/modules/shmage/guix/dotfiles/emacs.d/snippets/latex-mode/generic-section @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: generic section +# key: secn +# -- + +\\section*{$0} +\ No newline at end of file diff --git a/modules/shmage/guix/dotfiles/emacs.d/snippets/latex-mode/generic-subsection b/modules/shmage/guix/dotfiles/emacs.d/snippets/latex-mode/generic-subsection @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: generic subsection +# key: ssecn +# -- + +\\subsection*{$0} +\ No newline at end of file diff --git a/modules/shmage/guix/dotfiles/emacs.d/snippets/latex-mode/inlinemath b/modules/shmage/guix/dotfiles/emacs.d/snippets/latex-mode/inlinemath @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: inlinemath +# key: m +# -- + +\$$0\$ +\ No newline at end of file diff --git a/modules/shmage/guix/dotfiles/emacs.d/snippets/latex-mode/math b/modules/shmage/guix/dotfiles/emacs.d/snippets/latex-mode/math @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: math +# key: mm +# -- + +\\[ + $0 +\\] +\ No newline at end of file diff --git a/modules/shmage/guix/dotfiles/emacs.d/snippets/latex-mode/power b/modules/shmage/guix/dotfiles/emacs.d/snippets/latex-mode/power @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: power +# key: pow +# -- + +^{$1} $0 +\ No newline at end of file diff --git a/modules/shmage/guix/dotfiles/emacs.d/snippets/latex-mode/proof b/modules/shmage/guix/dotfiles/emacs.d/snippets/latex-mode/proof @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: proof +# key: proof +# -- + +\\begin{proof} + $0 +\\end{proof} +\ No newline at end of file diff --git a/modules/shmage/guix/dotfiles/emacs.d/snippets/latex-mode/subscript b/modules/shmage/guix/dotfiles/emacs.d/snippets/latex-mode/subscript @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: subscript +# key: subb +# -- + +_{$1} $0 +\ No newline at end of file diff --git a/modules/shmage/guix/dotfiles/emacs.d/snippets/latex-mode/subscriptston b/modules/shmage/guix/dotfiles/emacs.d/snippets/latex-mode/subscriptston @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: subscriptston +# key: subton +# -- + +$1_{$2},$1_{$3},\\dots,$1_{$4} $0 +\ No newline at end of file diff --git a/modules/shmage/guix/dotfiles/emacs.d/themes/wizard-theme.el b/modules/shmage/guix/dotfiles/emacs.d/themes/wizard-theme.el @@ -0,0 +1,52 @@ +(deftheme wizard + "wicked sweet") + +(custom-theme-set-faces + 'wizard + '(cursor ((((background light)) (:background "black")) (((background dark)) (:background "white")))) + '(fixed-pitch ((t (:family "Monospace")))) + '(variable-pitch ((((type w32)) (:foundry "outline" :family "Arial")) (t (:family "Sans Serif")))) + '(escape-glyph ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "brown")))) + '(homoglyph ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "brown")))) + '(minibuffer-prompt ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "medium blue")))) + '(highlight ((((class color) (min-colors 88) (background light)) (:background "darkseagreen2")) (((class color) (min-colors 88) (background dark)) (:background "darkolivegreen")) (((class color) (min-colors 16) (background light)) (:background "darkseagreen2")) (((class color) (min-colors 16) (background dark)) (:background "darkolivegreen")) (((class color) (min-colors 8)) (:foreground "black" :background "green")) (t (:inverse-video t)))) + '(region ((((class color) (min-colors 88) (background dark)) (:extend t :background "blue3")) (((class color) (min-colors 88) (background light) (type gtk)) (:extend t :background "gtk_selection_bg_color" :distant-foreground "gtk_selection_fg_color")) (((class color) (min-colors 88) (background light) (type ns)) (:extend t :background "ns_selection_bg_color" :distant-foreground "ns_selection_fg_color")) (((class color) (min-colors 88) (background light)) (:extend t :background "lightgoldenrod2")) (((class color) (min-colors 16) (background dark)) (:extend t :background "blue3")) (((class color) (min-colors 16) (background light)) (:extend t :background "lightgoldenrod2")) (((class color) (min-colors 8)) (:extend t :foreground "white" :background "blue")) (((type tty) (class mono)) (:inverse-video t)) (t (:extend t :background "gray")))) + '(shadow ((((class color grayscale) (min-colors 88) (background light)) (:foreground "grey50")) (((class color grayscale) (min-colors 88) (background dark)) (:foreground "grey70")) (((class color) (min-colors 8) (background light)) (:foreground "green")) (((class color) (min-colors 8) (background dark)) (:foreground "yellow")))) + '(secondary-selection ((((class color) (min-colors 88) (background light)) (:extend t :background "yellow1")) (((class color) (min-colors 88) (background dark)) (:extend t :background "SkyBlue4")) (((class color) (min-colors 16) (background light)) (:extend t :background "yellow")) (((class color) (min-colors 16) (background dark)) (:extend t :background "SkyBlue4")) (((class color) (min-colors 8)) (:extend t :foreground "black" :background "cyan")) (t (:inverse-video t)))) + '(trailing-whitespace ((((class color) (background light)) (:background "red1")) (((class color) (background dark)) (:background "red1")) (t (:inverse-video t)))) + '(font-lock-builtin-face ((((class grayscale) (background light)) (:weight bold :foreground "LightGray")) (((class grayscale) (background dark)) (:weight bold :foreground "DimGray")) (((class color) (min-colors 88) (background light)) (:foreground "dark slate blue")) (((class color) (min-colors 88) (background dark)) (:foreground "LightSteelBlue")) (((class color) (min-colors 16) (background light)) (:foreground "Orchid")) (((class color) (min-colors 16) (background dark)) (:foreground "LightSteelBlue")) (((class color) (min-colors 8)) (:weight bold :foreground "blue")) (t (:weight bold)))) + '(font-lock-comment-delimiter-face ((default (:inherit (font-lock-comment-face))))) + '(font-lock-comment-face ((((class grayscale) (background light)) (:slant italic :weight bold :foreground "DimGray")) (((class grayscale) (background dark)) (:slant italic :weight bold :foreground "LightGray")) (((class color) (min-colors 88) (background light)) (:foreground "Firebrick")) (((class color) (min-colors 88) (background dark)) (:foreground "chocolate1")) (((class color) (min-colors 16) (background light)) (:foreground "red")) (((class color) (min-colors 16) (background dark)) (:foreground "red1")) (((class color) (min-colors 8) (background light)) (:foreground "red")) (((class color) (min-colors 8) (background dark)) (:foreground "yellow")) (t (:slant italic :weight bold)))) + '(font-lock-constant-face ((((class grayscale) (background light)) (:underline (:color foreground-color :style line) :weight bold :foreground "LightGray")) (((class grayscale) (background dark)) (:underline (:color foreground-color :style line) :weight bold :foreground "Gray50")) (((class color) (min-colors 88) (background light)) (:foreground "dark cyan")) (((class color) (min-colors 88) (background dark)) (:foreground "Aquamarine")) (((class color) (min-colors 16) (background light)) (:foreground "CadetBlue")) (((class color) (min-colors 16) (background dark)) (:foreground "Aquamarine")) (((class color) (min-colors 8)) (:foreground "magenta")) (t (:underline (:color foreground-color :style line) :weight bold)))) + '(font-lock-doc-face ((t (:inherit (font-lock-string-face))))) + '(font-lock-doc-markup-face ((t (:inherit (font-lock-constant-face))))) + '(font-lock-function-name-face ((((class color) (min-colors 88) (background light)) (:foreground "Blue1")) (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue")) (((class color) (min-colors 16) (background light)) (:foreground "Blue")) (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue")) (((class color) (min-colors 8)) (:weight bold :foreground "blue")) (t (:weight bold :inverse-video t)))) + '(font-lock-keyword-face ((((class grayscale) (background light)) (:weight bold :foreground "LightGray")) (((class grayscale) (background dark)) (:weight bold :foreground "DimGray")) (((class color) (min-colors 88) (background light)) (:foreground "Purple")) (((class color) (min-colors 88) (background dark)) (:foreground "Cyan1")) (((class color) (min-colors 16) (background light)) (:foreground "Purple")) (((class color) (min-colors 16) (background dark)) (:foreground "Cyan")) (((class color) (min-colors 8)) (:weight bold :foreground "cyan")) (t (:weight bold)))) + '(font-lock-negation-char-face ((t nil))) + '(font-lock-preprocessor-face ((t (:inherit (font-lock-builtin-face))))) + '(font-lock-regexp-grouping-backslash ((t (:inherit (bold))))) + '(font-lock-regexp-grouping-construct ((t (:inherit (bold))))) + '(font-lock-string-face ((((class grayscale) (background light)) (:slant italic :foreground "DimGray")) (((class grayscale) (background dark)) (:slant italic :foreground "LightGray")) (((class color) (min-colors 88) (background light)) (:foreground "VioletRed4")) (((class color) (min-colors 88) (background dark)) (:foreground "LightSalmon")) (((class color) (min-colors 16) (background light)) (:foreground "RosyBrown")) (((class color) (min-colors 16) (background dark)) (:foreground "LightSalmon")) (((class color) (min-colors 8)) (:foreground "green")) (t (:slant italic)))) + '(font-lock-type-face ((((class grayscale) (background light)) (:weight bold :foreground "Gray90")) (((class grayscale) (background dark)) (:weight bold :foreground "DimGray")) (((class color) (min-colors 88) (background light)) (:foreground "ForestGreen")) (((class color) (min-colors 88) (background dark)) (:foreground "PaleGreen")) (((class color) (min-colors 16) (background light)) (:foreground "ForestGreen")) (((class color) (min-colors 16) (background dark)) (:foreground "PaleGreen")) (((class color) (min-colors 8)) (:foreground "green")) (t (:underline (:color foreground-color :style line) :weight bold)))) + '(font-lock-variable-name-face ((((class grayscale) (background light)) (:slant italic :weight bold :foreground "Gray90")) (((class grayscale) (background dark)) (:slant italic :weight bold :foreground "DimGray")) (((class color) (min-colors 88) (background light)) (:foreground "sienna")) (((class color) (min-colors 88) (background dark)) (:foreground "LightGoldenrod")) (((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod")) (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod")) (((class color) (min-colors 8)) (:weight light :foreground "yellow")) (t (:slant italic :weight bold)))) + '(font-lock-warning-face ((t (:inherit (error))))) + '(button ((t (:inherit (link))))) + '(link ((((class color) (min-colors 88) (background light)) (:underline (:color foreground-color :style line) :foreground "RoyalBlue3")) (((class color) (background light)) (:underline (:color foreground-color :style line) :foreground "blue")) (((class color) (min-colors 88) (background dark)) (:underline (:color foreground-color :style line) :foreground "cyan1")) (((class color) (background dark)) (:underline (:color foreground-color :style line) :foreground "cyan")) (t (:inherit (underline))))) + '(link-visited ((default (:inherit (link))) (((class color) (background light)) (:foreground "magenta4")) (((class color) (background dark)) (:foreground "violet")))) + '(fringe ((((class color) (background light)) (:background "grey95")) (((class color) (background dark)) (:background "grey10")) (t (:background "gray")))) + '(header-line ((default (:inherit (mode-line))) (((type tty)) (:underline (:color foreground-color :style line) :inverse-video nil)) (((class color grayscale) (background light)) (:box nil :foreground "grey20" :background "grey90")) (((class color grayscale) (background dark)) (:box nil :foreground "grey90" :background "grey20")) (((class mono) (background light)) (:underline (:color foreground-color :style line) :box nil :inverse-video nil :foreground "black" :background "white")) (((class mono) (background dark)) (:underline (:color foreground-color :style line) :box nil :inverse-video nil :foreground "white" :background "black")))) + '(tooltip ((((class color)) (:inherit (variable-pitch) :foreground "black" :background "lightyellow")) (t (:inherit (variable-pitch))))) + '(mode-line ((t (:background "#98b599" :foreground "black" :box (:line-width (1 . -1) :style released-button))))) + '(mode-line-buffer-id ((t (:weight bold)))) + '(mode-line-emphasis ((t (:weight bold)))) + '(mode-line-highlight ((((supports :box t) (class color) (min-colors 88)) (:box (:line-width (2 . 2) :color "grey40" :style released-button))) (t (:inherit (highlight))))) + '(mode-line-inactive ((default (:inherit (mode-line))) (((class color) (min-colors 88) (background light)) (:background "grey90" :foreground "grey20" :box (:line-width (1 . -1) :color "grey75" :style nil) :weight light)) (((class color) (min-colors 88) (background dark)) (:background "grey30" :foreground "grey80" :box (:line-width (1 . -1) :color "grey40" :style nil) :weight light)))) + '(isearch ((((class color) (min-colors 88) (background light)) (:foreground "lightskyblue1" :background "magenta3")) (((class color) (min-colors 88) (background dark)) (:foreground "brown4" :background "palevioletred2")) (((class color) (min-colors 16)) (:foreground "cyan1" :background "magenta4")) (((class color) (min-colors 8)) (:foreground "cyan1" :background "magenta4")) (t (:inverse-video t)))) + '(isearch-fail ((((class color) (min-colors 88) (background light)) (:background "RosyBrown1")) (((class color) (min-colors 88) (background dark)) (:background "red4")) (((class color) (min-colors 16)) (:background "red")) (((class color) (min-colors 8)) (:background "red")) (((class color grayscale)) (:foreground "grey")) (t (:inverse-video t)))) + '(lazy-highlight ((((class color) (min-colors 88) (background light)) (:background "paleturquoise")) (((class color) (min-colors 88) (background dark)) (:background "paleturquoise4")) (((class color) (min-colors 16)) (:background "turquoise3")) (((class color) (min-colors 8)) (:background "turquoise3")) (t (:underline (:color foreground-color :style line))))) + '(match ((((class color) (min-colors 88) (background light)) (:background "khaki1")) (((class color) (min-colors 88) (background dark)) (:background "RoyalBlue3")) (((class color) (min-colors 8) (background light)) (:foreground "black" :background "yellow")) (((class color) (min-colors 8) (background dark)) (:foreground "white" :background "blue")) (((type tty) (class mono)) (:inverse-video t)) (t (:background "gray")))) + '(next-error ((t (:inherit (region))))) + '(query-replace ((t (:inherit (isearch))))) + '(default ((t (:inherit nil :extend nil :stipple nil :background "#2e392b" :foreground "#c8dfc8" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 97 :width normal :foundry "Misc" :family "Termsyn"))))) + +(provide-theme 'wizard) diff --git a/modules/shmage/guix/dotfiles/gtkrc-2.0 b/modules/shmage/guix/dotfiles/gtkrc-2.0 @@ -0,0 +1,19 @@ +# DO NOT EDIT! This file will be overwritten by LXAppearance. +# Any customization should be done in ~/.gtkrc-2.0.mine instead. + +include "/home/ian/.gtkrc-2.0.mine" +gtk-theme-name="wizard" +gtk-icon-theme-name="Delft" +gtk-font-name="Termsyn 10" +gtk-cursor-theme-name="Hackneyed" +gtk-cursor-theme-size=1 +gtk-toolbar-style=GTK_TOOLBAR_BOTH +gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR +gtk-button-images=1 +gtk-menu-images=1 +gtk-enable-event-sounds=1 +gtk-enable-input-feedback-sounds=1 +gtk-xft-antialias=1 +gtk-xft-hinting=1 +gtk-xft-hintstyle="hintfull" +gtk-xft-rgba="rgb" diff --git a/modules/shmage/guix/dotfiles/icons/default/index.theme b/modules/shmage/guix/dotfiles/icons/default/index.theme @@ -0,0 +1,2 @@ +[Icon Theme] +Inherits=Hackneyed diff --git a/modules/shmage/guix/dotfiles/stumpwm.d/binds.lisp b/modules/shmage/guix/dotfiles/stumpwm.d/binds.lisp @@ -0,0 +1,78 @@ +;; -*-lisp-*- + +(in-package :stumpwm) + +(set-prefix-key (kbd "C-t")) + +(defcommand emacs-connect-or-start () () + (run-shell-command "emacsclient --no-wait --create-frame || (emacs --daemon && emacsclient --no-wait --create-frame)")) + +(defcommand toggle-float () () + (if (typep (current-window) 'float-window) (unfloat-this) (float-this))) + +(defcommand terminal-raise () () + (run-or-raise "alacritty" '(:class "Alacritty"))) + +(defcommand shutdown () () + "Shutdown the computer via elogind." + (run-shell-command "/home/ian/bin/session-shutdown")) + +(defcommand reboot () () + "Reboot the computer via elogind." + (run-shell-command "/home/ian/bin/session-reboot")) + +(defcommand suspend () () + "Suspend the computer via elogind." + (run-shell-command "/home/ian/bin/session-suspend")) + +(defcommand lock-screen () () + "Lock the screen however I've decided to do that." + (run-shell-command "/home/ian/bin/lockscreen.sh")) + +(defcommand launch-polybar () () + (run-shell-command "/home/ian/bin/polybar-launch.sh")) + +(defcommand shutdown-confirm () () + "Prompt the user to confirm shutdown via elogind." + (if (y-or-n-p (format nil "~@{~a~^~%~}" + "You are about to shutdown the computer." + "Really ^1^Bshutdown^b^n?" + "^B^6Confirm?^n ")) + (shutdown) + (xlib:unmap-window (screen-message-window (current-screen))))) + +(defcommand reboot-confirm () () + "Prompt the user to confirm reboot via elogind." + (if (y-or-n-p (format nil "~@{~a~^~%~}" + "You are about to reboot the computer." + "Really ^1^Breboot^b^n?" + "^B^6Confirm?^n ")) + (reboot) + (xlib:unmap-window (screen-message-window (current-screen))))) + +;;;; Unbind defaults +(undefine-key *root-map* (kbd "C-e")) +(undefine-key *root-map* (kbd "C-c")) + +;;;; Root map +(define-key *root-map* (kbd "C-e") "emacs") +(define-key *root-map* (kbd "e") "emacs-connect-or-start") +(define-key *root-map* (kbd "c") "exec alacritty") +(define-key *root-map* (kbd "C-TAB") "exec rofi -show run") +(define-key *root-map* (kbd "C-c") "terminal-raise") +(define-key *root-map* (kbd "l") "mode-line") +(define-key *root-map* (kbd "C-space") "toggle-float") +(define-key *root-map* (kbd "C-f") "fullscreen") +(define-key *root-map* (kbd "SunPrint_Screen") "exec flameshot gui") +(define-key *root-map* (kbd "End") "lock-screen") +(define-key *root-map* (kbd "C-End") "suspend") +(define-key *root-map* (kbd "ESC") "shutdown-confirm") +(define-key *root-map* (kbd "S-ESC") "reboot-confirm") + +;;;; Brightness and Sound +(define-key *top-map* (kbd "XF86MonBrightnessUp") "exec light -A 10") +(define-key *top-map* (kbd "XF86MonBrightnessDown") "exec light -U 10") +(define-key *top-map* (kbd "XF86AudioMute") "exec pactl set-sink-mute 0 toggle") +(define-key *top-map* (kbd "XF86AudioLowerVolume") "exec pactl set-sink-volume 0 -5%") +(define-key *top-map* (kbd "XF86AudioRaiseVolume") "exec pactl set-sink-volume 0 +5%") +(define-key *top-map* (kbd "XF86AudioMicMute") "exec pactl set-source-mute 1 toggle") diff --git a/modules/shmage/guix/dotfiles/stumpwm.d/init.lisp b/modules/shmage/guix/dotfiles/stumpwm.d/init.lisp @@ -0,0 +1,36 @@ +;; -*-lisp-*- + +(in-package :stumpwm) + +;; scrolling in GTK3+ applications +(setf (getenv "GDK_CORE_DEVICE_EVENTS") "1") + +;; Set groups +(setf (group-name (car (screen-groups (current-screen)))) + "Workspace 1") +(gnewbg "Workspace 2") +(gnewbg-dynamic "Workspace 3 (dynamic)") +(gnewbg-dynamic "Workspace 4 (dynamic)") +(gnewbg-float "Workspace 5 (float)") + +(run-shell-command "xsetroot -cursor_name left_ptr") + +(setf *mouse-focus-policy* :click) + +(defvar *init-directory* + (directory-namestring + (truename (merge-pathnames (user-homedir-pathname) + ".stumpwm.d"))) + "A directory with initially loaded files.") + +(defun load-file (filename) + (let ((file (merge-pathnames (concat filename ".lisp") + *init-directory*))) + (if (probe-file file) + (load file) + (format *error-output* "File '~a' doesn't exist." file)))) + +(load-file "visual") +(load-file "binds") +(load-file "mode-line") +(load-file "custom") diff --git a/modules/shmage/guix/dotfiles/stumpwm.d/mode-line.lisp b/modules/shmage/guix/dotfiles/stumpwm.d/mode-line.lisp @@ -0,0 +1,22 @@ +;; -*-lisp-*- + +(in-package :stumpwm) + +(defun battery-mode-line-string () + (concatenate 'string + (with-open-file (stream "/sys/class/power_supply/BAT0/capacity" :if-does-not-exist nil) + (read-line stream nil)) + "% battery")) + +(setf + *screen-mode-line-format* + (list "[%n] " "%v " "^> | " "%d") + *mode-line-position* :bottom + *time-modeline-string* "%A, %B %d. %R" + *mode-line-background-color* "#2e392b" + *mode-line-foreground-color* "#c8dfc8" + *mode-line-border-color* *mode-line-background-color* + *mode-line-timeout* '1) + +(dolist (h (screen-heads (current-screen))) + (enable-mode-line (current-screen) h t)) diff --git a/modules/shmage/guix/dotfiles/stumpwm.d/visual.lisp b/modules/shmage/guix/dotfiles/stumpwm.d/visual.lisp @@ -0,0 +1,17 @@ +;; -*-lisp-*- + +(in-package :stumpwm) + +(setf *colors* + '("black" ; 0 black + "red" ; 1 red + "green" ; 2 green + "yellow" ; 3 yellow + "blue" ; 4 blue + "yellow" ; 5 magenta + "cyan" ; 6 cyan + "white" ; 7 white + "#2e392b" ; 8 darkgreen + "#668d61" ; 9 lightgreen + )) +(update-color-map (current-screen)) diff --git a/modules/shmage/guix/dotfiles/tmux.conf b/modules/shmage/guix/dotfiles/tmux.conf @@ -0,0 +1,8 @@ +set -g prefix C-o +bind C-o send-prefix + +bind S split-window -h +bind s split-window -v + +set -g base-index 1 +setw -g pane-base-index 1 diff --git a/modules/shmage/guix/dotfiles/xinitrc b/modules/shmage/guix/dotfiles/xinitrc @@ -0,0 +1,15 @@ +#!/bin/sh + +xset -dpms s off +[[ -f ~/bin/xrandrsetup.sh ]] && ~/bin/xrandrsetup.sh +xrdb ~/.Xresources +setxkbmap us -variant colemak & +[[ -f ~/bin/mousesensitivity.sh ]] && ~/bin/mousesensitivity.sh & +picom -bf -D 2 --vsync --backend glx & +start-pulseaudio-x11 & +feh --bg-fill ~/.wallpapers/* +dunst -config ~/.config/dunst/dunstrc & +emacs --daemon & + +sh -c "sleep 0.5; xsetroot -cursor_name left_ptr" & +exec dbus-launch --exit-with-session stumpwm