diff options
| author | jdlugosz963 <jdlugosz963@gmail.com> | 2025-08-11 17:36:57 +0200 |
|---|---|---|
| committer | jdlugosz963 <jdlugosz963@gmail.com> | 2025-08-11 17:40:12 +0200 |
| commit | bc591dcedf45b80f70661f33c42c68dbd581e901 (patch) | |
| tree | 4a3cbd7831d8e0d8ce12f318d64e06848c9ea3ab | |
| parent | 1ebb0e267b40d86386b66b7b81686461446e39f8 (diff) | |
| download | dotfiles-bc591dcedf45b80f70661f33c42c68dbd581e901.tar.gz dotfiles-bc591dcedf45b80f70661f33c42c68dbd581e901.zip | |
Migrate to RDE
76 files changed, 827 insertions, 4355 deletions
diff --git a/.guix-channel b/.guix-channel deleted file mode 100644 index 57f7a2c..0000000 --- a/.guix-channel +++ /dev/null | |||
| @@ -1,23 +0,0 @@ | |||
| 1 | (channel | ||
| 2 | (version 0) | ||
| 3 | (directory "guix") | ||
| 4 | (url "https://github.com/jdlugosz963/dotfiles") | ||
| 5 | (dependencies | ||
| 6 | (channel | ||
| 7 | (name nonguix) | ||
| 8 | (url "https://gitlab.com/nonguix/nonguix") | ||
| 9 | (branch "master") | ||
| 10 | (introduction | ||
| 11 | (channel-introduction | ||
| 12 | (version 0) | ||
| 13 | (commit "897c1a470da759236cc11798f4e0a5f7d4d59fbc") | ||
| 14 | (signer "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5")))) | ||
| 15 | (channel | ||
| 16 | (name rustup) | ||
| 17 | (url "https://github.com/declantsien/guix-rustup") | ||
| 18 | (branch "master") | ||
| 19 | (introduction | ||
| 20 | (channel-introduction | ||
| 21 | (version 0) | ||
| 22 | (commit "325d3e2859d482c16da21eb07f2c6ff9c6c72a80") | ||
| 23 | (signer "F695 F39E C625 E081 33B5 759F 0FC6 8703 75EF E2F5")))))) \ No newline at end of file | ||
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..14fdb7b --- /dev/null +++ b/Makefile | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | .DEFAULT_GOAL := reconfigure | ||
| 2 | |||
| 3 | CHANNELS_FILE=./channels-lock.scm | ||
| 4 | GUIXTM=guix time-machine -C ${CHANNELS_FILE} | ||
| 5 | GUIXTM_LOCAL_RDE=guix time-machine -L ./env/guix -C ${CHANNELS_FILE_LOCAL_RDE} | ||
| 6 | |||
| 7 | GUIX=$(GUIXTM) -- | ||
| 8 | |||
| 9 | repl: | ||
| 10 | ${GUIX} shell guile-next guile-ares-rs \ | ||
| 11 | -e '((@ (rde packages guix) make-guix-package) (load "${CHANNELS_FILE}"))' \ | ||
| 12 | -e '((@ (rde packages guix) make-channels-package) (load "${CHANNELS_FILE}"))' \ | ||
| 13 | -- guile \ | ||
| 14 | -L ./src \ | ||
| 15 | -c \ | ||
| 16 | "(begin (use-modules (guix gexp)) ((@ (ares server) run-nrepl-server)))" | ||
| 17 | |||
| 18 | reconfigure: | ||
| 19 | sudo -E ${GUIX} system -L ./src reconfigure -e "(@ (jd config) %os)" | ||
diff --git a/channels-lock.scm b/channels-lock.scm new file mode 100644 index 0000000..254f474 --- /dev/null +++ b/channels-lock.scm | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | (use-modules (guix channels)) | ||
| 2 | |||
| 3 | (list (channel | ||
| 4 | (name 'rde) | ||
| 5 | (url "https://git.sr.ht/~abcdw/rde") | ||
| 6 | (branch "master") | ||
| 7 | (commit | ||
| 8 | "a0740b46c74210ea972560e07f33fb493eb65c78") | ||
| 9 | (introduction | ||
| 10 | (make-channel-introduction | ||
| 11 | "257cebd587b66e4d865b3537a9a88cccd7107c95" | ||
| 12 | (openpgp-fingerprint | ||
| 13 | "2841 9AC6 5038 7440 C7E9 2FFA 2208 D209 58C1 DEB0")))) | ||
| 14 | (channel | ||
| 15 | (name 'guix) | ||
| 16 | (url "https://codeberg.org/guix/guix.git") | ||
| 17 | (branch "master") | ||
| 18 | (commit | ||
| 19 | "ced31f8dd156e4202a2c7115fc003608a541388c") | ||
| 20 | (introduction | ||
| 21 | (make-channel-introduction | ||
| 22 | "9edb3f66fd807b096b48283debdcddccfea34bad" | ||
| 23 | (openpgp-fingerprint | ||
| 24 | "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))) | ||
| 25 | (channel | ||
| 26 | (name 'nonguix) | ||
| 27 | (url "https://gitlab.com/nonguix/nonguix") | ||
| 28 | (branch "master") | ||
| 29 | (commit | ||
| 30 | "473e5a62cd512cc0d5b4ac2c33be0bc0d0379435") | ||
| 31 | (introduction | ||
| 32 | (make-channel-introduction | ||
| 33 | "897c1a470da759236cc11798f4e0a5f7d4d59fbc" | ||
| 34 | (openpgp-fingerprint | ||
| 35 | "2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5"))))) | ||
diff --git a/files/.Xmodmap b/files/.Xmodmap deleted file mode 100644 index cb4706f..0000000 --- a/files/.Xmodmap +++ /dev/null | |||
| @@ -1,2 +0,0 @@ | |||
| 1 | clear lock | ||
| 2 | keycode 0x42 = Escape | ||
diff --git a/files/.bash_profile b/files/.bash_profile deleted file mode 100644 index 14802fe..0000000 --- a/files/.bash_profile +++ /dev/null | |||
| @@ -1,17 +0,0 @@ | |||
| 1 | # Honor per-interactive-shell startup file | ||
| 2 | if [ -f ~/.bashrc ]; then . ~/.bashrc; fi | ||
| 3 | |||
| 4 | export GUIX_EXTRA_PROFILES=$HOME/.guix-extra-profiles | ||
| 5 | |||
| 6 | for i in $GUIX_EXTRA_PROFILES/*; do | ||
| 7 | profile=$i/$(basename "$i") | ||
| 8 | if [ -f "$profile"/etc/profile ]; then | ||
| 9 | GUIX_PROFILE="$profile" | ||
| 10 | . "$GUIX_PROFILE"/etc/profile | ||
| 11 | fi | ||
| 12 | unset profile | ||
| 13 | done | ||
| 14 | |||
| 15 | export NIX_PATH=~/.nix-defexpr/channels/nixos/ | ||
| 16 | |||
| 17 | . .profile | ||
diff --git a/files/.bin/arduino-cli b/files/.bin/arduino-cli deleted file mode 100755 index 7c0d41a..0000000 --- a/files/.bin/arduino-cli +++ /dev/null | |||
| @@ -1,14 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
| 4 | |||
| 5 | if [[ $(docker images | grep jd-arduino-cli | wc -l) -eq 0 ]] | ||
| 6 | then | ||
| 7 | docker build -f "$SCRIPT_DIR/jd-arduino-cli.Dockerfile" -t jd-arduino-cli . | ||
| 8 | fi | ||
| 9 | |||
| 10 | docker run --rm --network none -it --privileged \ | ||
| 11 | -v $(pwd):/src \ | ||
| 12 | -v jd-arduino-cli-tmp:/tmp \ | ||
| 13 | -v /dev:/dev jd-arduino-cli \ | ||
| 14 | arduino-cli $@ | ||
diff --git a/files/.bin/chiaki b/files/.bin/chiaki deleted file mode 100755 index 5fa6547..0000000 --- a/files/.bin/chiaki +++ /dev/null | |||
| @@ -1,21 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | CHIAKI_SHELL=/tmp/.chiaki.nix | ||
| 4 | |||
| 5 | cat <<EOF > $CHIAKI_SHELL | ||
| 6 | let | ||
| 7 | nixgl = import (fetchTarball https://github.com/guibou/nixGL/archive/main.tar.gz) { }; | ||
| 8 | in | ||
| 9 | { nixpkgs ? import <nixpkgs> {} }: | ||
| 10 | with nixpkgs; mkShell { | ||
| 11 | buildInputs = [ | ||
| 12 | chiaki | ||
| 13 | nixgl.auto.nixGLDefault | ||
| 14 | ]; | ||
| 15 | shellHook = '' | ||
| 16 | nixGL chiaki && exit; | ||
| 17 | ''; | ||
| 18 | } | ||
| 19 | EOF | ||
| 20 | |||
| 21 | nix-shell $CHIAKI_SHELL | ||
diff --git a/files/.bin/clean.sh b/files/.bin/clean.sh deleted file mode 100755 index 3e6bbfd..0000000 --- a/files/.bin/clean.sh +++ /dev/null | |||
| @@ -1,3 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | sudo emerge --ask --depclean; | ||
diff --git a/files/.bin/download_music.sh b/files/.bin/download_music.sh deleted file mode 100755 index e3a3601..0000000 --- a/files/.bin/download_music.sh +++ /dev/null | |||
| @@ -1,26 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | BOLD="\e[1"; | ||
| 4 | ENDCOLOR="\e[0m"; | ||
| 5 | Green="32"; | ||
| 6 | LightRed="31"; | ||
| 7 | |||
| 8 | if ! [ $1 ]; then | ||
| 9 | echo "" | ||
| 10 | echo -e $BOLD";"";"$LightRed"m Please provide music url!"$ENDCOLOR | ||
| 11 | echo "" | ||
| 12 | exit | ||
| 13 | fi | ||
| 14 | |||
| 15 | MUSIC_DIR="~/Documents/Music/%(artist)s/%(album)s/%(title)s-%(id)s.%(ext)s" | ||
| 16 | if [ $2 ]; then | ||
| 17 | MUSIC_DIR="${a}/%(artist)s/%(album)s/%(title)s-%(id)s.%(ext)s" | ||
| 18 | fi | ||
| 19 | |||
| 20 | echo "" | ||
| 21 | echo -e $BOLD";"";"$Green"m Music will download to ${MUSIC_DIR} directory!"$ENDCOLOR | ||
| 22 | echo "" | ||
| 23 | |||
| 24 | sleep 1 | ||
| 25 | |||
| 26 | yt-dlp -x --audio-format mp3 --embed-metadata -o $MUSIC_DIR $1 | ||
diff --git a/files/.bin/esp_upload.sh b/files/.bin/esp_upload.sh deleted file mode 100755 index 27d8d41..0000000 --- a/files/.bin/esp_upload.sh +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # rm /tmp/arduino-sketch-*/ -r | ||
| 4 | ~/.local/bin/arduino-cli cache clean | ||
| 5 | ~/.local/bin/arduino-cli compile --fqbn esp8266:esp8266:nodemcuv2 | ||
| 6 | ~/.local/bin/arduino-cli upload -p /dev/ttyUSB0 --fqbn esp8266:esp8266:nodemcuv2 | ||
diff --git a/files/.bin/file_upload.sh b/files/.bin/file_upload.sh deleted file mode 100755 index 0ff6c57..0000000 --- a/files/.bin/file_upload.sh +++ /dev/null | |||
| @@ -1,38 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | BOLD="\e[1"; | ||
| 4 | ENDCOLOR="\e[0m"; | ||
| 5 | Green="32m"; | ||
| 6 | LightRed="31m"; | ||
| 7 | |||
| 8 | echo "" | ||
| 9 | echo -e $BOLD";"";"$Green" FILE UPLOADER"$ENDCOLOR | ||
| 10 | echo "" | ||
| 11 | |||
| 12 | if ! [ $1 ]; then | ||
| 13 | echo "" | ||
| 14 | echo -e $BOLD";"";"$LightRed" Please provide file path!"$ENDCOLOR | ||
| 15 | echo "" | ||
| 16 | exit | ||
| 17 | fi | ||
| 18 | |||
| 19 | if [ $1 ]; then | ||
| 20 | echo -e " Are u sure u want upload this file: "$BOLD";"";"$Green" '$1'"$ENDCOLOR"? [y/N]: " | ||
| 21 | read -p " " input | ||
| 22 | echo "" | ||
| 23 | # read -r -p " " input | ||
| 24 | case $input in | ||
| 25 | [yY][eE][sS]|[yY]) | ||
| 26 | URL=$(curl -s -F "file=@$1" https://0x0.st); | ||
| 27 | echo -e " URL: "$BOLD";"";"$Green"$URL"$ENDCOLOR; | ||
| 28 | ;; | ||
| 29 | [nN][oO]|[nN]) | ||
| 30 | echo -e $BOLD";"";"$Green" OK"$ENDCOLOR; | ||
| 31 | ;; | ||
| 32 | *) | ||
| 33 | echo -e $BOLD";"";"$LightRed" Invalid input..."$ENDCOLOR; | ||
| 34 | exit 1 | ||
| 35 | ;; | ||
| 36 | esac | ||
| 37 | echo "" | ||
| 38 | fi; | ||
diff --git a/files/.bin/guix-container b/files/.bin/guix-container deleted file mode 100755 index 162eda0..0000000 --- a/files/.bin/guix-container +++ /dev/null | |||
| @@ -1,8 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | guix shell -C -F -N \ | ||
| 4 | -E XDG_RUNTIME_DIR=/tmp \ | ||
| 5 | -E WAYLAND_DISPLAY \ | ||
| 6 | -E DISPLAY \ | ||
| 7 | --share=$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY=/tmp/$WAYLAND_DISPLAY \ | ||
| 8 | $@ coreutils | ||
diff --git a/files/.bin/home-reconfigure b/files/.bin/home-reconfigure deleted file mode 100755 index f55b896..0000000 --- a/files/.bin/home-reconfigure +++ /dev/null | |||
| @@ -1,9 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | if [ -n "$1" ]; then | ||
| 4 | guix home -L $1 reconfigure \ | ||
| 5 | -e '((@ (jd utils) current-home))' | ||
| 6 | else | ||
| 7 | guix home reconfigure \ | ||
| 8 | -e '((@ (jd utils) current-home))' | ||
| 9 | fi; | ||
diff --git a/files/.bin/jd-arduino-cli.Dockerfile b/files/.bin/jd-arduino-cli.Dockerfile deleted file mode 100644 index cb8eb91..0000000 --- a/files/.bin/jd-arduino-cli.Dockerfile +++ /dev/null | |||
| @@ -1,16 +0,0 @@ | |||
| 1 | FROM python:3.12-rc-slim | ||
| 2 | |||
| 3 | RUN apt update && apt install -y wget && \ | ||
| 4 | wget https://downloads.arduino.cc/arduino-cli/nightly/arduino-cli_nightly-latest_Linux_64bit.tar.gz && \ | ||
| 5 | tar -C /usr/bin/ -xf arduino-cli_nightly-latest_Linux_64bit.tar.gz | ||
| 6 | |||
| 7 | RUN mkdir ~/.arduino15 && \ | ||
| 8 | echo "board_manager:" > ~/.arduino15/arduino-cli.yaml && \ | ||
| 9 | echo " additional_urls:" >> ~/.arduino15/arduino-cli.yaml && \ | ||
| 10 | echo " - http://arduino.esp8266.com/stable/package_esp8266com_index.json" >> ~/.arduino15/arduino-cli.yaml | ||
| 11 | |||
| 12 | |||
| 13 | RUN arduino-cli core update-index && \ | ||
| 14 | arduino-cli core install esp8266:esp8266 | ||
| 15 | |||
| 16 | WORKDIR /src \ No newline at end of file | ||
diff --git a/files/.bin/mount-nas-abaks b/files/.bin/mount-nas-abaks deleted file mode 100755 index 6c14817..0000000 --- a/files/.bin/mount-nas-abaks +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | sudo mount -t cifs -o vers=2.0,username=kdlugosz,password=$(pass nas/abaks/kdlugosz) //195.74.91.28/kdlugosz /mnt \ No newline at end of file | ||
diff --git a/files/.bin/oath b/files/.bin/oath deleted file mode 100755 index 7444993..0000000 --- a/files/.bin/oath +++ /dev/null | |||
| @@ -1,14 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | if [[ $1 ]]; then | ||
| 4 | PASS=$(oathtool -b --totp $(pass show "oath/$1")) | ||
| 5 | printf $PASS | wl-copy | ||
| 6 | echo "pass: $PASS" | ||
| 7 | echo "Password should be in your clipboard!" | ||
| 8 | else | ||
| 9 | echo "Usage: oath <pass>" | ||
| 10 | echo "Available pass:" | ||
| 11 | pass oath | ||
| 12 | fi | ||
| 13 | |||
| 14 | |||
diff --git a/files/.bin/profile-add-all b/files/.bin/profile-add-all deleted file mode 100755 index bca4178..0000000 --- a/files/.bin/profile-add-all +++ /dev/null | |||
| @@ -1,9 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | GUIX_EXTRA_PROFILES=$HOME/.guix-extra-profiles | ||
| 4 | for i in $HOME/.config/guix/manifests/*; do | ||
| 5 | echo $i | ||
| 6 | MANIFEST_NAME=$(basename $i .scm) | ||
| 7 | mkdir -p "$GUIX_EXTRA_PROFILES"/"$MANIFEST_NAME" | ||
| 8 | guix package --manifest=$i --profile="$GUIX_EXTRA_PROFILES/$MANIFEST_NAME/$MANIFEST_NAME" | ||
| 9 | done | ||
diff --git a/files/.bin/stumpish b/files/.bin/stumpish deleted file mode 100755 index 9e95c0c..0000000 --- a/files/.bin/stumpish +++ /dev/null | |||
| @@ -1,196 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # Copyright (C) 2007 Jonathan Moore Liles | ||
| 4 | # | ||
| 5 | # Maintainer: Jonathan Moore Liles | ||
| 6 | # | ||
| 7 | # stumpish is free software; you can redistribute it and/or modify | ||
| 8 | # it under the terms of the GNU General Public License as published by | ||
| 9 | # the Free Software Foundation; either version 2, or (at your option) | ||
| 10 | # any later version. | ||
| 11 | # | ||
| 12 | # stumpish is distributed in the hope that it will be useful, | ||
| 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | # GNU General Public License for more details. | ||
| 16 | # | ||
| 17 | # You should have received a copy of the GNU General Public License | ||
| 18 | # along with this software; see the file COPYING. If not, see | ||
| 19 | # <http://www.gnu.org/licenses/>. | ||
| 20 | |||
| 21 | ### STUMPwm Interactive SHell. | ||
| 22 | |||
| 23 | DELAY=0.01 | ||
| 24 | |||
| 25 | if ! sleep $DELAY 2>/dev/null >&2 | ||
| 26 | then | ||
| 27 | DELAY=1 | ||
| 28 | fi | ||
| 29 | |||
| 30 | # replace -E with -r option for old versions of GNU sed | ||
| 31 | if ! sed -E 1p /dev/null 2>/dev/null; then | ||
| 32 | sed() { shift; command sed -r "$@"; } | ||
| 33 | fi | ||
| 34 | |||
| 35 | # parse C-style backslash sequences by default | ||
| 36 | if [ "$(echo -e foo)" = foo ]; then | ||
| 37 | echo() { builtin echo -e "$@"; } | ||
| 38 | fi | ||
| 39 | |||
| 40 | wait_result () | ||
| 41 | { | ||
| 42 | while true | ||
| 43 | do | ||
| 44 | RESULT=$(xprop -root -f STUMPWM_COMMAND_RESULT 8s \ | ||
| 45 | STUMPWM_COMMAND_RESULT 2>/dev/null | | ||
| 46 | sed -E 's/\\([[:digit:]]+)/\\0\1/g') | ||
| 47 | if echo "$RESULT" | grep -v -q 'not found.$' | ||
| 48 | then | ||
| 49 | break | ||
| 50 | fi | ||
| 51 | |||
| 52 | sleep $DELAY | ||
| 53 | done | ||
| 54 | |||
| 55 | xprop -root -remove STUMPWM_COMMAND_RESULT | ||
| 56 | |||
| 57 | if echo "$RESULT" | grep -q '= $' | ||
| 58 | then | ||
| 59 | return 0 | ||
| 60 | fi | ||
| 61 | |||
| 62 | echo "$RESULT" | | ||
| 63 | sed -E 's/[^"\\n]+"// | ||
| 64 | /^"[[:space:]]*$/d | ||
| 65 | s/(^|[^\\])\\n/\1\ | ||
| 66 | /g | ||
| 67 | s/\\(["\\n])/\1/g | ||
| 68 | s/\^([*[:digit:]]+|[Bbn])//g' | ||
| 69 | } | ||
| 70 | |||
| 71 | send_cmd () | ||
| 72 | { | ||
| 73 | local cmd="$1" | ||
| 74 | |||
| 75 | if [ "$cmd" = "stumpwm-quit" ] | ||
| 76 | then | ||
| 77 | cmd=quit | ||
| 78 | elif [ "$cmd" = "quit" ] | ||
| 79 | then | ||
| 80 | exit | ||
| 81 | fi | ||
| 82 | |||
| 83 | xprop -root -f STUMPWM_COMMAND 8s -set STUMPWM_COMMAND "$cmd" | ||
| 84 | |||
| 85 | wait_result | ||
| 86 | } | ||
| 87 | |||
| 88 | usage () | ||
| 89 | { | ||
| 90 | cat <<EOF | ||
| 91 | Usage: ${0##*/} [[-e|-r] command [args...]] | ||
| 92 | |||
| 93 | StumpIsh is the StumpWM shell. Use it to interact a running StumpWM | ||
| 94 | instance. When run from a terminal with no arguments, stumpish | ||
| 95 | accepts commands interactively and prints each result. If standard | ||
| 96 | input is a pipe, stumpish executes any number of commands and prints | ||
| 97 | the concatenated results. If the '-e' option and one argument are | ||
| 98 | given on the command line, stumpish reads any number of lines from | ||
| 99 | standard input and uses them as the argument to the named command. | ||
| 100 | Otherwise, if one or more arguments are provided on the command line, | ||
| 101 | the first is considered the name of the command to execute and the | ||
| 102 | remainder is concatenated to form the argument. | ||
| 103 | |||
| 104 | Example: | ||
| 105 | echo '(group-windows (current-group))' | ${0##*/} -e eval | ||
| 106 | EOF | ||
| 107 | exit 0; | ||
| 108 | } | ||
| 109 | |||
| 110 | warn () | ||
| 111 | { | ||
| 112 | { | ||
| 113 | tput md bold | ||
| 114 | tput AF setaf 1 | ||
| 115 | echo 'WARN:\c' | ||
| 116 | tput me sgr0 | ||
| 117 | echo " $*" | ||
| 118 | } >&2 | ||
| 119 | } | ||
| 120 | |||
| 121 | tput () | ||
| 122 | { | ||
| 123 | local cap1=$1 cap2=$2 | ||
| 124 | shift 2 | ||
| 125 | |||
| 126 | command tput $cap1 $@ 2>/dev/null || | ||
| 127 | command tput $cap2 $@ 2>/dev/null | ||
| 128 | } | ||
| 129 | |||
| 130 | READLINE=yes | ||
| 131 | |||
| 132 | if [ "x$1" = "x-r" ] | ||
| 133 | then | ||
| 134 | READLINE=no | ||
| 135 | shift 1 | ||
| 136 | fi | ||
| 137 | |||
| 138 | if [ $# -gt 0 ] | ||
| 139 | then | ||
| 140 | [ "$1" = "--help" ] && usage | ||
| 141 | if [ "$1" = "-e" ] | ||
| 142 | then | ||
| 143 | if [ $# -ne 2 ] | ||
| 144 | then | ||
| 145 | echo "'-e' requires exactly one argument!" | ||
| 146 | exit | ||
| 147 | fi | ||
| 148 | shift 1 | ||
| 149 | IFS='' | ||
| 150 | ARGS=$(cat /dev/stdin) | ||
| 151 | send_cmd "$1 $ARGS" | ||
| 152 | else | ||
| 153 | IFS=' ' | ||
| 154 | send_cmd "$*" | ||
| 155 | fi | ||
| 156 | else | ||
| 157 | if [ -t 0 ] | ||
| 158 | then | ||
| 159 | if ! type rlwrap 2>/dev/null >&2 | ||
| 160 | then | ||
| 161 | warn rlwrap not found, command completion won\'t work | ||
| 162 | elif [ $READLINE = yes ] | ||
| 163 | then | ||
| 164 | COMMANDS="${TMPDIR:-/tmp}/stumpish.commands.$$" | ||
| 165 | echo $(send_cmd "commands") | | ||
| 166 | sed -E 's/[[:space:]]+/\ | ||
| 167 | /g' | | ||
| 168 | sort > "$COMMANDS" | ||
| 169 | trap 'rm -f "$COMMANDS"' exit int term | ||
| 170 | rlwrap -b '' -f "$COMMANDS" "$0" -r | ||
| 171 | exit | ||
| 172 | fi | ||
| 173 | |||
| 174 | tput AF setaf 5 | ||
| 175 | echo Welcome to the STUMPwm Interactive SHell. | ||
| 176 | tput me sgr0 | ||
| 177 | echo 'Type \c' | ||
| 178 | tput AF setaf 2 | ||
| 179 | echo 'commands\c' | ||
| 180 | tput me sgr0 | ||
| 181 | echo \ for a list of commands. | ||
| 182 | |||
| 183 | while read -p '> ' REPLY | ||
| 184 | do | ||
| 185 | tput md bold | ||
| 186 | tput AF setaf 2 | ||
| 187 | send_cmd "$REPLY" | ||
| 188 | tput me sgr0 | ||
| 189 | done | ||
| 190 | else | ||
| 191 | while read REPLY | ||
| 192 | do | ||
| 193 | send_cmd "$REPLY" | ||
| 194 | done | ||
| 195 | fi | ||
| 196 | fi | ||
diff --git a/files/.bin/system-reconfigure b/files/.bin/system-reconfigure deleted file mode 100755 index e76ba27..0000000 --- a/files/.bin/system-reconfigure +++ /dev/null | |||
| @@ -1,10 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | if [ -n "$1" ]; then | ||
| 4 | sudo -E guix system -L $1 reconfigure \ | ||
| 5 | -e '((@ (jd utils) current-operating-system))' | ||
| 6 | else | ||
| 7 | sudo -E guix system reconfigure \ | ||
| 8 | -e '((@ (jd utils) current-operating-system))' | ||
| 9 | fi; | ||
| 10 | |||
diff --git a/files/.bin/update.sh b/files/.bin/update.sh deleted file mode 100755 index e6f9f8d..0000000 --- a/files/.bin/update.sh +++ /dev/null | |||
| @@ -1,4 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | sudo emerge --sync | ||
| 4 | sudo emerge --ask --verbose --update --newuse --deep @world; | ||
diff --git a/files/.bin/whois-at-hsp b/files/.bin/whois-at-hsp deleted file mode 100755 index 982a90e..0000000 --- a/files/.bin/whois-at-hsp +++ /dev/null | |||
| @@ -1,84 +0,0 @@ | |||
| 1 | #!/usr/bin/env -S guix shell guile guile-json -- guile --no-auto-compile -e main -s | ||
| 2 | -*- scheme -*- | ||
| 3 | !# | ||
| 4 | |||
| 5 | (use-modules (srfi srfi-1) | ||
| 6 | (ice-9 iconv) | ||
| 7 | (ice-9 receive) | ||
| 8 | (web client) | ||
| 9 | (json)) | ||
| 10 | |||
| 11 | (define whois-at-hsp-endpoint "https://whois.at.hsp.sh/api/now") | ||
| 12 | |||
| 13 | (define (http-get-serialize-json url) | ||
| 14 | (receive (response data) (http-request url) | ||
| 15 | (values (json-string->scm (bytevector->string data "UTF-8")) | ||
| 16 | response))) | ||
| 17 | |||
| 18 | (define (whois-data->users whois-data) | ||
| 19 | (assoc-ref whois-data "users")) | ||
| 20 | |||
| 21 | (define (whois-data->unknown-devices whois-data) | ||
| 22 | (assoc-ref whois-data "unknown_devices")) | ||
| 23 | |||
| 24 | (define (whois-data->head-count whois-data) | ||
| 25 | (assoc-ref whois-data "headcount")) | ||
| 26 | |||
| 27 | (define (whois-data->formated-users whois-data) | ||
| 28 | (let ((users (vector->list (whois-data->users whois-data)))) | ||
| 29 | (if (> (length users) 0) | ||
| 30 | (fold-right | ||
| 31 | (lambda (a b) (string-append a " " b)) | ||
| 32 | "" | ||
| 33 | users) | ||
| 34 | "No visible users!"))) | ||
| 35 | |||
| 36 | (define (whois-data->summary whois-data) | ||
| 37 | (string-append | ||
| 38 | "Unknown devices: " | ||
| 39 | (number->string (whois-data->unknown-devices whois-data)) | ||
| 40 | "\nUsers: [" (number->string (whois-data->head-count whois-data)) "] " | ||
| 41 | (whois-data->formated-users whois-data))) | ||
| 42 | |||
| 43 | (define (notify data) | ||
| 44 | (system* "notify-send" | ||
| 45 | "WHOIS AT HSP" | ||
| 46 | (whois-data->summary data))) | ||
| 47 | |||
| 48 | (define (command-line-option? option args) | ||
| 49 | (> (length (or (member option args) | ||
| 50 | '())) | ||
| 51 | 0)) | ||
| 52 | |||
| 53 | (define-syntax-rule (command-line-args-handle args default ((option ...) body ...) ...) | ||
| 54 | (let ((option? (lambda (o) (command-line-option? o args)))) | ||
| 55 | (cond ((or (option? option) ...) body ...) ... | ||
| 56 | (#t default)))) | ||
| 57 | |||
| 58 | ;; (command-line-args-handle '("a" "--help") | ||
| 59 | ;; 0 | ||
| 60 | ;; (("-h" "--help") "dupa")) | ||
| 61 | |||
| 62 | (define (main args) | ||
| 63 | (let ((whois-data (http-get-serialize-json whois-at-hsp-endpoint))) | ||
| 64 | (command-line-args-handle args | ||
| 65 | (begin (display (whois-data->summary whois-data)) | ||
| 66 | (newline)) | ||
| 67 | (("-h" "--help") | ||
| 68 | (display (string-append "-h, --help Help message\n" | ||
| 69 | "-n, --notify Notification massage with whois information.\n" | ||
| 70 | "-u Get users\n" | ||
| 71 | "-H Get head count\n" | ||
| 72 | "-U Get unknown devices\n"))) | ||
| 73 | (("-n" "--notify") | ||
| 74 | (notify whois-data)) | ||
| 75 | (("-u") | ||
| 76 | (display (whois-data->formated-users whois-data)) | ||
| 77 | (newline)) | ||
| 78 | (("-H") | ||
| 79 | (display (whois-data->head-count whois-data)) | ||
| 80 | (newline)) | ||
| 81 | (("-U") | ||
| 82 | (display (whois-data->unknown-devices whois-data)) | ||
| 83 | (newline))))) | ||
| 84 | |||
diff --git a/files/.config/alacritty/alacritty.toml b/files/.config/alacritty/alacritty.toml deleted file mode 100644 index 39fd4e9..0000000 --- a/files/.config/alacritty/alacritty.toml +++ /dev/null | |||
| @@ -1,46 +0,0 @@ | |||
| 1 | [cursor] | ||
| 2 | style = "Block" | ||
| 3 | unfocused_hollow = true | ||
| 4 | |||
| 5 | [font] | ||
| 6 | size = 14 | ||
| 7 | |||
| 8 | [font.italic] | ||
| 9 | family = "Terminus" | ||
| 10 | style = "Light Italic" | ||
| 11 | |||
| 12 | [font.normal] | ||
| 13 | family = "Terminus" | ||
| 14 | style = "Light" | ||
| 15 | |||
| 16 | [font.offset] | ||
| 17 | x = 0 | ||
| 18 | y = 0 | ||
| 19 | |||
| 20 | [window] | ||
| 21 | dynamic_padding = true | ||
| 22 | # opacity = 0.90 | ||
| 23 | |||
| 24 | [colors.bright] | ||
| 25 | black = "0x002b36" | ||
| 26 | blue = "0x839496" | ||
| 27 | cyan = "0x93a1a1" | ||
| 28 | green = "0x586e75" | ||
| 29 | magenta = "0x6c71c4" | ||
| 30 | red = "0xcb4b16" | ||
| 31 | white = "0xfdf6e3" | ||
| 32 | yellow = "0x657b83" | ||
| 33 | |||
| 34 | [colors.normal] | ||
| 35 | black = "0x073642" | ||
| 36 | blue = "0x268bd2" | ||
| 37 | cyan = "0x2aa198" | ||
| 38 | green = "0x859900" | ||
| 39 | magenta = "0xd33682" | ||
| 40 | red = "0xdc322f" | ||
| 41 | white = "0xeee8d5" | ||
| 42 | yellow = "0xb58900" | ||
| 43 | |||
| 44 | [colors.primary] | ||
| 45 | background = "0x002b36" | ||
| 46 | foreground = "0x839496" | ||
diff --git a/files/.config/alacritty/alacritty.toml.old b/files/.config/alacritty/alacritty.toml.old deleted file mode 100644 index 031d81c..0000000 --- a/files/.config/alacritty/alacritty.toml.old +++ /dev/null | |||
| @@ -1,23 +0,0 @@ | |||
| 1 | [cursor] | ||
| 2 | style = "Block" | ||
| 3 | unfocused_hollow = true | ||
| 4 | |||
| 5 | [font] | ||
| 6 | size = 14 | ||
| 7 | |||
| 8 | [font.italic] | ||
| 9 | family = "Terminus" | ||
| 10 | style = "Light Italic" | ||
| 11 | |||
| 12 | [font.normal] | ||
| 13 | family = "Terminus" | ||
| 14 | style = "Light" | ||
| 15 | |||
| 16 | [font.offset] | ||
| 17 | x = 0 | ||
| 18 | y = 0 | ||
| 19 | |||
| 20 | [window] | ||
| 21 | dynamic_padding = true | ||
| 22 | opacity = 0.90 | ||
| 23 | |||
diff --git a/files/.config/alacritty/alacritty.yaml b/files/.config/alacritty/alacritty.yaml deleted file mode 100644 index a4f2823..0000000 --- a/files/.config/alacritty/alacritty.yaml +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 1 | colors: | ||
| 2 | # Default colors | ||
| 3 | primary: | ||
| 4 | background: '0x002b36' | ||
| 5 | foreground: '0x839496' | ||
| 6 | |||
| 7 | # Normal colors | ||
| 8 | normal: | ||
| 9 | black: '0x073642' | ||
| 10 | red: '0xdc322f' | ||
| 11 | green: '0x859900' | ||
| 12 | yellow: '0xb58900' | ||
| 13 | blue: '0x268bd2' | ||
| 14 | magenta: '0xd33682' | ||
| 15 | cyan: '0x2aa198' | ||
| 16 | white: '0xeee8d5' | ||
| 17 | |||
| 18 | # Bright colors | ||
| 19 | bright: | ||
| 20 | black: '0x002b36' | ||
| 21 | red: '0xcb4b16' | ||
| 22 | green: '0x586e75' | ||
| 23 | yellow: '0x657b83' | ||
| 24 | blue: '0x839496' | ||
| 25 | magenta: '0x6c71c4' | ||
| 26 | cyan: '0x93a1a1' | ||
| 27 | white: '0xfdf6e3' | ||
diff --git a/files/.config/common-lisp/source-registry.conf.d/50-user-lisp.conf b/files/.config/common-lisp/source-registry.conf.d/50-user-lisp.conf deleted file mode 100644 index 5ffc4fe..0000000 --- a/files/.config/common-lisp/source-registry.conf.d/50-user-lisp.conf +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | (:tree "/home/jakub/Projects/lisp/") \ No newline at end of file | ||
diff --git a/files/.config/distrobox/distrobox.conf b/files/.config/distrobox/distrobox.conf deleted file mode 100644 index 446223c..0000000 --- a/files/.config/distrobox/distrobox.conf +++ /dev/null | |||
| @@ -1,10 +0,0 @@ | |||
| 1 | container_always_pull="1" | ||
| 2 | container_generate_entry=0 | ||
| 3 | container_manager="docker" | ||
| 4 | container_image_default="registry.opensuse.org/opensuse/toolbox:latest" | ||
| 5 | container_name_default="test-name-1" | ||
| 6 | container_user_custom_home="$HOME/.local/share/container-home-test" | ||
| 7 | # container_init_hook="~/.local/distrobox/a_custom_default_init_hook.sh" | ||
| 8 | # container_pre_init_hook="~/a_custom_default_pre_init_hook.sh" | ||
| 9 | non_interactive="1" | ||
| 10 | skip_workdir="0" \ No newline at end of file | ||
diff --git a/files/.config/dunst/dunstrc b/files/.config/dunst/dunstrc deleted file mode 100644 index b3b93b6..0000000 --- a/files/.config/dunst/dunstrc +++ /dev/null | |||
| @@ -1,177 +0,0 @@ | |||
| 1 | [global] | ||
| 2 | frame_width = 2 | ||
| 3 | frame_color = "#39bae6" | ||
| 4 | font = sourcecodepro | ||
| 5 | |||
| 6 | # Allow a small subset of html markup: | ||
| 7 | # <b>bold</b> | ||
| 8 | # <i>italic</i> | ||
| 9 | # <s>strikethrough</s> | ||
| 10 | # <u>underline</u> | ||
| 11 | # | ||
| 12 | # For a complete reference see | ||
| 13 | # <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>. | ||
| 14 | # If markup is not allowed, those tags will be stripped out of the | ||
| 15 | # message. | ||
| 16 | markup = yes | ||
| 17 | |||
| 18 | # The format of the message. Possible variables are: | ||
| 19 | # %a appname | ||
| 20 | # %s summary | ||
| 21 | # %b body | ||
| 22 | # %i iconname (including its path) | ||
| 23 | # %I iconname (without its path) | ||
| 24 | # %p progress value if set ([ 0%] to [100%]) or nothing | ||
| 25 | # Markup is allowed | ||
| 26 | format = "%s %p\n%b" | ||
| 27 | |||
| 28 | # Sort messages by urgency. | ||
| 29 | sort = yes | ||
| 30 | |||
| 31 | # Show how many messages are currently hidden (because of geometry). | ||
| 32 | indicate_hidden = yes | ||
| 33 | |||
| 34 | # Alignment of message text. | ||
| 35 | # Possible values are "left", "center" and "right". | ||
| 36 | alignment = left | ||
| 37 | |||
| 38 | # The frequency with wich text that is longer than the notification | ||
| 39 | # window allows bounces back and forth. | ||
| 40 | # This option conflicts with "word_wrap". | ||
| 41 | # Set to 0 to disable. | ||
| 42 | bounce_freq = 5 | ||
| 43 | |||
| 44 | |||
| 45 | # Show age of message if message is older than show_age_threshold | ||
| 46 | # seconds. | ||
| 47 | # Set to -1 to disable. | ||
| 48 | show_age_threshold = 60 | ||
| 49 | |||
| 50 | # Split notifications into multiple lines if they don't fit into | ||
| 51 | # geometry. | ||
| 52 | word_wrap = no | ||
| 53 | |||
| 54 | # Ignore newlines '\n' in notifications. | ||
| 55 | ignore_newline = no | ||
| 56 | |||
| 57 | |||
| 58 | # The geometry of the window: | ||
| 59 | # [{width}]x{height}[+/-{x}+/-{y}] | ||
| 60 | # The geometry of the message window. | ||
| 61 | # The height is measured in number of notifications everything else | ||
| 62 | # in pixels. If the width is omitted but the height is given | ||
| 63 | # ("-geometry x2"), the message window expands over the whole screen | ||
| 64 | # (dmenu-like). If width is 0, the window expands to the longest | ||
| 65 | # message displayed. A positive x is measured from the left, a | ||
| 66 | # negative from the right side of the screen. Y is measured from | ||
| 67 | # the top and down respectevly. | ||
| 68 | # The width can be negative. In this case the actual width is the | ||
| 69 | # screen width minus the width defined in within the geometry option. | ||
| 70 | geometry = "500x10-10+50" | ||
| 71 | |||
| 72 | # Shrink window if it's smaller than the width. Will be ignored if | ||
| 73 | # width is 0. | ||
| 74 | shrink = yes | ||
| 75 | |||
| 76 | # The transparency of the window. Range: [0; 100]. | ||
| 77 | # This option will only work if a compositing windowmanager is | ||
| 78 | # present (e.g. xcompmgr, compiz, etc.). | ||
| 79 | transparency = 15 | ||
| 80 | |||
| 81 | # Don't remove messages, if the user is idle (no mouse or keyboard input) | ||
| 82 | # for longer than idle_threshold seconds. | ||
| 83 | # Set to 0 to disable. | ||
| 84 | # default 120 | ||
| 85 | idle_threshold = 120 | ||
| 86 | |||
| 87 | # Which monitor should the notifications be displayed on. | ||
| 88 | monitor = 0 | ||
| 89 | |||
| 90 | # Display notification on focused monitor. Possible modes are: | ||
| 91 | # mouse: follow mouse pointer | ||
| 92 | # keyboard: follow window with keyboard focus | ||
| 93 | # none: don't follow anything | ||
| 94 | # | ||
| 95 | # "keyboard" needs a windowmanager that exports the | ||
| 96 | # _NET_ACTIVE_WINDOW property. | ||
| 97 | # This should be the case for almost all modern windowmanagers. | ||
| 98 | # | ||
| 99 | # If this option is set to mouse or keyboard, the monitor option | ||
| 100 | # will be ignored. | ||
| 101 | follow = mouse | ||
| 102 | |||
| 103 | # Should a notification popped up from history be sticky or timeout | ||
| 104 | # as if it would normally do. | ||
| 105 | sticky_history = yes | ||
| 106 | |||
| 107 | # Maximum amount of notifications kept in history | ||
| 108 | history_length = 20 | ||
| 109 | |||
| 110 | # Display indicators for URLs (U) and actions (A). | ||
| 111 | show_indicators = yes | ||
| 112 | |||
| 113 | # The height of a single line. If the height is smaller than the | ||
| 114 | # font height, it will get raised to the font height. | ||
| 115 | # This adds empty space above and under the text. | ||
| 116 | line_height = 0 | ||
| 117 | |||
| 118 | # Draw a line of "separator_height" pixel height between two | ||
| 119 | # notifications. | ||
| 120 | # Set to 0 to disable. | ||
| 121 | separator_height = 1 | ||
| 122 | |||
| 123 | # Padding between text and separator. | ||
| 124 | # padding = 8 | ||
| 125 | padding = 8 | ||
| 126 | |||
| 127 | # Horizontal padding. | ||
| 128 | horizontal_padding = 10 | ||
| 129 | |||
| 130 | # Define a color for the separator. | ||
| 131 | # possible values are: | ||
| 132 | # * auto: dunst tries to find a color fitting to the background; | ||
| 133 | # * foreground: use the same color as the foreground; | ||
| 134 | # * frame: use the same color as the frame; | ||
| 135 | # * anything else will be interpreted as a X color. | ||
| 136 | separator_color = #263238 | ||
| 137 | |||
| 138 | # Print a notification on startup. | ||
| 139 | # This is mainly for error detection, since dbus (re-)starts dunst | ||
| 140 | # automatically after a crash. | ||
| 141 | startup_notification = false | ||
| 142 | |||
| 143 | # dmenu path. | ||
| 144 | dmenu = /usr/bin/dmenu -p dunst: | ||
| 145 | |||
| 146 | # Browser for opening urls in context menu. | ||
| 147 | browser = palemoon | ||
| 148 | |||
| 149 | # Align icons left/right/off | ||
| 150 | icon_position = left | ||
| 151 | |||
| 152 | # Limit icons size. | ||
| 153 | max_icon_size=128 | ||
| 154 | |||
| 155 | [urgency_low] | ||
| 156 | # IMPORTANT: colors have to be defined in quotation marks. | ||
| 157 | # Otherwise the "#" and following would be interpreted as a comment. | ||
| 158 | background "#0d1017" | ||
| 159 | foreground = "#888888" | ||
| 160 | timeout = 10 | ||
| 161 | # Icon for notifications with low urgency, uncomment to enable | ||
| 162 | #icon = /path/to/icon | ||
| 163 | |||
| 164 | [urgency_normal] | ||
| 165 | background = "#1e2128" | ||
| 166 | foreground = "#ffffff" | ||
| 167 | timeout = 10 | ||
| 168 | # Icon for notifications with normal urgency, uncomment to enable | ||
| 169 | #icon = /path/to/icon | ||
| 170 | |||
| 171 | [urgency_critical] | ||
| 172 | background = "#900000" | ||
| 173 | foreground = "#ffffff" | ||
| 174 | frame_color = "#ff0000" | ||
| 175 | timeout = 0 | ||
| 176 | # Icon for notifications with critical urgency, uncomment to enable | ||
| 177 | #icon = /path/to/icon | ||
diff --git a/files/.config/guix/.gitignore b/files/.config/guix/.gitignore deleted file mode 100644 index 1f4ddec..0000000 --- a/files/.config/guix/.gitignore +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | current \ No newline at end of file | ||
diff --git a/files/.config/guix/channels.scm b/files/.config/guix/channels.scm deleted file mode 100755 index cb25ece..0000000 --- a/files/.config/guix/channels.scm +++ /dev/null | |||
| @@ -1,5 +0,0 @@ | |||
| 1 | (cons* (channel | ||
| 2 | (name 'jdlugosz) | ||
| 3 | (branch "main") | ||
| 4 | (url "https://github.com/jdlugosz963/dotfiles")) | ||
| 5 | %default-channels) | ||
diff --git a/files/.config/guix/shell-authorized-directories b/files/.config/guix/shell-authorized-directories deleted file mode 100644 index f6e0c84..0000000 --- a/files/.config/guix/shell-authorized-directories +++ /dev/null | |||
| @@ -1,10 +0,0 @@ | |||
| 1 | /home/jakub/Projects/laco | ||
| 2 | /home/jakub/Projects/yasa | ||
| 3 | /home/jakub/Projects/trial | ||
| 4 | /home/jakub/Projects/matura-infa | ||
| 5 | /home/jakub/Projects/abaks-infra | ||
| 6 | /home/jakub/Projects/lispz | ||
| 7 | /home/jakub/Projects/zig-learning | ||
| 8 | /home/jakub/Projects/let-over-lambda | ||
| 9 | /home/jakub/Projects/rust | ||
| 10 | /home/jakub/temphome/embedded-rust | ||
diff --git a/files/.config/picom/picom.conf b/files/.config/picom/picom.conf deleted file mode 100644 index 0f3fe1d..0000000 --- a/files/.config/picom/picom.conf +++ /dev/null | |||
| @@ -1,117 +0,0 @@ | |||
| 1 | # ____ _____ | ||
| 2 | # | _ \_ _| Derek Taylor (DistroTube) | ||
| 3 | # | | | || | http://www.youtube.com/c/DistroTube | ||
| 4 | # | |_| || | http://www.gitlab.com/dwt1/ | ||
| 5 | # |____/ |_| | ||
| 6 | # | ||
| 7 | # My config. Not much to see here; just some pretty standard stuff. | ||
| 8 | |||
| 9 | # Enabled client-side shadows on windows. Note desktop windows | ||
| 10 | # (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow, | ||
| 11 | # unless explicitly requested using the wintypes option. | ||
| 12 | # | ||
| 13 | shadow = true; | ||
| 14 | |||
| 15 | # The blur radius for shadows, in pixels. (defaults to 12) | ||
| 16 | shadow-radius = 8; | ||
| 17 | |||
| 18 | # The opacity of shadows. (0.0 - 1.0, defaults to 0.75) | ||
| 19 | shadow-opacity = .6 | ||
| 20 | |||
| 21 | # The left offset for shadows, in pixels. (defaults to -15) | ||
| 22 | shadow-offset-x = -3; | ||
| 23 | |||
| 24 | # The top offset for shadows, in pixels. (defaults to -15) | ||
| 25 | shadow-offset-y = -3; | ||
| 26 | |||
| 27 | # Specify a list of conditions of windows that should have no shadow. | ||
| 28 | # | ||
| 29 | # examples: | ||
| 30 | # shadow-exclude = "n:e:Notification"; | ||
| 31 | # | ||
| 32 | # shadow-exclude = [] | ||
| 33 | shadow-exclude = [ | ||
| 34 | "name = 'Notification'", | ||
| 35 | "class_g = 'Conky'", | ||
| 36 | "class_g ?= 'Notify-osd'", | ||
| 37 | "class_g = 'Cairo-clock'", | ||
| 38 | "class_g = 'slop'", | ||
| 39 | "class_g = 'Polybar'", | ||
| 40 | "_GTK_FRAME_EXTENTS@:c" | ||
| 41 | ]; | ||
| 42 | |||
| 43 | |||
| 44 | # Fade windows in/out when opening/closing and when opacity changes, | ||
| 45 | # unless no-fading-openclose is used. | ||
| 46 | # fading = false | ||
| 47 | fading = true; | ||
| 48 | |||
| 49 | # Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028) | ||
| 50 | # fade-in-step = 0.028 | ||
| 51 | fade-in-step = 0.3; | ||
| 52 | |||
| 53 | # Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03) | ||
| 54 | # fade-out-step = 0.03 | ||
| 55 | fade-out-step = 0.3; | ||
| 56 | |||
| 57 | # The time between steps in fade step, in milliseconds. (> 0, defaults to 10) | ||
| 58 | # fade-delta = 10 | ||
| 59 | |||
| 60 | # Specify a list of conditions of windows that should not be faded. | ||
| 61 | # don't need this, we disable fading for all normal windows with wintypes: {} | ||
| 62 | fade-exclude = [ | ||
| 63 | "class_g = 'slop'" # maim | ||
| 64 | ] | ||
| 65 | |||
| 66 | # Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0) | ||
| 67 | inactive-opacity = 0.9 | ||
| 68 | # inactive-opacity = 1.0; | ||
| 69 | |||
| 70 | # Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default) | ||
| 71 | # frame-opacity = 1.0 | ||
| 72 | frame-opacity = 0.7; | ||
| 73 | |||
| 74 | # Default opacity for dropdown menus and popup menus. (0.0 - 1.0, defaults to 1.0) | ||
| 75 | # menu-opacity = 1.0 | ||
| 76 | # menu-opacity is depreciated use dropdown-menu and popup-menu instead. | ||
| 77 | |||
| 78 | #If using these 2 below change their values in line 510 & 511 aswell | ||
| 79 | popup_menu = { opacity = 0.8; } | ||
| 80 | dropdown_menu = { opacity = 0.8; } | ||
| 81 | |||
| 82 | |||
| 83 | # Let inactive opacity set by -i override the '_NET_WM_OPACITY' values of windows. | ||
| 84 | # inactive-opacity-override = true | ||
| 85 | inactive-opacity-override = false; | ||
| 86 | |||
| 87 | # Default opacity for active windows. (0.0 - 1.0, defaults to 1.0) | ||
| 88 | active-opacity = 1.0; | ||
| 89 | |||
| 90 | # Dim inactive windows. (0.0 - 1.0, defaults to 0.0) | ||
| 91 | # inactive-dim = 0.0 | ||
| 92 | |||
| 93 | # Specify a list of conditions of windows that should always be considered focused. | ||
| 94 | # focus-exclude = [] | ||
| 95 | focus-exclude = [ | ||
| 96 | "class_g = 'Cairo-clock'", | ||
| 97 | "class_g = 'Bar'", # lemonbar | ||
| 98 | "class_g = 'slop'" # maim | ||
| 99 | ]; | ||
| 100 | |||
| 101 | opacity-rule = [ | ||
| 102 | "100:class_g = 'XTerm'", | ||
| 103 | "100:class_g = 'URxvt'", | ||
| 104 | "100:class_g = 'firefox'", | ||
| 105 | "100:class_g = 'Thunderbird'" | ||
| 106 | ]; | ||
| 107 | |||
| 108 | wintypes: | ||
| 109 | { | ||
| 110 | normal = { fade = false; shadow = true; } | ||
| 111 | tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; }; | ||
| 112 | dock = { shadow = false; } | ||
| 113 | dnd = { shadow = true; } | ||
| 114 | popup_menu = { opacity = 0.8; } | ||
| 115 | dropdown_menu = { opacity = 0.8; } | ||
| 116 | }; | ||
| 117 | |||
diff --git a/files/.config/polybar/config.ini b/files/.config/polybar/config.ini deleted file mode 100644 index d43ee51..0000000 --- a/files/.config/polybar/config.ini +++ /dev/null | |||
| @@ -1,122 +0,0 @@ | |||
| 1 | [settings] | ||
| 2 | screenchange-reload = true | ||
| 3 | |||
| 4 | [colors] | ||
| 5 | background = ${xrdb:emacs.background} | ||
| 6 | foreground = ${xrdb:emacs.foreground} | ||
| 7 | primary = #7fd962 | ||
| 8 | disabled = #707880 | ||
| 9 | |||
| 10 | [bar/example] | ||
| 11 | width = 100% | ||
| 12 | height = 18pt | ||
| 13 | |||
| 14 | background = ${colors.background} | ||
| 15 | foreground = ${colors.foreground} | ||
| 16 | |||
| 17 | line-size = 1.5pt | ||
| 18 | |||
| 19 | padding-left = 0 | ||
| 20 | padding-right = 1 | ||
| 21 | |||
| 22 | module-margin = 1 | ||
| 23 | |||
| 24 | separator = | | ||
| 25 | separator-foreground = ${colors.disabled} | ||
| 26 | |||
| 27 | font-0 = "Terminus:size=15" | ||
| 28 | font-1 = "FontAwesome" | ||
| 29 | |||
| 30 | modules-left = xworkspaces | ||
| 31 | modules-right = memory cpu battery date | ||
| 32 | |||
| 33 | cursor-click = pointer | ||
| 34 | cursor-scroll = ns-resize | ||
| 35 | |||
| 36 | enable-ipc = true | ||
| 37 | |||
| 38 | tray-position = right | ||
| 39 | |||
| 40 | [module/xworkspaces] | ||
| 41 | type = internal/xworkspaces | ||
| 42 | |||
| 43 | icon-0 = 1;0 | ||
| 44 | icon-1 = 2;1 | ||
| 45 | icon-2 = 3;2 | ||
| 46 | icon-3 = 4;3 | ||
| 47 | icon-4 = 5;4 | ||
| 48 | icon-5 = 6;5 | ||
| 49 | icon-6 = 7;6 | ||
| 50 | icon-7 = 8;7 | ||
| 51 | icon-8 = 9;8 | ||
| 52 | icon-9 = 10;9 | ||
| 53 | |||
| 54 | label-active = %icon% | ||
| 55 | label-active-background = ${colors.background-alt} | ||
| 56 | label-active-underline= ${colors.primary} | ||
| 57 | label-active-padding = 1 | ||
| 58 | |||
| 59 | label-occupied = %icon% | ||
| 60 | label-occupied-padding = 1 | ||
| 61 | |||
| 62 | label-urgent = %icon% | ||
| 63 | label-urgent-background = ${colors.alert} | ||
| 64 | label-urgent-padding = 1 | ||
| 65 | |||
| 66 | label-empty = %icon% | ||
| 67 | label-empty-foreground = ${colors.disabled} | ||
| 68 | label-empty-padding = 1 | ||
| 69 | |||
| 70 | [module/battery] | ||
| 71 | type = internal/battery | ||
| 72 | battery = BAT0 | ||
| 73 | adapter = ADP1 | ||
| 74 | |||
| 75 | format-charging = <animation-charging> <label-charging> | ||
| 76 | format-discharging = <ramp-capacity> <label-discharging> | ||
| 77 | format-low = <ramp-capacity> <label-low> | ||
| 78 | format-full = <ramp-capacity> <label-full> | ||
| 79 | |||
| 80 | label-charging = %percentage%% | ||
| 81 | label-discharging = %percentage%% | ||
| 82 | label-low = LOW %percentage%% | ||
| 83 | label-full = FULL %percentage%% | ||
| 84 | |||
| 85 | ramp-capacity-0 = | ||
| 86 | ramp-capacity-1 = | ||
| 87 | ramp-capacity-2 = | ||
| 88 | ramp-capacity-3 = | ||
| 89 | ramp-capacity-4 = | ||
| 90 | ramp-capacity-foreground = ${colors.primary} | ||
| 91 | |||
| 92 | animation-charging-0 = | ||
| 93 | animation-charging-1 = | ||
| 94 | animation-charging-2 = | ||
| 95 | animation-charging-3 = | ||
| 96 | animation-charging-4 = | ||
| 97 | animation-charging-foreground = ${colors.primary} | ||
| 98 | animation-charging-framerate = 750 | ||
| 99 | |||
| 100 | [module/memory] | ||
| 101 | type = internal/memory | ||
| 102 | interval = 2 | ||
| 103 | format-prefix = "RAM " | ||
| 104 | format-prefix-foreground = ${colors.primary} | ||
| 105 | label = %percentage_used:2%% | ||
| 106 | |||
| 107 | [module/cpu] | ||
| 108 | type = internal/cpu | ||
| 109 | interval = 2 | ||
| 110 | format-prefix = "CPU " | ||
| 111 | format-prefix-foreground = ${colors.primary} | ||
| 112 | label = %percentage:2%% | ||
| 113 | |||
| 114 | [module/date] | ||
| 115 | type = internal/date | ||
| 116 | interval = 1 | ||
| 117 | |||
| 118 | date = %H:%M | ||
| 119 | date-alt = %Y-%m-%d %H:%M:%S | ||
| 120 | |||
| 121 | label = %date% | ||
| 122 | label-foreground = ${colors.primary} | ||
diff --git a/files/.config/qtile/autorc b/files/.config/qtile/autorc deleted file mode 100755 index c54f683..0000000 --- a/files/.config/qtile/autorc +++ /dev/null | |||
| @@ -1,31 +0,0 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | function monitor_settings() { | ||
| 4 | sleep .5 | ||
| 5 | monitor_status=$(xrandr | grep "HDMI-1-4 connected" | wc -l) | ||
| 6 | |||
| 7 | if [ $monitor_status == 1 ]; | ||
| 8 | then | ||
| 9 | # xrandr --auto | ||
| 10 | # xrandr --output eDP-1 --off | ||
| 11 | xrandr --output eDP-1-1 --auto --output HDMI-0 --auto --left-of eDP-1-1 | ||
| 12 | fi | ||
| 13 | } | ||
| 14 | |||
| 15 | function caps_to_esc(){ xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape'; } | ||
| 16 | |||
| 17 | function start() { | ||
| 18 | killall $1 | ||
| 19 | sleep .5 | ||
| 20 | $($1 $2) & | ||
| 21 | } | ||
| 22 | |||
| 23 | # monitor_settings | ||
| 24 | caps_to_esc | ||
| 25 | |||
| 26 | start nitrogen "--restore" | ||
| 27 | start picom "" | ||
| 28 | start spotifyd "" | ||
| 29 | start rclone "mount remote:/sync /home/jakub/Sync" | ||
| 30 | start emacs "--daemon" | ||
| 31 | xinput set-prop 11 344 1 | ||
diff --git a/files/.config/qtile/config.py b/files/.config/qtile/config.py deleted file mode 100644 index 9106731..0000000 --- a/files/.config/qtile/config.py +++ /dev/null | |||
| @@ -1,232 +0,0 @@ | |||
| 1 | import os | ||
| 2 | import subprocess | ||
| 3 | |||
| 4 | from typing import List | ||
| 5 | |||
| 6 | from libqtile import bar, layout, widget | ||
| 7 | from libqtile.config import Click, Drag, Group, Key, Match, Screen, KeyChord | ||
| 8 | from libqtile import extension | ||
| 9 | from libqtile.lazy import lazy | ||
| 10 | from libqtile.utils import guess_terminal | ||
| 11 | from libqtile import hook | ||
| 12 | |||
| 13 | MOD = "mod4" | ||
| 14 | |||
| 15 | TERMINAL = guess_terminal() | ||
| 16 | |||
| 17 | DMENU_FLAGS = '-l 16 -p run -c -i' | ||
| 18 | |||
| 19 | BAR = '#282a36' | ||
| 20 | LIGHT_BAR = '#393b37' | ||
| 21 | YELLOW = '#f1fa8c' | ||
| 22 | RED = '#ff5555' | ||
| 23 | LIGHT_RED = '#ff9999' | ||
| 24 | GREEN = '#50fa7b' | ||
| 25 | CYAN = '#8be9fd' | ||
| 26 | LIGHT_CYAN = '#abfbff' | ||
| 27 | |||
| 28 | @hook.subscribe.startup_once | ||
| 29 | def autostart(): | ||
| 30 | home = os.path.expanduser('~/.config/qtile/autorc') | ||
| 31 | subprocess.run([home]) | ||
| 32 | |||
| 33 | keys = [ | ||
| 34 | Key([MOD], "h", lazy.layout.left(), desc="Move focus to left"), | ||
| 35 | Key([MOD], "l", lazy.layout.right(), desc="Move focus to right"), | ||
| 36 | Key([MOD], "j", lazy.layout.down(), desc="Move focus down"), | ||
| 37 | Key([MOD], "k", lazy.layout.up(), desc="Move focus up"), | ||
| 38 | Key([MOD], "s", lazy.next_screen() ), | ||
| 39 | Key([MOD], "space", lazy.window.toggle_floating(), | ||
| 40 | desc="Move window focus to other window"), | ||
| 41 | |||
| 42 | Key([MOD, "shift"], "h", lazy.layout.shuffle_left(), | ||
| 43 | desc="Move window to the left"), | ||
| 44 | Key([MOD, "shift"], "l", lazy.layout.shuffle_right(), | ||
| 45 | desc="Move window to the right"), | ||
| 46 | Key([MOD, "shift"], "j", lazy.layout.shuffle_down(), | ||
| 47 | desc="Move window down"), | ||
| 48 | Key([MOD, "shift"], "k", lazy.layout.shuffle_up(), desc="Move window up"), | ||
| 49 | |||
| 50 | Key([MOD, "control"], "h", lazy.layout.grow_left(), | ||
| 51 | desc="Grow window to the left"), | ||
| 52 | Key([MOD, "control"], "l", lazy.layout.grow_right(), | ||
| 53 | desc="Grow window to the right"), | ||
| 54 | Key([MOD, "control"], "j", lazy.layout.grow_down(), | ||
| 55 | desc="Grow window down"), | ||
| 56 | Key([MOD, "control"], "k", lazy.layout.grow_up(), desc="Grow window up"), | ||
| 57 | Key([MOD], "n", lazy.layout.normalize(), desc="Reset all window sizes"), | ||
| 58 | |||
| 59 | Key([MOD, "shift"], "Return", lazy.layout.toggle_split(), | ||
| 60 | desc="Toggle between split and unsplit sides of stack"), | ||
| 61 | Key([MOD], "Return", lazy.spawn(TERMINAL), desc="Launch terminal"), | ||
| 62 | |||
| 63 | Key([MOD], "Tab", lazy.next_layout(), desc="Toggle between layouts"), | ||
| 64 | Key([MOD], "c", lazy.window.kill(), desc="Kill focused window"), | ||
| 65 | |||
| 66 | Key([MOD, "control"], "r", lazy.restart(), desc="Restart Qtile"), | ||
| 67 | Key([MOD, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"), | ||
| 68 | |||
| 69 | Key([MOD], "F12", os.system("xbacklight -inc 10"), desc="Inc backlight"), | ||
| 70 | Key([MOD], "F11", os.system("xbacklight -dec 10"), desc="Dec backlight"), | ||
| 71 | |||
| 72 | Key([MOD], "r", lazy.spawncmd(), | ||
| 73 | desc="Spawn a command using a prompt widget"), | ||
| 74 | |||
| 75 | KeyChord([MOD], "p", [ | ||
| 76 | Key([], "p", lazy.spawn(f"dmenu_run {DMENU_FLAGS}"), desc="Spawn dmenu run"), | ||
| 77 | Key([], "n", lazy.spawn(f"networkmanager_dmenu {DMENU_FLAGS}"), desc="Spawn dmenu for network manager"), | ||
| 78 | ]), | ||
| 79 | |||
| 80 | Key([MOD, "mod1"], "q", lazy.spawn("qutebrowser"), desc="Spawn qutebrowser"), | ||
| 81 | Key([MOD, "mod1"], "b", lazy.spawn("brave"), desc="Spawn brave"), | ||
| 82 | Key([MOD, "mod1"], "f", lazy.spawn("firefox"), desc="Spawn firefox"), | ||
| 83 | |||
| 84 | KeyChord([MOD], "e", [ | ||
| 85 | Key([], "e", lazy.spawn("emacsclient -c -a 'emacs'"), desc="Spawn Emacsclient"), | ||
| 86 | Key([], "d", lazy.spawn("emacsclient -c -a 'emacs' --eval '(dired nil)'"), desc='Emacsclient Dired'), | ||
| 87 | Key([], "m", lazy.spawn("emacsclient -c -a 'emacs' --eval '(emms-browser)'"), desc='Emacsclient Dired'), | ||
| 88 | ]), | ||
| 89 | |||
| 90 | Key([MOD, "mod1"], "s", lazy.spawn("alacritty -e spt"), desc="Spawn spt (spotify clent)"), | ||
| 91 | Key([MOD, "mod1"], "l", lazy.spawn("slock"), desc="lock desktop"), | ||
| 92 | Key([MOD, "mod1"], "r", lazy.spawn("alacritty -e ranger"), desc="Spawn ranger (file manager)"), | ||
| 93 | Key([MOD, "mod1"], "p", lazy.spawn("alacritty -e pulsemixer"), desc="Spawn pulsemixer"), | ||
| 94 | ] | ||
| 95 | |||
| 96 | groups_names = [ | ||
| 97 | "dev", | ||
| 98 | "www", | ||
| 99 | "music", | ||
| 100 | "virt", | ||
| 101 | "sys", | ||
| 102 | "other" | ||
| 103 | ] | ||
| 104 | |||
| 105 | groups = [Group(i) for i in groups_names] | ||
| 106 | for i, group in enumerate(groups): | ||
| 107 | keys.extend([ | ||
| 108 | Key([MOD], str(i+1), lazy.group[group.name].toscreen(), | ||
| 109 | desc="Switch to group {}".format(group.name)), | ||
| 110 | |||
| 111 | Key([MOD, "shift"], str(i+1), lazy.window.togroup(group.name, switch_group=True), | ||
| 112 | desc="Switch to & move focused window to group {}".format(group.name)), | ||
| 113 | ]) | ||
| 114 | |||
| 115 | mouse = [ | ||
| 116 | Drag([MOD], "Button1", lazy.window.set_position_floating(), | ||
| 117 | start=lazy.window.get_position()), | ||
| 118 | Drag([MOD], "Button3", lazy.window.set_size_floating(), | ||
| 119 | start=lazy.window.get_size()), | ||
| 120 | Click([MOD], "Button2", lazy.window.bring_to_front()) | ||
| 121 | ] | ||
| 122 | |||
| 123 | layout_cfg = { | ||
| 124 | 'border_width': 2, | ||
| 125 | 'border_normal': "#bb8888", | ||
| 126 | 'border_focus': "884444", | ||
| 127 | 'margin': 8 | ||
| 128 | } | ||
| 129 | |||
| 130 | layouts = [ | ||
| 131 | # layout.Columns(**layout_cfg), | ||
| 132 | # layout.Max(), | ||
| 133 | layout.Stack(num_stacks=1, **layout_cfg), | ||
| 134 | # layout.Bsp(), | ||
| 135 | # layout.Matrix(), | ||
| 136 | layout.MonadTall(**layout_cfg), | ||
| 137 | # layout.MonadWide(), | ||
| 138 | # layout.RatioTile(), | ||
| 139 | # layout.Tile(), | ||
| 140 | # layout.TreeTab(), | ||
| 141 | # layout.VerticalTile(), | ||
| 142 | # layout.Zoomy(), | ||
| 143 | ] | ||
| 144 | |||
| 145 | widget_defaults = dict( | ||
| 146 | font='sans', | ||
| 147 | fontsize=12, | ||
| 148 | padding=6, | ||
| 149 | ) | ||
| 150 | |||
| 151 | transparent_sep = { | ||
| 152 | 'foreground': BAR, | ||
| 153 | 'margin': 2 | ||
| 154 | } | ||
| 155 | |||
| 156 | soft_sep = { | ||
| 157 | 'foreground': '44475a', | ||
| 158 | 'padding': 2, | ||
| 159 | 'margin': 4 | ||
| 160 | } | ||
| 161 | |||
| 162 | screens = [ | ||
| 163 | Screen( | ||
| 164 | top=bar.Bar( | ||
| 165 | [ | ||
| 166 | widget.Sep(**transparent_sep), | ||
| 167 | widget.Image(filename="~/.config/qtile/python.png", margin=4), | ||
| 168 | widget.Sep(**transparent_sep), | ||
| 169 | widget.CurrentLayout(), | ||
| 170 | widget.Sep(**transparent_sep), | ||
| 171 | widget.GroupBox( | ||
| 172 | margin_y = 3, | ||
| 173 | margin_x = 0, | ||
| 174 | padding_y = 5, | ||
| 175 | padding_x = 3, | ||
| 176 | borderwidth = 3, | ||
| 177 | rounded = False, | ||
| 178 | highlight_color = LIGHT_BAR, | ||
| 179 | highlight_method = "line", | ||
| 180 | this_current_screen_border = CYAN, | ||
| 181 | this_screen_border = CYAN, | ||
| 182 | other_current_screen_border = LIGHT_BAR, | ||
| 183 | other_screen_border = LIGHT_BAR, | ||
| 184 | ), | ||
| 185 | widget.Prompt(), | ||
| 186 | widget.Sep(**transparent_sep), | ||
| 187 | widget.WindowName(), | ||
| 188 | widget.Net(format="🌐 ↓{down} ↑{up}", foreground=YELLOW), | ||
| 189 | widget.Sep(**soft_sep), | ||
| 190 | widget.CPU(format='💻 {load_percent}%', fontsize=12, foreground=RED), | ||
| 191 | widget.Sep(**soft_sep), | ||
| 192 | widget.Battery(format='🔋 {char} {percent:2.0%} {hour:d}:{min:02d} {watt:.2f} W', foreground=GREEN), | ||
| 193 | widget.Sep(**soft_sep), | ||
| 194 | widget.Clock(format='📅 %B %-d, %H:%M', foreground=CYAN), | ||
| 195 | widget.Sep(**soft_sep), | ||
| 196 | widget.CurrentScreen(), | ||
| 197 | widget.Sep(**soft_sep), | ||
| 198 | widget.Systray() | ||
| 199 | ], | ||
| 200 | 24, | ||
| 201 | margin=8, | ||
| 202 | background=BAR, | ||
| 203 | border_color=CYAN, | ||
| 204 | border_width=1 | ||
| 205 | ), | ||
| 206 | ), | ||
| 207 | ] | ||
| 208 | |||
| 209 | floating_layout = layout.Floating(float_rules=[ | ||
| 210 | # Run the utility of `xprop` to see the wm class and name of an X client. | ||
| 211 | *layout.Floating.default_float_rules, | ||
| 212 | Match(wm_class='confirmreset'), # gitk | ||
| 213 | Match(wm_class='makebranch'), # gitk | ||
| 214 | Match(wm_class='maketag'), # gitk | ||
| 215 | Match(wm_class='ssh-askpass'), # ssh-askpass | ||
| 216 | Match(title='branchdialog'), # gitk | ||
| 217 | Match(title='pinentry'), # GPG key password entry | ||
| 218 | ]) | ||
| 219 | |||
| 220 | dgroups_key_binder = None | ||
| 221 | dgroups_app_rules = [] | ||
| 222 | |||
| 223 | follow_mouse_focus = True | ||
| 224 | bring_front_click = False | ||
| 225 | cursor_warp = False | ||
| 226 | auto_fullscreen = True | ||
| 227 | focus_on_window_activation = "smart" | ||
| 228 | reconfigure_screens = True | ||
| 229 | |||
| 230 | auto_minimize = True | ||
| 231 | |||
| 232 | wmname = "LG3D" | ||
diff --git a/files/.config/qtile/mdt_shell b/files/.config/qtile/mdt_shell deleted file mode 100755 index 90fa6f3..0000000 --- a/files/.config/qtile/mdt_shell +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | TERM=xterm-256color /home/jakub/.local/bin/mdt shell | ||
diff --git a/files/.config/qtile/photos/desktop.png b/files/.config/qtile/photos/desktop.png deleted file mode 100644 index 8fca190..0000000 --- a/files/.config/qtile/photos/desktop.png +++ /dev/null | |||
| Binary files differ | |||
diff --git a/files/.config/qtile/python.png b/files/.config/qtile/python.png deleted file mode 100644 index 9a4b1ed..0000000 --- a/files/.config/qtile/python.png +++ /dev/null | |||
| Binary files differ | |||
diff --git a/files/.config/qtile/readme.org b/files/.config/qtile/readme.org deleted file mode 100644 index 235dd47..0000000 --- a/files/.config/qtile/readme.org +++ /dev/null | |||
| @@ -1,5 +0,0 @@ | |||
| 1 | #+title: Config | ||
| 2 | |||
| 3 | * Qtile conifg | ||
| 4 | - My personal qtile config ;) | ||
| 5 | [[./photos/desktop.png]] | ||
diff --git a/files/.config/sway/config b/files/.config/sway/config deleted file mode 100644 index cf587fc..0000000 --- a/files/.config/sway/config +++ /dev/null | |||
| @@ -1,195 +0,0 @@ | |||
| 1 | set $mod Mod4 | ||
| 2 | |||
| 3 | set $left h | ||
| 4 | set $down j | ||
| 5 | set $up k | ||
| 6 | set $right l | ||
| 7 | |||
| 8 | set $term alacritty | ||
| 9 | set $emacs emacsclient -c | ||
| 10 | set $menu fuzzel -r0 -b 282828f2 -C 458588f2 -B 3 -s 458588f2 -S 282828FF --font "Terminus:size=12" -p "run: " | ||
| 11 | |||
| 12 | set $laptop-display eDP-1 | ||
| 13 | set $generic-display HDMI-A-1 | ||
| 14 | set $primary-home-display 'Iiyama North America PLE2407HDSD 0x01010101' | ||
| 15 | set $secondary-home-display 'Dell Inc. DELL E190S M8VPV186CELI' | ||
| 16 | |||
| 17 | set $primary-display-layout 'Samsung Electric Company C34H89x HTJM200007' $primary-home-display $generic-display $laptop-display | ||
| 18 | set $secondary-display-layout $secondary-home-display $laptop-display | ||
| 19 | |||
| 20 | # output * bg SPOILER_33.png fill | ||
| 21 | output * bg #002b36 solid_color | ||
| 22 | |||
| 23 | output $laptop-display resolution 1920x1080 position 1920,0 | ||
| 24 | output $generic-display resolution 1920x1080 position 0,0 | ||
| 25 | output $primary-home-display resolution 1920x1080 position 0,0 | ||
| 26 | output $secondary-home-display resolution 1280x1024 position 1920,0 | ||
| 27 | set $opacity 0.9 | ||
| 28 | |||
| 29 | client.focused #002b36 #586e75 #eee8d5 #268bd2 | ||
| 30 | client.focused_inactive #002b36 #073642 #93a1a1 #268bd2 | ||
| 31 | client.unfocused #002b36 #073642 #93a1a1 #268bd2 | ||
| 32 | client.urgent #002b36 #dc322f #fdf6e3 #002b36 | ||
| 33 | |||
| 34 | input type:keyboard { | ||
| 35 | xkb_layout pl,us | ||
| 36 | } | ||
| 37 | |||
| 38 | input type:touchpad { | ||
| 39 | tap enabled | ||
| 40 | middle_emulation enabled | ||
| 41 | } | ||
| 42 | |||
| 43 | bindsym $mod+Shift+s output $laptop-display toggle | ||
| 44 | |||
| 45 | set $swaylock 'swaylock -f -c 000000 --font "Terminus"' | ||
| 46 | exec swayidle -w \ | ||
| 47 | timeout 280 $swaylock \ | ||
| 48 | timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \ | ||
| 49 | before-sleep $swaylock | ||
| 50 | |||
| 51 | # inhibit_idle fullscreen | ||
| 52 | |||
| 53 | bindsym $mod+Escape exec $swaylock | ||
| 54 | |||
| 55 | bindsym XF86MonBrightnessUp exec brightnessctl set 5%+ | ||
| 56 | bindsym XF86MonBrightnessDown exec brightnessctl set 5%- | ||
| 57 | |||
| 58 | bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle | ||
| 59 | bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% | ||
| 60 | bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% | ||
| 61 | |||
| 62 | bindsym XF86AudioNext exec playerctl next | ||
| 63 | bindsym XF86AudioPrev exec playerctl previous | ||
| 64 | bindsym XF86AudioPlay exec playerctl play-pause | ||
| 65 | bindsym XF86AudioPause exec playerctl pause | ||
| 66 | |||
| 67 | bindsym print exec grimshot --notify copy area | ||
| 68 | bindsym $mod+print exec grimshot --notify copy output | ||
| 69 | bindsym $mod+Ctrl+print grimshot save area - | swappy -f - | ||
| 70 | |||
| 71 | bindsym $mod+Return exec $term | ||
| 72 | |||
| 73 | bindsym $mod+Shift+q kill | ||
| 74 | |||
| 75 | floating_modifier $mod normal | ||
| 76 | |||
| 77 | bindsym $mod+Shift+c reload | ||
| 78 | bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit' | ||
| 79 | |||
| 80 | bindsym $mod+$left focus left | ||
| 81 | bindsym $mod+$down focus down | ||
| 82 | bindsym $mod+$up focus up | ||
| 83 | bindsym $mod+$right focus right | ||
| 84 | |||
| 85 | bindsym $mod+Shift+$left move left | ||
| 86 | bindsym $mod+Shift+$down move down | ||
| 87 | bindsym $mod+Shift+$up move up | ||
| 88 | bindsym $mod+Shift+$right move right | ||
| 89 | |||
| 90 | workspace 1 output $primary-display-layout | ||
| 91 | workspace 2 output $primary-display-layout | ||
| 92 | workspace 3 output $secondary-display-layout | ||
| 93 | workspace 4 output $secondary-display-layout | ||
| 94 | workspace 9 output $primary-display-layout | ||
| 95 | workspace 10 output $secondary-display-layout | ||
| 96 | |||
| 97 | bindsym $mod+1 workspace number 1 | ||
| 98 | bindsym $mod+2 workspace number 2 | ||
| 99 | bindsym $mod+3 workspace number 3 | ||
| 100 | bindsym $mod+4 workspace number 4 | ||
| 101 | bindsym $mod+5 workspace number 5 | ||
| 102 | bindsym $mod+6 workspace number 6 | ||
| 103 | bindsym $mod+7 workspace number 7 | ||
| 104 | bindsym $mod+8 workspace number 8 | ||
| 105 | bindsym $mod+9 workspace number 9 | ||
| 106 | bindsym $mod+0 workspace number 10 | ||
| 107 | |||
| 108 | bindsym $mod+Shift+1 move container to workspace number 1 | ||
| 109 | bindsym $mod+Shift+2 move container to workspace number 2 | ||
| 110 | bindsym $mod+Shift+3 move container to workspace number 3 | ||
| 111 | bindsym $mod+Shift+4 move container to workspace number 4 | ||
| 112 | bindsym $mod+Shift+5 move container to workspace number 5 | ||
| 113 | bindsym $mod+Shift+6 move container to workspace number 6 | ||
| 114 | bindsym $mod+Shift+7 move container to workspace number 7 | ||
| 115 | bindsym $mod+Shift+8 move container to workspace number 8 | ||
| 116 | bindsym $mod+Shift+9 move container to workspace number 9 | ||
| 117 | bindsym $mod+Shift+0 move container to workspace number 10 | ||
| 118 | |||
| 119 | assign [app_id="(firefox-default|Firefox|qutebrowser|Chromium-browser)"] 2 | ||
| 120 | assign [instance="(chromium-browser)"] 2 | ||
| 121 | assign [instance="(spotify)"] 3 | ||
| 122 | assign [app_id=".blueman-manager-real"] 3 | ||
| 123 | assign [app_id="pavucontrol"] 3 | ||
| 124 | assign [app_id="(org.telegram.desktop)"] 4 | ||
| 125 | assign [app_id="vesktop"] 4 | ||
| 126 | assign [app_id="com.ktechpit.whatsie"] 4 | ||
| 127 | assign [instance="(discord)"] 4 | ||
| 128 | |||
| 129 | # for_window [app_id="vesktop"] opacity $opacity | ||
| 130 | |||
| 131 | bindsym $mod+b splith | ||
| 132 | bindsym $mod+v splitv | ||
| 133 | |||
| 134 | bindsym $mod+s layout stacking | ||
| 135 | bindsym $mod+w layout tabbed | ||
| 136 | bindsym $mod+e layout toggle split | ||
| 137 | |||
| 138 | bindsym $mod+f fullscreen | ||
| 139 | bindsym $mod+Shift+space floating toggle | ||
| 140 | bindsym $mod+space focus mode_toggle | ||
| 141 | bindsym $mod+a focus parent | ||
| 142 | |||
| 143 | bindsym $mod+Shift+minus move scratchpad | ||
| 144 | bindsym $mod+minus scratchpad show | ||
| 145 | |||
| 146 | mode "resize" { | ||
| 147 | bindsym $left resize shrink width 10px | ||
| 148 | bindsym $down resize grow height 10px | ||
| 149 | bindsym $up resize shrink height 10px | ||
| 150 | bindsym $right resize grow width 10px | ||
| 151 | |||
| 152 | bindsym Return mode "default" | ||
| 153 | bindsym Control+g mode "default" | ||
| 154 | bindsym Escape mode "default" | ||
| 155 | } | ||
| 156 | bindsym $mod+r mode "resize" | ||
| 157 | |||
| 158 | set $default swaymsg mode default | ||
| 159 | mode "menu" { | ||
| 160 | bindsym --no-repeat e exec '$default; $emacs;' | ||
| 161 | bindsym --no-repeat w exec "$default; whois-at-hsp -n" | ||
| 162 | |||
| 163 | bindsym Return mode "default" | ||
| 164 | bindsym Control+g mode "default" | ||
| 165 | bindsym Escape mode "default" | ||
| 166 | |||
| 167 | } | ||
| 168 | bindsym $mod+o mode "menu" | ||
| 169 | |||
| 170 | |||
| 171 | workspace_layout tabbed | ||
| 172 | |||
| 173 | # default_border normal 3 | ||
| 174 | # gaps outer 0 | ||
| 175 | # gaps inner 6 | ||
| 176 | # corner_radius 4 | ||
| 177 | # blur_xray disable | ||
| 178 | # blur enable | ||
| 179 | # layer_effects "waybar" blur enable | ||
| 180 | |||
| 181 | font Terminus (TTF) 12 | ||
| 182 | bindsym $mod+p exec $menu | ||
| 183 | |||
| 184 | |||
| 185 | # Taken from dawivil dotfiles. | ||
| 186 | exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway | ||
| 187 | |||
| 188 | # exec udiskie -t | ||
| 189 | exec mako --font "Terminus (TTF)" --outer-margin=5 --margin=3 --border-size=3 --default-timeout=7000 --background="#282828e0" | ||
| 190 | |||
| 191 | exec nm-applet --indicator | ||
| 192 | exec blueman-applet | ||
| 193 | exec waybar | ||
| 194 | exec udiskie -t | ||
| 195 | exec wlsunset -l 51.919438 -L 19.145136 | ||
diff --git a/files/.config/waybar/config b/files/.config/waybar/config deleted file mode 100644 index 5ebee30..0000000 --- a/files/.config/waybar/config +++ /dev/null | |||
| @@ -1,159 +0,0 @@ | |||
| 1 | { | ||
| 2 | "layer": "top", | ||
| 3 | "position": "top", | ||
| 4 | |||
| 5 | "modules-left": [ | ||
| 6 | "sway/workspaces", | ||
| 7 | "sway/mode" | ||
| 8 | ], | ||
| 9 | |||
| 10 | "modules-right": [ | ||
| 11 | // "custom/whois", | ||
| 12 | "pulseaudio", | ||
| 13 | "network", | ||
| 14 | "memory", | ||
| 15 | "cpu", | ||
| 16 | "temperature", | ||
| 17 | "battery", | ||
| 18 | "sway/language", | ||
| 19 | "clock#date", | ||
| 20 | "clock#time", | ||
| 21 | "idle_inhibitor", | ||
| 22 | "tray" | ||
| 23 | ], | ||
| 24 | |||
| 25 | // Modules | ||
| 26 | "idle_inhibitor": { | ||
| 27 | "format": "{icon}", | ||
| 28 | "format-icons": { | ||
| 29 | "activated": "", | ||
| 30 | "deactivated": "" | ||
| 31 | } | ||
| 32 | }, | ||
| 33 | |||
| 34 | "battery": { | ||
| 35 | "interval": 10, | ||
| 36 | "states": { | ||
| 37 | "warning": 30, | ||
| 38 | "critical": 15 | ||
| 39 | }, | ||
| 40 | "format-time": "{H}:{M:02}", | ||
| 41 | "format": "{icon} {capacity}% ({time})", | ||
| 42 | "format-charging": " {capacity}% ({time})", | ||
| 43 | "format-charging-full": " {capacity}%", | ||
| 44 | "format-full": "{icon} {capacity}%", | ||
| 45 | "format-alt": "{icon} {power}W", | ||
| 46 | "format-icons": [ | ||
| 47 | "", | ||
| 48 | "", | ||
| 49 | "", | ||
| 50 | "", | ||
| 51 | "" | ||
| 52 | ], | ||
| 53 | "tooltip": false | ||
| 54 | }, | ||
| 55 | |||
| 56 | "clock#time": { | ||
| 57 | "interval": 10, | ||
| 58 | "format": "{:%H:%M}", | ||
| 59 | "tooltip": false | ||
| 60 | }, | ||
| 61 | |||
| 62 | "clock#date": { | ||
| 63 | "interval": 20, | ||
| 64 | "format": " {:%e %b %Y}", | ||
| 65 | "tooltip": false | ||
| 66 | //"tooltip-format": "{:%e %B %Y}" | ||
| 67 | }, | ||
| 68 | |||
| 69 | "cpu": { | ||
| 70 | "interval": 5, | ||
| 71 | "tooltip": false, | ||
| 72 | "format": " {usage}%", | ||
| 73 | "format-alt": " {load}", | ||
| 74 | "states": { | ||
| 75 | "warning": 70, | ||
| 76 | "critical": 90 | ||
| 77 | } | ||
| 78 | }, | ||
| 79 | |||
| 80 | "sway/language": { | ||
| 81 | "format": " {}", | ||
| 82 | "min-length": 5, | ||
| 83 | "on-click": "swaymsg 'input * xkb_switch_layout next'", | ||
| 84 | "tooltip": false | ||
| 85 | }, | ||
| 86 | |||
| 87 | "memory": { | ||
| 88 | "interval": 5, | ||
| 89 | "format": " {used:0.1f}G/{total:0.1f}G", | ||
| 90 | "states": { | ||
| 91 | "warning": 70, | ||
| 92 | "critical": 90 | ||
| 93 | }, | ||
| 94 | "tooltip": false | ||
| 95 | }, | ||
| 96 | |||
| 97 | "network": { | ||
| 98 | "interval": 5, | ||
| 99 | "format-wifi": " {essid} ({signalStrength}%)", | ||
| 100 | "format-ethernet": " {ifname}", | ||
| 101 | "format-disconnected": "No connection", | ||
| 102 | "format-alt": " {ipaddr}/{cidr}", | ||
| 103 | "tooltip": false | ||
| 104 | }, | ||
| 105 | |||
| 106 | "sway/mode": { | ||
| 107 | "format": "{}", | ||
| 108 | "tooltip": false | ||
| 109 | }, | ||
| 110 | |||
| 111 | "sway/window": { | ||
| 112 | "format": "{}", | ||
| 113 | "max-length": 30, | ||
| 114 | "tooltip": false | ||
| 115 | }, | ||
| 116 | |||
| 117 | "sway/workspaces": { | ||
| 118 | "disable-scroll-wraparound": true, | ||
| 119 | "smooth-scrolling-threshold": 4, | ||
| 120 | "enable-bar-scroll": true, | ||
| 121 | "format": "{name}" | ||
| 122 | }, | ||
| 123 | |||
| 124 | "pulseaudio": { | ||
| 125 | "format": "{icon} {volume}%", | ||
| 126 | "format-bluetooth": "{icon} {volume}%", | ||
| 127 | "format-muted": "", | ||
| 128 | "format-icons": { | ||
| 129 | "headphone": "", | ||
| 130 | "hands-free": "", | ||
| 131 | "headset": "", | ||
| 132 | "phone": "", | ||
| 133 | "portable": "", | ||
| 134 | "car": "", | ||
| 135 | "default": ["", ""] | ||
| 136 | }, | ||
| 137 | "scroll-step": 1, | ||
| 138 | "on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle", | ||
| 139 | "tooltip": false | ||
| 140 | }, | ||
| 141 | |||
| 142 | "temperature": { | ||
| 143 | "critical-threshold": 90, | ||
| 144 | "interval": 5, | ||
| 145 | "format": "{icon} {temperatureC}°", | ||
| 146 | "format-icons": [ | ||
| 147 | "", | ||
| 148 | "", | ||
| 149 | "", | ||
| 150 | "", | ||
| 151 | "" | ||
| 152 | ], | ||
| 153 | "tooltip": false | ||
| 154 | }, | ||
| 155 | |||
| 156 | "tray": { | ||
| 157 | "icon-size": 18, | ||
| 158 | } | ||
| 159 | } | ||
diff --git a/files/.config/waybar/style.css b/files/.config/waybar/style.css deleted file mode 100644 index 53d732b..0000000 --- a/files/.config/waybar/style.css +++ /dev/null | |||
| @@ -1,205 +0,0 @@ | |||
| 1 | /* Keyframes */ | ||
| 2 | |||
| 3 | @keyframes blink-critical { | ||
| 4 | to { | ||
| 5 | /*color: @white;*/ | ||
| 6 | background-color: @critical; | ||
| 7 | } | ||
| 8 | } | ||
| 9 | |||
| 10 | |||
| 11 | /* Styles */ | ||
| 12 | |||
| 13 | /* Colors (gruvbox) */ | ||
| 14 | @define-color black #073642; | ||
| 15 | @define-color red #dc322f; | ||
| 16 | @define-color green #859900; | ||
| 17 | @define-color yellow #b58900; | ||
| 18 | @define-color blue #268bd2; | ||
| 19 | @define-color purple #d33682; | ||
| 20 | @define-color aqua #00afaf; | ||
| 21 | @define-color gray #1c1c1c; | ||
| 22 | @define-color brgray #928374; | ||
| 23 | @define-color brred #cb4b16; | ||
| 24 | @define-color brgreen #586e75; | ||
| 25 | @define-color bryellow #657b83; | ||
| 26 | @define-color brblue #839496; | ||
| 27 | @define-color brpurple #6c71c4; | ||
| 28 | @define-color braqua #93a1a1; | ||
| 29 | @define-color white #eee8d5; | ||
| 30 | @define-color bg1 #073642; | ||
| 31 | @define-color bg2 #002b36; | ||
| 32 | |||
| 33 | |||
| 34 | @define-color warning @bryellow; | ||
| 35 | @define-color critical @red; | ||
| 36 | @define-color mode @bg2; | ||
| 37 | @define-color unfocused @bg2; | ||
| 38 | @define-color focused @blue; | ||
| 39 | @define-color inactive @purple; | ||
| 40 | @define-color sound @green; | ||
| 41 | @define-color network @yellow; | ||
| 42 | @define-color memory @aqua; | ||
| 43 | @define-color cpu @blue; | ||
| 44 | @define-color temp @brpurple; | ||
| 45 | @define-color layout @green; | ||
| 46 | @define-color battery @yellow; | ||
| 47 | @define-color date @aqua; | ||
| 48 | @define-color time @bg2; | ||
| 49 | @define-color tray @bg2; | ||
| 50 | |||
| 51 | /* Reset all styles */ | ||
| 52 | * { | ||
| 53 | border: none; | ||
| 54 | border-radius: 0; | ||
| 55 | min-height: 0; | ||
| 56 | margin: 0; | ||
| 57 | padding: 0; | ||
| 58 | box-shadow: none; | ||
| 59 | text-shadow: none; | ||
| 60 | icon-shadow: none; | ||
| 61 | } | ||
| 62 | |||
| 63 | /* The whole bar */ | ||
| 64 | #waybar { | ||
| 65 | background: @bg2; | ||
| 66 | color: @white; | ||
| 67 | font-family: "Terminus (TTF)", FontAwesome; | ||
| 68 | font-size: 12pt; | ||
| 69 | } | ||
| 70 | |||
| 71 | /* Each module */ | ||
| 72 | #battery, | ||
| 73 | #clock, | ||
| 74 | #cpu, | ||
| 75 | #language, | ||
| 76 | #memory, | ||
| 77 | #mode, | ||
| 78 | #network, | ||
| 79 | #pulseaudio, | ||
| 80 | #temperature, | ||
| 81 | #tray, | ||
| 82 | #backlight, | ||
| 83 | #idle_inhibitor, | ||
| 84 | #disk, | ||
| 85 | #user, | ||
| 86 | #mpris { | ||
| 87 | padding-left: 8pt; | ||
| 88 | padding-right: 8pt; | ||
| 89 | } | ||
| 90 | |||
| 91 | /* Each critical module */ | ||
| 92 | #memory.critical, | ||
| 93 | #cpu.critical, | ||
| 94 | #temperature.critical, | ||
| 95 | #battery.critical.discharging { | ||
| 96 | animation-timing-function: linear; | ||
| 97 | animation-iteration-count: infinite; | ||
| 98 | animation-direction: alternate; | ||
| 99 | animation-name: blink-critical; | ||
| 100 | animation-duration: 1s; | ||
| 101 | } | ||
| 102 | |||
| 103 | /* Each warning */ | ||
| 104 | #network.disconnected, | ||
| 105 | #memory.warning, | ||
| 106 | #cpu.warning, | ||
| 107 | #temperature.warning, | ||
| 108 | #battery.warning.discharging { | ||
| 109 | color: @warning; | ||
| 110 | } | ||
| 111 | |||
| 112 | /* And now modules themselves in their respective order */ | ||
| 113 | |||
| 114 | /* Current sway mode (resize etc) */ | ||
| 115 | #mode { | ||
| 116 | color: @white; | ||
| 117 | background: @mode; | ||
| 118 | } | ||
| 119 | |||
| 120 | /* Workspaces stuff */ | ||
| 121 | #workspaces button { | ||
| 122 | /*font-weight: bold;*/ | ||
| 123 | padding-left: 2pt; | ||
| 124 | padding-right: 2pt; | ||
| 125 | color: @white; | ||
| 126 | background: @unfocused; | ||
| 127 | } | ||
| 128 | |||
| 129 | /* Inactive (on unfocused output) */ | ||
| 130 | #workspaces button.visible { | ||
| 131 | color: @white; | ||
| 132 | background: @inactive; | ||
| 133 | } | ||
| 134 | |||
| 135 | /* Active (on focused output) */ | ||
| 136 | #workspaces button.focused { | ||
| 137 | color: @black; | ||
| 138 | background: @focused; | ||
| 139 | } | ||
| 140 | |||
| 141 | /* Contains an urgent window */ | ||
| 142 | #workspaces button.urgent { | ||
| 143 | color: @black; | ||
| 144 | background: @warning; | ||
| 145 | } | ||
| 146 | |||
| 147 | /* Style when cursor is on the button */ | ||
| 148 | #workspaces button:hover { | ||
| 149 | background: @black; | ||
| 150 | color: @white; | ||
| 151 | } | ||
| 152 | |||
| 153 | #window { | ||
| 154 | margin-right: 35pt; | ||
| 155 | margin-left: 35pt; | ||
| 156 | } | ||
| 157 | |||
| 158 | #pulseaudio { | ||
| 159 | background: @sound; | ||
| 160 | color: @black; | ||
| 161 | } | ||
| 162 | |||
| 163 | #network { | ||
| 164 | background: @network; | ||
| 165 | color: @white; | ||
| 166 | } | ||
| 167 | |||
| 168 | #memory { | ||
| 169 | background: @memory; | ||
| 170 | color: @black; | ||
| 171 | } | ||
| 172 | |||
| 173 | #cpu { | ||
| 174 | background: @cpu; | ||
| 175 | color: @white; | ||
| 176 | } | ||
| 177 | |||
| 178 | #temperature { | ||
| 179 | background: @temp; | ||
| 180 | color: @black; | ||
| 181 | } | ||
| 182 | |||
| 183 | #language { | ||
| 184 | background: @layout; | ||
| 185 | color: @black; | ||
| 186 | } | ||
| 187 | |||
| 188 | #battery { | ||
| 189 | background: @battery; | ||
| 190 | color: @white; | ||
| 191 | } | ||
| 192 | |||
| 193 | #tray { | ||
| 194 | background: @tray; | ||
| 195 | } | ||
| 196 | |||
| 197 | #clock.date { | ||
| 198 | background: @date; | ||
| 199 | color: @black; | ||
| 200 | } | ||
| 201 | |||
| 202 | #clock.time { | ||
| 203 | background: @time; | ||
| 204 | color: @white; | ||
| 205 | } | ||
diff --git a/files/.emacs.d/.gitignore b/files/.emacs.d/.gitignore deleted file mode 100644 index 10f87ad..0000000 --- a/files/.emacs.d/.gitignore +++ /dev/null | |||
| @@ -1,5 +0,0 @@ | |||
| 1 | * | ||
| 2 | !init.el | ||
| 3 | !jd | ||
| 4 | !jd/* | ||
| 5 | !.gitignore \ No newline at end of file | ||
diff --git a/files/.emacs.d/init.el b/files/.emacs.d/init.el deleted file mode 100755 index 090592f..0000000 --- a/files/.emacs.d/init.el +++ /dev/null | |||
| @@ -1,146 +0,0 @@ | |||
| 1 | ;;; Dotfiles --- Jakub Dlugosz emacs config | ||
| 2 | ;;; Commentary: | ||
| 3 | |||
| 4 | ;;; Code: | ||
| 5 | |||
| 6 | ;; Minimize garbage collection during startup | ||
| 7 | (setq gc-cons-threshold most-positive-fixnum) | ||
| 8 | |||
| 9 | ;; Lower threshold back to 8 MiB (default is 800kB) | ||
| 10 | (add-hook 'emacs-startup-hook | ||
| 11 | (lambda () | ||
| 12 | (setq gc-cons-threshold (expt 2 23)))) | ||
| 13 | |||
| 14 | (defvar jd/manifest-list | ||
| 15 | nil | ||
| 16 | "List that contain Emacs packages for GNU/Guix." ) | ||
| 17 | |||
| 18 | (defvar jd/exwm-p | ||
| 19 | (or (not (null (getenv "JD_EXWM"))) | ||
| 20 | (and (seq-contains command-line-args "exwm" #'string-match) | ||
| 21 | t)) | ||
| 22 | "Is non-nil when Emacs is run as a window manager.") | ||
| 23 | |||
| 24 | (defvar jd/guix-p | ||
| 25 | (and (eq system-type 'gnu/linux) | ||
| 26 | (file-exists-p "/etc/os-release") | ||
| 27 | (with-temp-buffer | ||
| 28 | (insert-file-contents "/etc/os-release") | ||
| 29 | (search-forward "ID=guix" nil t)) | ||
| 30 | t) | ||
| 31 | "Is non-nil when Emacs packages are installed by GNU/Guix package manager.") | ||
| 32 | |||
| 33 | (defun jd/add-package-to-manifest (guix-package-name) | ||
| 34 | "Add GUIX-PACKAGE-NAME to jd/manifest-list." | ||
| 35 | (unless (member guix-package-name jd/manifest-list) | ||
| 36 | (setq jd/manifest-list | ||
| 37 | (cons guix-package-name jd/manifest-list)))) | ||
| 38 | |||
| 39 | (add-to-list 'load-path (concat user-emacs-directory "/jd")) | ||
| 40 | |||
| 41 | (defun jd/display-startup-time () | ||
| 42 | (message "Emacs loaded in %s with %d garbage collections." | ||
| 43 | (format "%.2f seconds" | ||
| 44 | (float-time | ||
| 45 | (time-subtract after-init-time before-init-time))) | ||
| 46 | gcs-done)) | ||
| 47 | |||
| 48 | (defun jd-emacs/startup () | ||
| 49 | "This procedure will run after Emacs startup." | ||
| 50 | (electric-pair-mode 1) | ||
| 51 | (global-company-mode 1) | ||
| 52 | (jd/display-startup-time)) | ||
| 53 | |||
| 54 | (add-hook 'emacs-startup-hook #'jd-emacs/startup) | ||
| 55 | |||
| 56 | (setq user-full-name "Jakub Dlugosz" | ||
| 57 | user-mail-address "jdlugosz963@gmail.com") | ||
| 58 | |||
| 59 | (setq backup-directory-alist '(("." . "~/.cache/emacs/backup")) | ||
| 60 | backup-by-copying t | ||
| 61 | version-control t | ||
| 62 | delete-old-versions t | ||
| 63 | kept-new-versions 20 | ||
| 64 | kept-old-versions 5 | ||
| 65 | custom-file (concat user-emacs-directory | ||
| 66 | "custom.el")) | ||
| 67 | |||
| 68 | ;; (setq user-emacs-directory "~/.cache/emacs") | ||
| 69 | |||
| 70 | (require 'package) | ||
| 71 | (setq package-archives '(("melpa" . "https://melpa.org/packages/") | ||
| 72 | ("org" . "https://orgmode.org/elpa/") | ||
| 73 | ("gnu-devel" . "https://elpa.gnu.org/devel/") | ||
| 74 | ("elpa" . "https://elpa.gnu.org/packages/"))) | ||
| 75 | (package-initialize) | ||
| 76 | |||
| 77 | (unless package-archive-contents | ||
| 78 | (package-refresh-contents)) | ||
| 79 | |||
| 80 | (jd/add-package-to-manifest "emacs-use-package") | ||
| 81 | (unless jd/guix-p | ||
| 82 | (unless (package-installed-p 'use-package) | ||
| 83 | (package-install 'use-package))) | ||
| 84 | |||
| 85 | (require 'use-package) | ||
| 86 | |||
| 87 | (setq use-package-always-ensure (not jd/guix-p)) | ||
| 88 | |||
| 89 | (defun jd/generate-manifest () | ||
| 90 | "Generate GNU/Guix Emacs manifest to temp-buffer." | ||
| 91 | (interactive) | ||
| 92 | (with-output-to-temp-buffer "*guix-emacs-packages-manifest.scm*" | ||
| 93 | (princ (concat ";; This file is auto-generated by Emacs " | ||
| 94 | "function: jd/manifest-generate-to-file \n")) | ||
| 95 | (princ `(specifications->manifest | ||
| 96 | '(,@(mapcar #'(lambda (guix-package-name) | ||
| 97 | (concat "\"" | ||
| 98 | guix-package-name | ||
| 99 | "\"\n")) | ||
| 100 | jd/manifest-list)))))) | ||
| 101 | |||
| 102 | (defun use-package-normalize/:guix-package (name keyword args) | ||
| 103 | (use-package-as-one (symbol-name keyword) args | ||
| 104 | #'(lambda (_label arg) | ||
| 105 | (cond | ||
| 106 | ((consp arg) arg) | ||
| 107 | ((stringp arg) (list arg)) | ||
| 108 | ((use-package-non-nil-symbolp arg) (symbol-name arg)) | ||
| 109 | (t | ||
| 110 | (use-package-error | ||
| 111 | ":pin wants an archive name (a string)")))))) | ||
| 112 | |||
| 113 | (defun use-package-handler/:guix-package | ||
| 114 | (name _keyword args rest state) | ||
| 115 | (let ((body (use-package-process-keywords name rest state))) | ||
| 116 | (use-package-concat | ||
| 117 | (when (consp args) | ||
| 118 | (mapcar #'(lambda (arg) | ||
| 119 | `(jd/add-package-to-manifest ,arg)) | ||
| 120 | args)) | ||
| 121 | body))) | ||
| 122 | |||
| 123 | (add-to-list 'use-package-keywords ':guix-package) | ||
| 124 | |||
| 125 | (jd/add-package-to-manifest "emacs") | ||
| 126 | (jd/add-package-to-manifest "emacs-guix") | ||
| 127 | |||
| 128 | (require 'jd-keys) | ||
| 129 | (require 'jd-ui) | ||
| 130 | (require 'jd-org) | ||
| 131 | (require 'jd-dev) | ||
| 132 | (require 'jd-apps) | ||
| 133 | (require 'jd-custom) | ||
| 134 | (require 'jd-mu4e) | ||
| 135 | (require 'jd-misc) | ||
| 136 | (require 'jd-sway) | ||
| 137 | |||
| 138 | (when jd/exwm-p | ||
| 139 | (require 'jd-exwm)) | ||
| 140 | |||
| 141 | ;; (setq gc-cons-threshold (* 2 1000 1000)) | ||
| 142 | |||
| 143 | ;;; init.el ends here | ||
| 144 | (put 'upcase-region 'disabled nil) | ||
| 145 | (put 'downcase-region 'disabled nil) | ||
| 146 | (put 'set-goal-column 'disabled nil) | ||
diff --git a/files/.emacs.d/jd/jd-apps.el b/files/.emacs.d/jd/jd-apps.el deleted file mode 100755 index f06430b..0000000 --- a/files/.emacs.d/jd/jd-apps.el +++ /dev/null | |||
| @@ -1,49 +0,0 @@ | |||
| 1 | ;;; Dotfiles --- Jakub Dlugosz emacs config | ||
| 2 | ;;; Commentary: | ||
| 3 | |||
| 4 | ;;; Code: | ||
| 5 | |||
| 6 | (use-package vterm | ||
| 7 | :guix-package "emacs-vterm" | ||
| 8 | :init | ||
| 9 | (add-to-list 'project-switch-commands '(project-vterm "Vterm") t) | ||
| 10 | (add-to-list 'project-kill-buffer-conditions | ||
| 11 | '(major-mode . vterm-mode)) | ||
| 12 | (setq vterm-copy-exclude-prompt t) | ||
| 13 | :config | ||
| 14 | (setq vterm-buffer-name "vterm") | ||
| 15 | ;; (evil-set-initial-state 'vterm-mode 'emacs) | ||
| 16 | (setq vterm-tramp-shells | ||
| 17 | (append '(("ssh" "/bin/bash")) vterm-tramp-shells)) | ||
| 18 | |||
| 19 | ) | ||
| 20 | |||
| 21 | (use-package all-the-icons-dired | ||
| 22 | :guix-package "emacs-all-the-icons-dired" | ||
| 23 | :hook (dired-mode . all-the-icons-dired-mode)) | ||
| 24 | |||
| 25 | (use-package dired | ||
| 26 | :ensure nil | ||
| 27 | :commands (dired dired-jump) | ||
| 28 | :custom ((dired-listing-switches "-agho --group-directories-first")) | ||
| 29 | :config | ||
| 30 | (setq dired-kill-when-opening-new-dired-buffer t)) | ||
| 31 | |||
| 32 | (use-package pdf-tools | ||
| 33 | :guix-package | ||
| 34 | "emacs-pdf-tools") | ||
| 35 | |||
| 36 | (use-package password-store | ||
| 37 | :guix-package "emacs-password-store" | ||
| 38 | :bind | ||
| 39 | ("C-c P p" . password-store-copy) | ||
| 40 | ("C-c P i" . password-store-insert) | ||
| 41 | ("C-c P g" . password-store-generate)) | ||
| 42 | |||
| 43 | (use-package shell | ||
| 44 | :bind | ||
| 45 | ("C-c C-<return>" . shell)) | ||
| 46 | |||
| 47 | (provide 'jd-apps) | ||
| 48 | |||
| 49 | ;;; jd-apps.el ends here | ||
diff --git a/files/.emacs.d/jd/jd-custom.el b/files/.emacs.d/jd/jd-custom.el deleted file mode 100755 index a634baa..0000000 --- a/files/.emacs.d/jd/jd-custom.el +++ /dev/null | |||
| @@ -1,33 +0,0 @@ | |||
| 1 | ;;; Dotfiles --- Jakub Dlugosz emacs config | ||
| 2 | ;;; Commentary: | ||
| 3 | |||
| 4 | ;;; Code: | ||
| 5 | |||
| 6 | (setq erc-nick "bobbma" | ||
| 7 | erc-user-full-name "Jakub Dlugosz" | ||
| 8 | erc-notify-list '("akuleszaa")) | ||
| 9 | |||
| 10 | (defun hipis-znc () | ||
| 11 | (interactive) | ||
| 12 | (erc :server "195.74.91.18" | ||
| 13 | :port "6697")) | ||
| 14 | |||
| 15 | |||
| 16 | ;; Repair load paths when tramp try to connect to guix instances | ||
| 17 | (require 'tramp) | ||
| 18 | |||
| 19 | (connection-local-set-profile-variables | ||
| 20 | 'guix-system | ||
| 21 | '((tramp-remote-path . (tramp-own-remote-path)))) | ||
| 22 | |||
| 23 | (connection-local-set-profiles | ||
| 24 | '(:application tramp :protocol "sudo" :machine "localhost") | ||
| 25 | 'guix-system) | ||
| 26 | |||
| 27 | (connection-local-set-profiles | ||
| 28 | '(:application tramp :protocol "ssh" :machine "jdlugosz.com") | ||
| 29 | 'guix-system) | ||
| 30 | |||
| 31 | (provide 'jd-custom) | ||
| 32 | |||
| 33 | ;;; jd-custom.el ends here | ||
diff --git a/files/.emacs.d/jd/jd-dev.el b/files/.emacs.d/jd/jd-dev.el deleted file mode 100755 index 12cd21b..0000000 --- a/files/.emacs.d/jd/jd-dev.el +++ /dev/null | |||
| @@ -1,177 +0,0 @@ | |||
| 1 | ;;; Dotfiles --- Jakub Dlugosz emacs config | ||
| 2 | ;;; Commentary: | ||
| 3 | |||
| 4 | ;;; Code: | ||
| 5 | |||
| 6 | ;; (setq c-default-style "linux" | ||
| 7 | ;; c-basic-offset 8 | ||
| 8 | ;; gdb-many-windows t) | ||
| 9 | |||
| 10 | (use-package lsp-mode | ||
| 11 | :guix-package "emacs-lsp-mode" | ||
| 12 | :diminish t | ||
| 13 | :commands (lsp lsp-deferred) | ||
| 14 | :init | ||
| 15 | (setq lsp-headerline-breadcrumb-enable nil) | ||
| 16 | (setq lsp-diagnostics-provider :none) | ||
| 17 | (setq lsp-modeline-diagnostics-enable nil) | ||
| 18 | (setq lsp-keymap-prefix "C-c l") | ||
| 19 | :config | ||
| 20 | (lsp-enable-which-key-integration t) | ||
| 21 | |||
| 22 | (global-set-key (kbd "C-x ]") | ||
| 23 | #'(lambda () | ||
| 24 | (interactive) | ||
| 25 | (forward-page) | ||
| 26 | (recenter-top-bottom 0))) | ||
| 27 | |||
| 28 | (global-set-key (kbd "C-x [") | ||
| 29 | #'(lambda () | ||
| 30 | (interactive) | ||
| 31 | (backward-page) | ||
| 32 | (recenter-top-bottom 0))) | ||
| 33 | |||
| 34 | (define-key c-mode-map | ||
| 35 | (kbd "C-c C-c") | ||
| 36 | #'(lambda () | ||
| 37 | (interactive) | ||
| 38 | (compile compile-command))) | ||
| 39 | |||
| 40 | (define-key c-mode-map | ||
| 41 | (kbd "C-c M-c") | ||
| 42 | 'compile)) | ||
| 43 | |||
| 44 | (use-package lsp-ivy | ||
| 45 | :guix-package "emacs-lsp-ivy" | ||
| 46 | :after lsp) | ||
| 47 | |||
| 48 | |||
| 49 | (use-package paredit | ||
| 50 | :guix-package "emacs-paredit") | ||
| 51 | |||
| 52 | (defun jd/lisp-mode-setup () | ||
| 53 | (rainbow-delimiters-mode) | ||
| 54 | (paredit-mode)) | ||
| 55 | |||
| 56 | (add-hook 'emacs-startup-hook | ||
| 57 | (lambda () | ||
| 58 | (add-hook 'scheme-mode-hook 'jd/lisp-mode-setup) | ||
| 59 | (add-hook 'emacs-lisp-mode-hook 'jd/lisp-mode-setup) | ||
| 60 | (add-hook 'clojure-mode-hook 'jd/lisp-mode-setup) | ||
| 61 | (add-hook 'lisp-mode-hook 'jd/lisp-mode-setup))) | ||
| 62 | |||
| 63 | (use-package rainbow-delimiters | ||
| 64 | :guix-package "emacs-rainbow-delimiters") | ||
| 65 | |||
| 66 | (use-package sly | ||
| 67 | :guix-package "emacs-sly") | ||
| 68 | |||
| 69 | (use-package geiser | ||
| 70 | :guix-package "emacs-geiser") | ||
| 71 | |||
| 72 | (use-package geiser-racket | ||
| 73 | :guix-package "emacs-geiser-racket") | ||
| 74 | |||
| 75 | (use-package racket-mode | ||
| 76 | :guix-package "emacs-racket-mode") | ||
| 77 | |||
| 78 | (use-package geiser-guile | ||
| 79 | :guix-package "emacs-geiser-guile" | ||
| 80 | :config | ||
| 81 | (when jd/guix-p | ||
| 82 | (defun jd/guix-repl () | ||
| 83 | (interactive) | ||
| 84 | (let ((geiser-guile-binary '("guix" "repl")) | ||
| 85 | (geiser-guile-load-path (cons "~/dotfiles/guix" geiser-guile-load-path))) | ||
| 86 | (geiser 'guile))))) | ||
| 87 | |||
| 88 | (use-package pyvenv | ||
| 89 | :guix-package "emacs-pyvenv" | ||
| 90 | :after python-mode) | ||
| 91 | |||
| 92 | (use-package typescript-mode | ||
| 93 | :guix-package "emacs-typescript-mode" | ||
| 94 | :mode ("\\.ts\\'") | ||
| 95 | :config | ||
| 96 | (setq typescript-indent-level 2)) | ||
| 97 | |||
| 98 | (use-package cider | ||
| 99 | :guix-package "emacs-cider") | ||
| 100 | |||
| 101 | (use-package tide | ||
| 102 | :guix-package "emacs-tide" | ||
| 103 | :after (typescript-mode company web-mode)) | ||
| 104 | |||
| 105 | (use-package flycheck | ||
| 106 | :guix-package "emacs-flycheck" | ||
| 107 | :hook ((after-init . global-flycheck-mode))) | ||
| 108 | |||
| 109 | (use-package web-mode | ||
| 110 | :guix-package "emacs-web-mode" | ||
| 111 | :mode | ||
| 112 | ("\\.ejs\\'" "\\.hbs\\'" "\\.html\\'" "\\.php\\'" "\\.[jt]sx?\\'") | ||
| 113 | :config | ||
| 114 | (setq web-mode-content-types-alist '(("jsx" . "\\.[jt]sx?\\'"))) | ||
| 115 | (setq web-mode-markup-indent-offset 2) | ||
| 116 | (setq web-mode-css-indent-offset 2) | ||
| 117 | (setq web-mode-code-indent-offset 2) | ||
| 118 | (setq web-mode-script-padding 2) | ||
| 119 | (setq web-mode-block-padding 2) | ||
| 120 | (setq web-mode-style-padding 2) | ||
| 121 | (setq web-mode-enable-auto-pairing t) | ||
| 122 | (setq web-mode-enable-auto-closing t) | ||
| 123 | (setq web-mode-enable-current-element-highlight t)) | ||
| 124 | |||
| 125 | (use-package yaml-mode | ||
| 126 | :guix-package "emacs-yaml-mode") | ||
| 127 | |||
| 128 | (use-package docker | ||
| 129 | :guix-package "emacs-docker" | ||
| 130 | :bind | ||
| 131 | ("C-c D d" . docker-containers) | ||
| 132 | ("C-c D D" . docker)) | ||
| 133 | |||
| 134 | (use-package company | ||
| 135 | :guix-package "emacs-company" | ||
| 136 | :diminish t | ||
| 137 | :after lsp-mode | ||
| 138 | :hook (lsp-mode . company-mode) | ||
| 139 | :bind (:map company-active-map | ||
| 140 | ("<tab>" . company-complete-selection)) | ||
| 141 | (:map lsp-mode-map | ||
| 142 | ("<tab>" . company-indent-or-complete-common)) | ||
| 143 | :custom | ||
| 144 | (company-minimum-prefix-length 1) | ||
| 145 | (company-idle-delay 0.0) | ||
| 146 | :config | ||
| 147 | (global-company-mode)) | ||
| 148 | |||
| 149 | (use-package projectile | ||
| 150 | :guix-package "emacs-projectile" | ||
| 151 | :diminish projectile-mode | ||
| 152 | :init | ||
| 153 | (when (file-directory-p "~/Documents/code") | ||
| 154 | (setq projectile-project-search-path '("~/Documents/code/"))) | ||
| 155 | :custom ((projectile-Completion-system 'ivy)) | ||
| 156 | :config | ||
| 157 | (setq projectile-switch-project-action #'projectile-dired) | ||
| 158 | (projectile-mode)) | ||
| 159 | |||
| 160 | (use-package magit | ||
| 161 | :guix-package "emacs-magit" | ||
| 162 | :custom | ||
| 163 | (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)) | ||
| 164 | |||
| 165 | (use-package restclient | ||
| 166 | :guix-package "emacs-restclient") | ||
| 167 | |||
| 168 | (setq sql-connection-alist | ||
| 169 | '(("net47-abaks" | ||
| 170 | (sql-product 'postgres) | ||
| 171 | (sql-user "kuba") | ||
| 172 | (sql-database "net47") | ||
| 173 | (sql-server "net47.abaks.pl")))) | ||
| 174 | |||
| 175 | (provide 'jd-dev) | ||
| 176 | |||
| 177 | ;;; jd-dev.el ends here | ||
diff --git a/files/.emacs.d/jd/jd-exwm.el b/files/.emacs.d/jd/jd-exwm.el deleted file mode 100755 index 7731b01..0000000 --- a/files/.emacs.d/jd/jd-exwm.el +++ /dev/null | |||
| @@ -1,177 +0,0 @@ | |||
| 1 | ;;; Dotfiles --- Jakub Dlugosz emacs config | ||
| 2 | ;;; Commentary: | ||
| 3 | |||
| 4 | ;;; Code: | ||
| 5 | |||
| 6 | |||
| 7 | (use-package perspective | ||
| 8 | :guix-package "emacs-perspective") | ||
| 9 | |||
| 10 | (use-package exwm | ||
| 11 | :guix-package "emacs-exwm" | ||
| 12 | :config | ||
| 13 | (defun jd/exwm-update-class () | ||
| 14 | (exwm-workspace-rename-buffer exwm-class-name)) | ||
| 15 | |||
| 16 | (defun jd-exwm/run-in-background (command) | ||
| 17 | (let ((command-parts (split-string command "[ ]+"))) | ||
| 18 | (apply #'call-process `(,(car command-parts) nil 0 nil ,@(cdr command-parts))))) | ||
| 19 | |||
| 20 | (defun jd-exwm/restart-process (program-name) | ||
| 21 | (call-process "killall" nil nil nil program-name) | ||
| 22 | (jd-exwm/run-in-background program-name)) | ||
| 23 | |||
| 24 | (defun jd-exwm/exwm-init-hook () | ||
| 25 | (jd-exwm/run-in-background "nitrogen --restore") | ||
| 26 | (start-process-shell-command "xinput" nil "xinput set-prop 'ETPS/2 Elantech Touchpad' 'Synaptics Tap Action' 1 1 1 2 1") | ||
| 27 | (start-process-shell-command "syndaemon" nil "syndaemon -i 0.8 -K -R -d") | ||
| 28 | |||
| 29 | (jd-exwm/restart-process "polybar") | ||
| 30 | (jd-exwm/restart-process "nm-applet") | ||
| 31 | (jd-exwm/restart-process "redshift-gtk -l 54.37:18.6") | ||
| 32 | (jd-exwm/restart-process "blueman-applet")) | ||
| 33 | |||
| 34 | (defun jd-exwm/exwm-update-title () | ||
| 35 | (exwm-workspace-rename-buffer exwm-title)) | ||
| 36 | |||
| 37 | (defun jd-exwm/configure-window-by-class () | ||
| 38 | (interactive) | ||
| 39 | (pcase exwm-class-name | ||
| 40 | ("firefox" (exwm-workspace-move-window 2)) | ||
| 41 | ("Brave" (exwm-workspace-move-window 2)) | ||
| 42 | ("qutebrowser" (exwm-workspace-move-window 2)) | ||
| 43 | ("discord" (exwm-workspace-move-window 5)) | ||
| 44 | ("obs" (exwm-workspace-move-window 5)) | ||
| 45 | ("Virt-manager" (exwm-workspace-move-window 4)))) | ||
| 46 | |||
| 47 | (setq exwm-workspace-number 10) | ||
| 48 | |||
| 49 | ;; (add-hook 'exwm-init-hook #'jd-exwm/exwm-init-hook) | ||
| 50 | (add-hook 'exwm-update-class-hook #'jd/exwm-update-class) | ||
| 51 | (add-hook 'exwm-update-title-hook #'jd-exwm/exwm-update-title) | ||
| 52 | (add-hook 'exwm-manage-finish-hook #'jd-exwm/configure-window-by-class) | ||
| 53 | |||
| 54 | (require 'exwm-randr) | ||
| 55 | (setq exwm-randr-workspace-monitor-plist '(9 "eDP-1" 0 "eDP-1")) | ||
| 56 | (exwm-randr-enable) | ||
| 57 | |||
| 58 | (setq exwm-input-simulation-keys | ||
| 59 | '(([?\C-b] . [left]) | ||
| 60 | ([?\C-f] . [right]) | ||
| 61 | ([?\C-p] . [up]) | ||
| 62 | ([?\C-n] . [down]) | ||
| 63 | ([?\C-a] . [home]) | ||
| 64 | ([?\C-e] . [end]) | ||
| 65 | ([?\C-k] . [S-end delete]) | ||
| 66 | ([?\M-w] . [C-c]) | ||
| 67 | ([?\C-y] . [C-v]) | ||
| 68 | ([?\C-v] . [next]) | ||
| 69 | ([?\M-v] . [prior]) | ||
| 70 | )) | ||
| 71 | |||
| 72 | (setq exwm-input-prefix-keys | ||
| 73 | '(?\C-x | ||
| 74 | ?\C-u | ||
| 75 | ?\C-h | ||
| 76 | ?\M-x | ||
| 77 | ?\M-` | ||
| 78 | ?\M-& | ||
| 79 | ?\M-! | ||
| 80 | ?\C-g | ||
| 81 | ?\M-: | ||
| 82 | ?\C-\M-j | ||
| 83 | ?\C-\ )) | ||
| 84 | |||
| 85 | (define-key exwm-mode-map [?\C-q] 'exwm-input-send-next-key) | ||
| 86 | (exwm-input-set-key (kbd "s-p") 'counsel-linux-app) | ||
| 87 | |||
| 88 | (setq exwm-input-global-keys | ||
| 89 | `(([?\s-R] . exwm-reset) | ||
| 90 | |||
| 91 | |||
| 92 | ([?\s-r] . (lambda (command) | ||
| 93 | (interactive (list (read-shell-command "$ "))) | ||
| 94 | (start-process-shell-command command nil command))) | ||
| 95 | |||
| 96 | ([?\s-W] . exwm-workspace-move-window) | ||
| 97 | ([?\s-w] . exwm-workspace-switch) | ||
| 98 | |||
| 99 | ,@(mapcar (lambda (i) | ||
| 100 | `(,(kbd (format "s-%d" i)) . | ||
| 101 | (lambda () | ||
| 102 | (interactive) | ||
| 103 | (exwm-workspace-switch-create ,i)))) | ||
| 104 | (number-sequence 0 9)))) | ||
| 105 | |||
| 106 | (exwm-enable) | ||
| 107 | (require 'exwm-systemtray) | ||
| 108 | (exwm-systemtray-enable)) | ||
| 109 | |||
| 110 | (use-package desktop-environment | ||
| 111 | :guix-package "emacs-desktop-environment" | ||
| 112 | :after exwm | ||
| 113 | :custom | ||
| 114 | (desktop-environment-brightness-small-increment "2%+") | ||
| 115 | (desktop-environment-brightness-small-decrement "2%-") | ||
| 116 | (desktop-environment-brightness-normal-increment "5%+") | ||
| 117 | (desktop-environment-brightness-normal-decrement "5%-") | ||
| 118 | |||
| 119 | :config | ||
| 120 | (defun jd/dunst-show-history () | ||
| 121 | (interactive) | ||
| 122 | (start-process-shell-command "dunstctl" nil "dunstctl history-pop")) | ||
| 123 | (global-set-key (kbd "C-c N h") #'jd/dunst-show-history) | ||
| 124 | |||
| 125 | (defun jd/dunst-close () | ||
| 126 | (interactive) | ||
| 127 | (start-process-shell-command "dunstctl" nil "dunstctl close")) | ||
| 128 | (global-set-key (kbd "C-c N c") #'jd/dunst-close) | ||
| 129 | |||
| 130 | (defun jd/dunst-close-all () | ||
| 131 | (interactive) | ||
| 132 | (start-process-shell-command "dunstctl" nil "dunstctl close-all")) | ||
| 133 | (global-set-key (kbd "C-c N a") #'jd/dunst-close-all) | ||
| 134 | |||
| 135 | (desktop-environment-mode)) | ||
| 136 | |||
| 137 | ;; (set-frame-parameter (selected-frame) 'alpha '(90 . 90)) | ||
| 138 | ;; (add-to-list 'default-frame-alist `(alpha . (90 . 90))) | ||
| 139 | ;; (set-frame-parameter (selected-frame) 'fullscreen 'maximized) | ||
| 140 | ;; (add-to-list 'default-frame-alist '(fullscreen . maximized)) | ||
| 141 | |||
| 142 | (defun jd-exwm/get-color (ATTRIBUTE) | ||
| 143 | (face-attribute 'default ATTRIBUTE)) | ||
| 144 | |||
| 145 | (defun theme-to-xresources () | ||
| 146 | (interactive) | ||
| 147 | (require 'term) | ||
| 148 | (with-temp-buffer | ||
| 149 | (insert "! Generated by theme-to-xresources\n") | ||
| 150 | (dolist (spec | ||
| 151 | '(("emacs.background" :background "E6") | ||
| 152 | ("emacs.foreground" :foreground ""))) | ||
| 153 | (let ((color (jd-exwm/get-color (cadr spec)))) | ||
| 154 | (insert (format "%s: #%s%s\n" | ||
| 155 | (car spec) | ||
| 156 | (caddr spec) | ||
| 157 | (string-remove-prefix "#" color)))) | ||
| 158 | jd | ||
| 159 | (write-region (point-min) (point-max) "~/.Xresources"))) | ||
| 160 | (call-process "xrdb" nil nil nil "-merge" (expand-file-name "~/.Xresources"))) | ||
| 161 | |||
| 162 | (defun jd/theme-sync () | ||
| 163 | (interactive) | ||
| 164 | (theme-to-xresources) | ||
| 165 | (setq org-confirm-babel-evaluate nil) | ||
| 166 | (org-babel-tangle-file "~/dotfiles/Desktop.org") | ||
| 167 | (setq org-confirm-babel-evaluate 't) | ||
| 168 | (call-process "killall" nil nil nil "dunst") ;; TODO: prevent clear notification history | ||
| 169 | (jd-exwm/restart-process "polybar")) | ||
| 170 | |||
| 171 | ;; (add-hook 'jd/load-theme-hook #'jd/theme-sync) | ||
| 172 | ;; (add-hook 'exwm-init-hook #'jd/theme-sync) | ||
| 173 | |||
| 174 | (provide 'jd-exwm) | ||
| 175 | |||
| 176 | ;;; jd-exwm.el ends here | ||
| 177 | |||
diff --git a/files/.emacs.d/jd/jd-gym.el b/files/.emacs.d/jd/jd-gym.el deleted file mode 100755 index 581bf65..0000000 --- a/files/.emacs.d/jd/jd-gym.el +++ /dev/null | |||
| @@ -1,120 +0,0 @@ | |||
| 1 | ;;; jd-gym.el --- Gym workout manager. | ||
| 2 | ;;; Commentary: | ||
| 3 | ;; It will be a gym workout manager in the future. | ||
| 4 | ;;; code: | ||
| 5 | |||
| 6 | (require 'emacsql-sqlite) | ||
| 7 | |||
| 8 | (defconst jd-gym/db--tables-schema | ||
| 9 | '((workout-plans | ||
| 10 | [(id integer :primary-key :autoincrement) | ||
| 11 | (name text)]) | ||
| 12 | |||
| 13 | (workouts | ||
| 14 | [(id integer :primary-key :autoincrement) | ||
| 15 | (workout-plan-id integer :not-null) | ||
| 16 | (day integer :not-null) | ||
| 17 | (month integer :not-null) | ||
| 18 | (year integer :not-null)] | ||
| 19 | (:foreign-key [workout-plan-id] :references workout-plans [id] :on-delete :cascade)) | ||
| 20 | |||
| 21 | (muscle-part | ||
| 22 | [(id integer :primary-key :autoincrement) | ||
| 23 | (name text :not-null)]) | ||
| 24 | |||
| 25 | (exercises | ||
| 26 | [(id integer :primary-key :autoincrement) | ||
| 27 | (name text :not-null) | ||
| 28 | (muscle-part-id integer :not-null)] | ||
| 29 | (:foreign-key [muscle-part-id] :references muscle-part [id] :on-delete :cascade)) | ||
| 30 | |||
| 31 | (workout-plan-exercise-map | ||
| 32 | [(id integer :primary-key :autoincrement) | ||
| 33 | (week-day integer :not-null) | ||
| 34 | (workout-plan-id integer :not-null) | ||
| 35 | (exercise-id integer :not-null)] | ||
| 36 | (:foreign-key [workout-plan-id] :references workout-plans [id] :on-delete :cascade) | ||
| 37 | (:foreign-key [exercise-id] :references exercises [id] :on-delete :cascade)) | ||
| 38 | |||
| 39 | (workout-sets | ||
| 40 | [(id integer :primary-key :autoincrement) | ||
| 41 | (reps integer :not-null) | ||
| 42 | (weight integer :not-null) | ||
| 43 | (workout-plan-exercise-map-id integer :not-null) | ||
| 44 | (comment text)] | ||
| 45 | (:foreign-key [workout-plan-exercise-map-id] :references workout-plan-exercise-map [id] :on-delete :cascade)))) | ||
| 46 | |||
| 47 | (defconst jd-gym/db--test-data | ||
| 48 | '((workout-plans | ||
| 49 | ([nil "Push pull"])) | ||
| 50 | (workouts | ||
| 51 | ([nil 1 3 1 2023])) | ||
| 52 | (muscle-part | ||
| 53 | ([nil "glutes"] | ||
| 54 | [nil "chest"])) | ||
| 55 | (exercises | ||
| 56 | ([nil "Bench press" 2] | ||
| 57 | [nil "RDL" 1])) | ||
| 58 | (workout-plan-exercise-map | ||
| 59 | ([nil 0 1 1] ; Monday, Push pull, Bench press | ||
| 60 | [nil 1 1 2] ; Tuesday, Push pull, RDL | ||
| 61 | [nil 3 1 1] ; Thursday, Push pull, Bench press | ||
| 62 | [nil 4 1 2] ; Friday, Push pull, RDL | ||
| 63 | )) | ||
| 64 | (workout-sets | ||
| 65 | ([nil 7 70 1 "New PR!"] | ||
| 66 | [nil 8 110 2 "It was hard!"])))) | ||
| 67 | |||
| 68 | (defun jd-gym/db--test-data-insert () | ||
| 69 | "Insert test data to jd-gym database." | ||
| 70 | (mapc (lambda (table) | ||
| 71 | (let ((table-name (car table)) | ||
| 72 | (table-data (cdr table))) | ||
| 73 | (emacsql jd-gym/db--conn [:insert :into $i1 | ||
| 74 | :values $v2] | ||
| 75 | table-name table-data))) | ||
| 76 | jd-gym/db--test-data)) | ||
| 77 | |||
| 78 | (defvar jd-gym/db-path "~/Documents/Gym/gym.sqlite" | ||
| 79 | "Path can be relative or absolute.") | ||
| 80 | |||
| 81 | (defvar jd-gym/db--conn nil | ||
| 82 | "Store connection to jd-gym database.") | ||
| 83 | |||
| 84 | (defun jd-gym/db--conn-p () | ||
| 85 | "Check if jd-gym is connected to db." | ||
| 86 | (and (emacsql-sqlite-connection-p jd-gym/db--conn) | ||
| 87 | (emacsql-live-p jd-gym/db--conn))) | ||
| 88 | |||
| 89 | (defun jd-gym/db--connect () | ||
| 90 | "Connect to db if there is no connection yet." | ||
| 91 | (unless (jd-gym/db--conn-p) | ||
| 92 | (setq jd-gym/db--conn (emacsql-sqlite jd-gym/db-path)))) | ||
| 93 | |||
| 94 | (defun jd-gym/db--close () | ||
| 95 | "Close db connection." | ||
| 96 | (when (jd-gym/db--conn-p) | ||
| 97 | (emacsql-close jd-gym/db--conn))) | ||
| 98 | |||
| 99 | (defun jd-gym/db--init () | ||
| 100 | "Initialize database structure." | ||
| 101 | (when (jd-gym/db--conn-p) | ||
| 102 | (emacsql jd-gym/db--conn [:pragma (= foreign_keys ON)]) | ||
| 103 | (emacsql jd-gym/db--conn "PRAGMA foreign_keys=ON") | ||
| 104 | (mapc (lambda (table) | ||
| 105 | (let ((table-name (car table)) | ||
| 106 | (table-schema (cdr table))) | ||
| 107 | (emacsql jd-gym/db--conn [:create-table $i1 $S2] table-name table-schema))) | ||
| 108 | jd-gym/db--tables-schema))) | ||
| 109 | |||
| 110 | (defun jd-gym/db () | ||
| 111 | "Entrypoint to jd-gym db." | ||
| 112 | (unless (file-exists-p jd-gym/db-path) | ||
| 113 | (jd-gym/db--close) | ||
| 114 | (jd-gym/db--connect) ; Restart connection | ||
| 115 | (jd-gym/db--init))) | ||
| 116 | |||
| 117 | |||
| 118 | (provide 'jd-gym) | ||
| 119 | |||
| 120 | ;;; jd-gym.el ends here | ||
diff --git a/files/.emacs.d/jd/jd-keys.el b/files/.emacs.d/jd/jd-keys.el deleted file mode 100755 index 8c1c4cb..0000000 --- a/files/.emacs.d/jd/jd-keys.el +++ /dev/null | |||
| @@ -1,49 +0,0 @@ | |||
| 1 | ;;; Dotfiles --- Jakub Dlugosz emacs config | ||
| 2 | ;;; Commentary: | ||
| 3 | ;; Custom keysets used in my emacs | ||
| 4 | ;;; Code: | ||
| 5 | |||
| 6 | (use-package multiple-cursors | ||
| 7 | :guix-package "emacs-multiple-cursors" | ||
| 8 | :config | ||
| 9 | (global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines) | ||
| 10 | (global-set-key (kbd "C->") 'mc/mark-next-like-this) | ||
| 11 | (global-set-key (kbd "C-<") 'mc/mark-previous-like-this) | ||
| 12 | (global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this)) | ||
| 13 | |||
| 14 | (use-package hydra | ||
| 15 | :guix-package "emacs-hydra" | ||
| 16 | ;; :defer t | ||
| 17 | :config | ||
| 18 | (defun jd/text-scale-increase () | ||
| 19 | (interactive) | ||
| 20 | (let ((old-face-attribute (face-attribute 'default :height))) | ||
| 21 | (set-face-attribute 'default nil :height (+ old-face-attribute 10)))) | ||
| 22 | |||
| 23 | (defun jd/text-scale-decrease () | ||
| 24 | (interactive) | ||
| 25 | (let ((old-face-attribute (face-attribute 'default :height))) | ||
| 26 | (set-face-attribute 'default nil :height (- old-face-attribute 10)))) | ||
| 27 | |||
| 28 | (defhydra hydra-text-scale-global (:timeout 4) | ||
| 29 | "scale text" | ||
| 30 | ("j" jd/text-scale-increase "in") | ||
| 31 | ("k" jd/text-scale-decrease "out") | ||
| 32 | ("q" nil "finished" :exit t)) ;; TODO not working | ||
| 33 | |||
| 34 | (defhydra hydra-text-scale (:timeout 4) | ||
| 35 | "scale text" | ||
| 36 | ("j" text-scale-increase "in") | ||
| 37 | ("k" text-scale-decrease "out") | ||
| 38 | ("q" nil "finished" :exit t))) | ||
| 39 | |||
| 40 | (use-package undo-tree | ||
| 41 | :guix-package "emacs-undo-tree" | ||
| 42 | :diminish | ||
| 43 | :config | ||
| 44 | (setq undo-tree-auto-save-history nil) | ||
| 45 | (global-undo-tree-mode 1)) | ||
| 46 | |||
| 47 | (provide 'jd-keys) | ||
| 48 | |||
| 49 | ;;; jd-keys.el ends here | ||
diff --git a/files/.emacs.d/jd/jd-misc.el b/files/.emacs.d/jd/jd-misc.el deleted file mode 100644 index 2b7d1bd..0000000 --- a/files/.emacs.d/jd/jd-misc.el +++ /dev/null | |||
| @@ -1,34 +0,0 @@ | |||
| 1 | ;;; Dotfiles --- Jakub Dlugosz emacs config | ||
| 2 | ;;; Commentary: | ||
| 3 | |||
| 4 | ;;; Code: | ||
| 5 | |||
| 6 | (defun jd/generete-qr-from-clipboard () | ||
| 7 | (interactive) | ||
| 8 | (let ((clipboard-value (x-get-clipboard)) | ||
| 9 | (clipboard-file-path "/tmp/clipboard_value.txt") | ||
| 10 | (clipboard-out-image "/tmp/qr.png")) | ||
| 11 | (with-temp-file clipboard-file-path | ||
| 12 | (insert clipboard-value)) | ||
| 13 | (shell-command (concat | ||
| 14 | "qrencode -o " | ||
| 15 | clipboard-out-image | ||
| 16 | " < " | ||
| 17 | clipboard-file-path)) | ||
| 18 | (find-file clipboard-out-image))) | ||
| 19 | |||
| 20 | (defun jd/dired-open-file-in-kill-ring () | ||
| 21 | (interactive) | ||
| 22 | (let* ((last-killed (car kill-ring)) | ||
| 23 | (exists-p (file-exists-p last-killed)) | ||
| 24 | (dir-p (file-directory-p last-killed))) | ||
| 25 | (cond | ||
| 26 | ((not exists-p) (message "File doesn't exists!")) | ||
| 27 | (dir-p (dired last-killed)) | ||
| 28 | ((not dir-p) (find-file last-killed))))) | ||
| 29 | |||
| 30 | (global-set-key (kbd "C-c O") #'jd/dired-open-file-in-kill-ring) | ||
| 31 | |||
| 32 | (provide 'jd-misc) | ||
| 33 | |||
| 34 | ;;; jd-misc.el ends here | ||
diff --git a/files/.emacs.d/jd/jd-mu4e.el b/files/.emacs.d/jd/jd-mu4e.el deleted file mode 100755 index b388201..0000000 --- a/files/.emacs.d/jd/jd-mu4e.el +++ /dev/null | |||
| @@ -1,84 +0,0 @@ | |||
| 1 | ;;; Dotfiles --- Jakub Dlugosz emacs config | ||
| 2 | ;;; Commentary: | ||
| 3 | |||
| 4 | ;;; Code: | ||
| 5 | |||
| 6 | (use-package htmlize | ||
| 7 | :guix-package "emacs-htmlize") | ||
| 8 | |||
| 9 | (use-package mu4e | ||
| 10 | :guix-package ("mu" "isync") | ||
| 11 | :defer 10 | ||
| 12 | :ensure nil | ||
| 13 | :bind | ||
| 14 | ("C-c M" . mu4e) | ||
| 15 | :config | ||
| 16 | ;a (require 'org-mu4e) | ||
| 17 | |||
| 18 | (unless jd/guix-p | ||
| 19 | (add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu4e") | ||
| 20 | (setq mu4e-mu-binary "/usr/local/bin/mu")) | ||
| 21 | |||
| 22 | (setq mu4e-update-interval (* 10 60)) | ||
| 23 | (setq mu4e-get-mail-command "mbsync -a") | ||
| 24 | (setq mu4e-maildir "~/Mail") | ||
| 25 | |||
| 26 | (setq mu4e-completing-read-function #'ivy-completing-read) | ||
| 27 | |||
| 28 | (setq mu4e-change-filenames-when-moving t) | ||
| 29 | |||
| 30 | (setq mu4e-contexts | ||
| 31 | `(,(make-mu4e-context | ||
| 32 | :name "Abaks" | ||
| 33 | :match-func (lambda (msg) (when msg | ||
| 34 | (string-prefix-p "/abaks" (mu4e-message-field msg :maildir)))) | ||
| 35 | :vars '( | ||
| 36 | (user-full-name . "Jakub Dlugosz") | ||
| 37 | (user-mail-address . "jakub@abaks.pl") | ||
| 38 | (mu4e-sent-folder . "/abaks/Sent Items") | ||
| 39 | (mu4e-trash-folder . "/abaks/Trash") | ||
| 40 | (mu4e-drafts-folder . "/abaks/Drafts") | ||
| 41 | (mu4e-refile-folder . "/abaks/Archive") | ||
| 42 | (mu4e-sent-messages-behavior . sent) | ||
| 43 | (smtpmail-local-domain . "pl") | ||
| 44 | (smtpmail-smtp-server . "smtp.abaks.pl") | ||
| 45 | (smtpmail-smtp-user . "jakub@abaks.pl"))) | ||
| 46 | ,(make-mu4e-context | ||
| 47 | :name "Gmail" | ||
| 48 | :match-func (lambda (msg) (when msg | ||
| 49 | (string-prefix-p "/gmail" (mu4e-message-field msg :maildir)))) | ||
| 50 | :vars '( | ||
| 51 | (user-full-name . "Jakub Dlugosz") | ||
| 52 | (user-mail-address . "jdlugosz963@gmail.com") | ||
| 53 | (mu4e-sent-folder . "/gmail/\[Gmail\]/Wys\&AUI-ane") | ||
| 54 | (mu4e-trash-folder . "/gmail/\[Gmail\]/Kosz") | ||
| 55 | (mu4e-drafts-folder . "/gmail/\[Gmail\]/Wersje\ robocze") | ||
| 56 | (mu4e-refile-folder . "/gmail/Archive") | ||
| 57 | (smtpmail-local-domain . "com") | ||
| 58 | (smtpmail-smtp-server . "smtp.gmail.com") | ||
| 59 | (smtpmail-smtp-user . "jdlugosz963@gmail.com") | ||
| 60 | (mu4e-sent-messages-behavior . sent))))) | ||
| 61 | |||
| 62 | (setq mail-user-agent 'mu4e-user-agent | ||
| 63 | mail-host-address nil | ||
| 64 | message-send-mail-function 'smtpmail-send-it | ||
| 65 | smtpmail-smtp-service 465 | ||
| 66 | smtpmail-stream-type 'ssl | ||
| 67 | smtpmail-servers-requiring-authorization ".*") | ||
| 68 | |||
| 69 | (setq mu4e-compose-signature (concat | ||
| 70 | "Pozdrawiam,\n" | ||
| 71 | "Jakub Długosz")) | ||
| 72 | |||
| 73 | (mu4e t) | ||
| 74 | (mu4e-modeline-mode nil)) | ||
| 75 | |||
| 76 | (use-package mu4e-alert | ||
| 77 | :guix-package "emacs-mu4e-alert" | ||
| 78 | :defer 20 | ||
| 79 | :config | ||
| 80 | (mu4e-alert-set-default-style 'libnotify) | ||
| 81 | (mu4e-alert-enable-mode-line-display) | ||
| 82 | (mu4e-alert-enable-notifications)) | ||
| 83 | |||
| 84 | (provide 'jd-mu4e) | ||
diff --git a/files/.emacs.d/jd/jd-org.el b/files/.emacs.d/jd/jd-org.el deleted file mode 100755 index 554533d..0000000 --- a/files/.emacs.d/jd/jd-org.el +++ /dev/null | |||
| @@ -1,222 +0,0 @@ | |||
| 1 | ;;; Dotfiles --- Jakub Dlugosz emacs config | ||
| 2 | ;;; Commentary: | ||
| 3 | |||
| 4 | ;;; Code: | ||
| 5 | |||
| 6 | (defvar jd/org-home "~/Notes") | ||
| 7 | (defvar jd/org-roam-home (concat jd/org-home "/roam")) | ||
| 8 | (defvar jd/org-sync (concat jd/org-home "/sync")) | ||
| 9 | (defvar jd/org-roam-daily-home (concat jd/org-roam-home "/daily")) | ||
| 10 | |||
| 11 | (defun jd/org-mode-init () | ||
| 12 | (org-indent-mode) | ||
| 13 | (variable-pitch-mode 1) | ||
| 14 | (visual-line-mode 1)) | ||
| 15 | |||
| 16 | (defun jd-emacs/org-insert-date (&optional date) | ||
| 17 | (org-insert-time-stamp (org-read-date nil t (or date "+0d")))) | ||
| 18 | |||
| 19 | (use-package org-pomodoro | ||
| 20 | :guix-package "emacs-org-pomodoro") | ||
| 21 | |||
| 22 | (use-package org-caldav | ||
| 23 | :guix-package "emacs-org-caldav" | ||
| 24 | :config | ||
| 25 | (setq org-caldav-url "http://caldav.jdlugosz.com/radicale/admin/" | ||
| 26 | org-caldav-files nil | ||
| 27 | org-icalendar-timezone "Europe/Warsaw") | ||
| 28 | |||
| 29 | (defun jd/caldav-calendar-sync () | ||
| 30 | (interactive) | ||
| 31 | (let ((org-caldav-calendar-id "0c54a523-c7aa-2f26-2c18-a12b69c2bc86") | ||
| 32 | (org-caldav-inbox (concat jd/org-sync | ||
| 33 | "/calendar.org"))) | ||
| 34 | (org-caldav-sync))) | ||
| 35 | |||
| 36 | (defun jd/caldav-journal-sync () | ||
| 37 | (interactive) | ||
| 38 | (let ((org-caldav-calendar-id "3cc70419-a787-5f84-28c6-96f15fc606d9") | ||
| 39 | (org-caldav-inbox (concat jd/org-sync | ||
| 40 | "/journal.org"))) | ||
| 41 | (org-caldav-sync))) | ||
| 42 | |||
| 43 | (defun jd/caldav-tasks-sync () | ||
| 44 | (interactive) | ||
| 45 | (let ((org-caldav-calendar-id "372cbbb3-14f7-fc15-9f7b-cae04114920c") | ||
| 46 | (org-caldav-inbox (concat jd/org-sync | ||
| 47 | "/tasks.org"))) | ||
| 48 | (org-caldav-sync)))) | ||
| 49 | |||
| 50 | (use-package org | ||
| 51 | :guix-package "emacs-org" | ||
| 52 | :pin org | ||
| 53 | :commands (org-capture org-agenda) | ||
| 54 | :hook (org-mode . jd/org-mode-init) | ||
| 55 | :bind | ||
| 56 | ("C-c o c" . #'org-capture) | ||
| 57 | ("C-c o p" . #'org-mobile-pull) | ||
| 58 | ("C-c o P" . #'org-mobile-push) | ||
| 59 | ("C-c o a" . #'org-agenda) | ||
| 60 | :config | ||
| 61 | (defun jd/org-mode-file (file-name) (concat org-directory "/" file-name ".org")) | ||
| 62 | (setq org-directory (file-truename "~/Notes") | ||
| 63 | org-mobile-directory (concat org-directory "/Mobile") | ||
| 64 | org-mobile-inbox-for-pull (concat org-directory "/flagged.org") ;; TODO: ?? | ||
| 65 | |||
| 66 | org-refile-targets '((org-agenda-files :maxlevel . 1)) | ||
| 67 | org-outline-path-complete-in-steps nil | ||
| 68 | org-refile-use-outline-path t | ||
| 69 | org-agenda-files '("Personal.org" "Work.org" "Inbox.org" "Collage.org") | ||
| 70 | org-ellipsis " ▾" | ||
| 71 | org-agenda-start-with-log-mode t | ||
| 72 | org-log-done 'time | ||
| 73 | org-log-into-drawer t | ||
| 74 | org-return-follows-link t | ||
| 75 | org-latex-listings 'minted | ||
| 76 | org-latex-packages-alist '(("" "minted")) | ||
| 77 | |||
| 78 | org-agenda-custom-commands | ||
| 79 | `(("p" "Planning" | ||
| 80 | ((tags-todo "+planning" | ||
| 81 | ((org-agenda-overriding-header "Planning Tasks"))) | ||
| 82 | (tags-todo "-{.*}" | ||
| 83 | ((org-agenda-overriding-header "Untagged Tasks"))) | ||
| 84 | (todo "*" ((org-agenda-files '(,(jd/org-mode-file "Inbox"))) | ||
| 85 | (org-agenda-overriding-header "Unprocessed Inbox Items"))))) | ||
| 86 | |||
| 87 | ("d" "Daily Agenda" | ||
| 88 | ((agenda "" ((org-agenda-span 'day) | ||
| 89 | (org-deadline-warning-days 7))) | ||
| 90 | (tags-todo "+PRIORITY=\"A\"" | ||
| 91 | ((org-agenda-overriding-header "High Priority Tasks"))))) | ||
| 92 | |||
| 93 | ("c" "Collage Agenda" | ||
| 94 | ((agenda "" ((org-agenda-span 'week) | ||
| 95 | (org-deadline-warning-days 7)))) | ||
| 96 | ((org-agenda-filter-preset '("+collage")))) | ||
| 97 | |||
| 98 | ("w" "Weekly Review" | ||
| 99 | ((agenda "" | ||
| 100 | ((org-agenda-overriding-header "Completed Tasks") | ||
| 101 | (org-agenda-skip-function '(org-agenda-skip-entry-if 'nottodo 'done)) | ||
| 102 | (org-agenda-span 'week))) | ||
| 103 | |||
| 104 | (agenda "" | ||
| 105 | ((org-agenda-overriding-header "Unfinished Scheduled Tasks") | ||
| 106 | (org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done)) | ||
| 107 | (org-agenda-span 'week)))))) | ||
| 108 | |||
| 109 | org-capture-templates | ||
| 110 | `(("i" "Capture to Inbox" entry (file+olp ,(jd/org-mode-file "Inbox") "Inbox") | ||
| 111 | "* TODO %?\n %t\n" :empty-lines 1) | ||
| 112 | ("c" "Capture to Collage" entry (file+olp ,(jd/org-mode-file "Collage") "Collage") | ||
| 113 | "* TODO %? :collage:%^g \n %t\n" :empty-lines 1)) | ||
| 114 | |||
| 115 | org-latex-pdf-process | ||
| 116 | '("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f" | ||
| 117 | "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f")) | ||
| 118 | |||
| 119 | (require 'org-tempo) | ||
| 120 | |||
| 121 | (defun jd/org-font-setup () | ||
| 122 | (dolist (face '((org-level-1 . 1.3) | ||
| 123 | (org-level-2 . 1.2) | ||
| 124 | (org-level-3 . 1.1) | ||
| 125 | (org-level-4 . 1.0) | ||
| 126 | (org-level-5 . 1.0) | ||
| 127 | (org-level-6 . 1.0) | ||
| 128 | (org-level-7 . 1.0) | ||
| 129 | (org-level-8 . 1.0))) | ||
| 130 | (set-face-attribute (car face) nil :font "Terminus" :weight 'Bold :height (cdr face))) | ||
| 131 | |||
| 132 | ;; Ensure that anything that should be fixed-pitch in Org files appears that way | ||
| 133 | (set-face-attribute 'org-block nil :font "Terminus" :inherit 'fixed-pitch :height 100) | ||
| 134 | (set-face-attribute 'org-table nil :inherit 'fixed-pitch) | ||
| 135 | (set-face-attribute 'org-formula nil :inherit 'fixed-pitch) | ||
| 136 | (set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch)) | ||
| 137 | (set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch)) | ||
| 138 | (set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch)) | ||
| 139 | (set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch)) | ||
| 140 | (set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch) | ||
| 141 | (set-face-attribute 'line-number nil :inherit 'fixed-pitch) | ||
| 142 | (set-face-attribute 'line-number-current-line nil :inherit 'fixed-pitch)) | ||
| 143 | |||
| 144 | (with-eval-after-load 'org (jd/org-font-setup)) | ||
| 145 | |||
| 146 | (defun jd-emacs/org-timer-stop () | ||
| 147 | (start-process-shell-command "notify-send" nil "notify-send Zakonczono odliczanie")) | ||
| 148 | |||
| 149 | (add-hook 'org-timer-stop-hook #'jd-emacs/org-timer-stop) | ||
| 150 | |||
| 151 | (defun jd/org-tempo-setup () | ||
| 152 | (dolist (template '(("s" . "src") | ||
| 153 | ("sql" . "src sql") | ||
| 154 | ("sh" . "src sh") | ||
| 155 | ("el" . "src emacs-lisp") | ||
| 156 | ("li" . "src lisp") | ||
| 157 | ("sc" . "src scheme") | ||
| 158 | ("ts" . "src typescript") | ||
| 159 | ("py" . "src python") | ||
| 160 | ("go" . "src go") | ||
| 161 | ("yaml" . "src yaml"))) | ||
| 162 | (add-to-list 'org-structure-template-alist template))) | ||
| 163 | |||
| 164 | (with-eval-after-load 'org-tempo (jd/org-tempo-setup)) | ||
| 165 | |||
| 166 | (org-babel-do-load-languages | ||
| 167 | 'org-babel-load-languages | ||
| 168 | '((emacs-lisp . t) | ||
| 169 | (python . t) | ||
| 170 | (shell . t)))) | ||
| 171 | |||
| 172 | (use-package org-superstar | ||
| 173 | :guix-package "emacs-org-superstar" | ||
| 174 | :hook (org-mode . org-superstar-mode) | ||
| 175 | :init | ||
| 176 | (setq org-superstar-special-todo-items t) | ||
| 177 | (setq org-superstar-remove-leading-stars t) | ||
| 178 | (setq org-superstar-headline-bullets-list '("◉" "○" "●" "○" "●" "○" "●"))) | ||
| 179 | |||
| 180 | (use-package org-roam | ||
| 181 | :guix-package "emacs-org-roam" | ||
| 182 | :custom | ||
| 183 | (org-roam-directory (file-truename jd/org-roam-home)) | ||
| 184 | :bind (("C-c n l" . org-roam-buffer-toggle) | ||
| 185 | ("C-c n f" . org-roam-node-find) | ||
| 186 | ("C-c n g" . org-roam-graph) | ||
| 187 | ("C-c n i" . org-roam-node-insert) | ||
| 188 | ("C-c n c" . org-roam-capture) | ||
| 189 | ;; Dailies | ||
| 190 | ("C-c n j" . org-roam-dailies-capture-today)) | ||
| 191 | :bind-keymap | ||
| 192 | ("C-c n d" . org-roam-dailies-map) | ||
| 193 | :config | ||
| 194 | (require 'org-roam-dailies) | ||
| 195 | |||
| 196 | (defun jd/org-roam-filter-by-tag (tag-name) | ||
| 197 | (lambda (node) | ||
| 198 | (member tag-name (org-roam-node-tags node)))) | ||
| 199 | |||
| 200 | (defun jd/org-roam-list-notes-by-tag (tag-name) | ||
| 201 | (mapcar #'org-roam-node-file | ||
| 202 | (seq-filter | ||
| 203 | (jd/org-roam-filter-by-tag tag-name) | ||
| 204 | (org-roam-node-list)))) | ||
| 205 | |||
| 206 | (setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag))) | ||
| 207 | (setq org-roam-capture-templates | ||
| 208 | '(("d" "default" plain "%?" | ||
| 209 | :target (file+head+olp | ||
| 210 | "%<%Y%m%d%H%M%S>-${slug}.org" | ||
| 211 | "#+title: ${title}\n\n" | ||
| 212 | ("${title}")) | ||
| 213 | :unnarrowed t))) | ||
| 214 | |||
| 215 | (org-roam-db-autosync-mode)) | ||
| 216 | |||
| 217 | (use-package ox-pandoc | ||
| 218 | :guix-package "emacs-ox-pandoc") | ||
| 219 | |||
| 220 | (provide 'jd-org) | ||
| 221 | |||
| 222 | ;;; jd-org.el ends here | ||
diff --git a/files/.emacs.d/jd/jd-sway.el b/files/.emacs.d/jd/jd-sway.el deleted file mode 100644 index cdfb667..0000000 --- a/files/.emacs.d/jd/jd-sway.el +++ /dev/null | |||
| @@ -1,18 +0,0 @@ | |||
| 1 | ;;; Dotfiles --- Jakub Dlugosz emacs config | ||
| 2 | ;;; Commentary: | ||
| 3 | |||
| 4 | ;;; Code: | ||
| 5 | |||
| 6 | (defun use-package-normalize/:diminish (name keyword args) | ||
| 7 | (use-package-as-one (symbol-name keyword) args | ||
| 8 | (apply-partially #'use-package-normalize-diminish name) t)) | ||
| 9 | |||
| 10 | (use-package shackle | ||
| 11 | :guix-package "emacs-shackle") | ||
| 12 | |||
| 13 | (use-package sway | ||
| 14 | :guix-package "emacs-sway") | ||
| 15 | |||
| 16 | (provide 'jd-sway) | ||
| 17 | |||
| 18 | ;;; jd-sway.el ends here | ||
diff --git a/files/.emacs.d/jd/jd-ui.el b/files/.emacs.d/jd/jd-ui.el deleted file mode 100755 index 4e388c9..0000000 --- a/files/.emacs.d/jd/jd-ui.el +++ /dev/null | |||
| @@ -1,104 +0,0 @@ | |||
| 1 | ;; Dotfiles --- Jakub Dlugosz emacs config | ||
| 2 | ;;; Commentary: | ||
| 3 | |||
| 4 | ;;; Code: | ||
| 5 | |||
| 6 | (setq inhibit-startup-message t) | ||
| 7 | (setq visible-bell t) | ||
| 8 | (scroll-bar-mode -1) | ||
| 9 | (tool-bar-mode -1) | ||
| 10 | (tooltip-mode -1) | ||
| 11 | (menu-bar-mode -1) | ||
| 12 | (set-fringe-mode 10) | ||
| 13 | |||
| 14 | ;; (set-frame-parameter (selected-frame) 'alpha '(92 . 92)) | ||
| 15 | ;; (add-to-list 'default-frame-alist '(alpha . (92 . 92))) | ||
| 16 | |||
| 17 | (let ((height (if (string-equal (system-name) | ||
| 18 | "berserker") | ||
| 19 | 175 | ||
| 20 | 125))) | ||
| 21 | (custom-set-faces | ||
| 22 | `(default ((t (:inherit nil :height ,height :family "Terminus")))) | ||
| 23 | `(line-number ((t (:inherit nil :height ,height :family "Terminus")))) | ||
| 24 | `(line-number-current-line ((t (:inherit nil :height ,height :family "Terminus")))))) | ||
| 25 | |||
| 26 | (add-hook 'prog-mode-hook 'menu-bar--display-line-numbers-mode-relative) | ||
| 27 | |||
| 28 | (global-set-key (kbd "<escape>") 'keyboard-escape-quit) | ||
| 29 | |||
| 30 | (global-prettify-symbols-mode 1) | ||
| 31 | |||
| 32 | (defalias 'yes-or-no-p 'y-or-n-p) | ||
| 33 | |||
| 34 | (require 'diminish) | ||
| 35 | |||
| 36 | (use-package doom-modeline | ||
| 37 | :guix-package "emacs-doom-modeline" | ||
| 38 | :config | ||
| 39 | (doom-modeline-mode)) | ||
| 40 | |||
| 41 | (use-package solarized-theme | ||
| 42 | :guix-package "emacs-solarized-theme" | ||
| 43 | :config | ||
| 44 | (load-theme 'solarized-dark-high-contrast t)) | ||
| 45 | |||
| 46 | |||
| 47 | (use-package diminish | ||
| 48 | :guix-package "emacs-diminish") | ||
| 49 | |||
| 50 | (use-package hl-todo | ||
| 51 | :guix-package "emacs-hl-todo" | ||
| 52 | :init | ||
| 53 | (setq hl-todo-keyword-faces | ||
| 54 | '(("TODO" . "#FF0000") | ||
| 55 | ("FIXME" . "#FF0000") | ||
| 56 | ("DEBUG" . "#A020F0"))) | ||
| 57 | :config | ||
| 58 | (global-hl-todo-mode 1)) | ||
| 59 | |||
| 60 | (defvar jd/load-theme-hook nil) | ||
| 61 | (defun jd/load-theme () | ||
| 62 | (interactive) | ||
| 63 | (counsel-load-theme) | ||
| 64 | (run-hooks 'jd/load-theme-hook)) | ||
| 65 | |||
| 66 | (use-package ivy | ||
| 67 | :guix-package "emacs-ivy" | ||
| 68 | :diminish | ||
| 69 | :bind | ||
| 70 | (("C-s" . swiper)) | ||
| 71 | :config | ||
| 72 | (ivy-mode 1)) | ||
| 73 | |||
| 74 | (use-package counsel | ||
| 75 | :guix-package "emacs-counsel" | ||
| 76 | :diminish t | ||
| 77 | :config | ||
| 78 | (counsel-mode 1)) | ||
| 79 | |||
| 80 | (use-package which-key | ||
| 81 | :guix-package "emacs-which-key" | ||
| 82 | :diminish | ||
| 83 | :config | ||
| 84 | (which-key-mode) | ||
| 85 | (setq which-key-idle-delay 0.3)) | ||
| 86 | |||
| 87 | (use-package all-the-icons | ||
| 88 | :guix-package "emacs-all-the-icons") | ||
| 89 | |||
| 90 | (use-package beacon | ||
| 91 | :guix-package "emacs-beacon" | ||
| 92 | :config | ||
| 93 | (beacon-mode 1)) | ||
| 94 | |||
| 95 | (setq display-time-string-forms | ||
| 96 | '(" " 24-hours ":" minutes " ")) | ||
| 97 | |||
| 98 | (when jd/exwm-p | ||
| 99 | (display-battery-mode) | ||
| 100 | (display-time-mode)) | ||
| 101 | |||
| 102 | (provide 'jd-ui) | ||
| 103 | |||
| 104 | ;;; jd-ui.el ends here | ||
diff --git a/files/.gitignore b/files/.gitignore deleted file mode 100644 index f3fe7e5..0000000 --- a/files/.gitignore +++ /dev/null | |||
| @@ -1,7 +0,0 @@ | |||
| 1 | __pycache__/ | ||
| 2 | elpa/ | ||
| 3 | auto-save-list/ | ||
| 4 | eln-cache/ | ||
| 5 | url/ | ||
| 6 | **/#* | ||
| 7 | **/*~ | ||
diff --git a/files/.guile b/files/.guile deleted file mode 100644 index 2076bd2..0000000 --- a/files/.guile +++ /dev/null | |||
| @@ -1,2 +0,0 @@ | |||
| 1 | (use-modules (ice-9 readline)) | ||
| 2 | (activate-readline) \ No newline at end of file | ||
diff --git a/files/.mbsyncrc b/files/.mbsyncrc deleted file mode 100644 index 20a8692..0000000 --- a/files/.mbsyncrc +++ /dev/null | |||
| @@ -1,47 +0,0 @@ | |||
| 1 | IMAPStore abaks-remote | ||
| 2 | Host imap.abaks.pl | ||
| 3 | Port 143 | ||
| 4 | SSLType None | ||
| 5 | AuthMechs LOGIN | ||
| 6 | User jakub@abaks.pl | ||
| 7 | PassCmd "pass email/jakub@abaks.pl" | ||
| 8 | CertificateFile /etc/ssl/certs/ca-certificates.crt | ||
| 9 | |||
| 10 | MaildirStore abaks-local | ||
| 11 | Path ~/Mail/abaks/ | ||
| 12 | Inbox ~/Mail/abaks/INBOX | ||
| 13 | Subfolders Verbatim | ||
| 14 | |||
| 15 | Channel abaks | ||
| 16 | Far :abaks-remote: | ||
| 17 | Near :abaks-local: | ||
| 18 | Patterns INBOX * !Sync* | ||
| 19 | Expunge None | ||
| 20 | CopyArrivalDate yes | ||
| 21 | Sync All | ||
| 22 | Create Near | ||
| 23 | SyncState * | ||
| 24 | |||
| 25 | IMAPStore gmail-remote | ||
| 26 | Host imap.gmail.com | ||
| 27 | Port 993 | ||
| 28 | SSLType IMAPS | ||
| 29 | AuthMechs LOGIN | ||
| 30 | User jdlugosz963@gmail.com | ||
| 31 | PassCmd "pass email/jdlugosz963@gmail.com" | ||
| 32 | CertificateFile /etc/ssl/certs/ca-certificates.crt | ||
| 33 | |||
| 34 | MaildirStore gmail-local | ||
| 35 | Path ~/Mail/gmail/ | ||
| 36 | Inbox ~/Mail/gmail/INBOX | ||
| 37 | Subfolders Verbatim | ||
| 38 | |||
| 39 | Channel gmail | ||
| 40 | Far :gmail-remote: | ||
| 41 | Near :gmail-local: | ||
| 42 | Patterns INBOX * !Sync* | ||
| 43 | Expunge None | ||
| 44 | CopyArrivalDate yes | ||
| 45 | Sync All | ||
| 46 | Create Near | ||
| 47 | SyncState * | ||
diff --git a/files/.nix-channels b/files/.nix-channels deleted file mode 100644 index 46c3d72..0000000 --- a/files/.nix-channels +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | https://nixos.org/channels/nixos-23.11 nixos | ||
diff --git a/files/.stumpwm.d/.gitignore b/files/.stumpwm.d/.gitignore deleted file mode 100644 index 4c478cf..0000000 --- a/files/.stumpwm.d/.gitignore +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | stumpwm.log* \ No newline at end of file | ||
diff --git a/files/.stumpwm.d/init.lisp b/files/.stumpwm.d/init.lisp deleted file mode 100755 index 0970718..0000000 --- a/files/.stumpwm.d/init.lisp +++ /dev/null | |||
| @@ -1,360 +0,0 @@ | |||
| 1 | (in-package :stumpwm) | ||
| 2 | |||
| 3 | |||
| 4 | (setq *message-window-gravity* :center) | ||
| 5 | (setq *message-window-input-gravity* :center) | ||
| 6 | (setq *input-window-gravity* :center) | ||
| 7 | (setq *window-border-style* :none) | ||
| 8 | |||
| 9 | (set-bg-color :gray10) | ||
| 10 | (setq *mode-line-background-color* "Gray10") | ||
| 11 | |||
| 12 | (set-prefix-key (kbd "C-z")) | ||
| 13 | (setq *float-window-modifier* :super) | ||
| 14 | |||
| 15 | (define-key *top-map* (kbd "s-w") "gselect") | ||
| 16 | |||
| 17 | (defcommand lock () () | ||
| 18 | (run-shell-command "slock")) | ||
| 19 | |||
| 20 | (define-key *top-map* (kbd "s-l") "lock") | ||
| 21 | |||
| 22 | (defcommand server-start () () | ||
| 23 | (slynk:create-server :port 4005) | ||
| 24 | (message "server started at port: \"4005\"!")) | ||
| 25 | |||
| 26 | |||
| 27 | (define-key *root-map* (kbd "C-q") "send-raw-key") | ||
| 28 | |||
| 29 | (define-key *root-map* (kbd "M") "mode-line") | ||
| 30 | (define-key *root-map* (kbd "C-n") "fnext") | ||
| 31 | (define-key *root-map* (kbd "C-p") "fprev") | ||
| 32 | (define-key *root-map* (kbd "b") "windowlist") | ||
| 33 | |||
| 34 | |||
| 35 | |||
| 36 | ;; (run-commands "gnew Code" | ||
| 37 | ;; "gnew Web" | ||
| 38 | ;; "gnew Music" | ||
| 39 | ;; "gnew Game" | ||
| 40 | ;; "gnew School") | ||
| 41 | |||
| 42 | (define-remapped-keys | ||
| 43 | '(("(Firefox|Chrome|qutebrowser)" | ||
| 44 | ("C-n" . "Down") | ||
| 45 | ("C-p" . "Up") | ||
| 46 | ("C-f" . "Right") | ||
| 47 | ("C-b" . "Left") | ||
| 48 | ("C-v" . "Next") | ||
| 49 | ("M-v" . "Prior") | ||
| 50 | ("M-w" . "C-c") | ||
| 51 | ("C-w" . "C-x") | ||
| 52 | ("C-y" . "C-v") | ||
| 53 | ("M-<" . "Home") | ||
| 54 | ("M->" . "End") | ||
| 55 | ("C-a" . "Home") | ||
| 56 | ("C-e" . "End") | ||
| 57 | ("C-M-b" . "M-Left") | ||
| 58 | ("C-M-f" . "M-Right") | ||
| 59 | ("C-g" . "ESC") | ||
| 60 | ("C-k" . ("C-S-End" "C-x"))))) | ||
| 61 | |||
| 62 | (define-frame-preference "chat" | ||
| 63 | (0 NIL T :create T :class "quassel") | ||
| 64 | (1 NIL T :create T :class "discord") | ||
| 65 | (2 NIL T :create T :class "nheko")) | ||
| 66 | |||
| 67 | (define-frame-preference "vm" | ||
| 68 | (0 NIL T :create T :class ".virt-manager-real")) | ||
| 69 | |||
| 70 | (run-shell-command "~/.fehbg") | ||
| 71 | |||
| 72 | (require :pamixer) | ||
| 73 | (require :pass) | ||
| 74 | |||
| 75 | (require :screenshot) | ||
| 76 | (pamixer:volume-down 10) | ||
| 77 | |||
| 78 | (defun get-brightness () | ||
| 79 | (let ((c (parse-integer (string-trim | ||
| 80 | (string #\newline) | ||
| 81 | (run-shell-command "brightnessctl g" t)))) | ||
| 82 | (m (parse-integer (string-trim | ||
| 83 | (string #\newline) | ||
| 84 | (run-shell-command "brightnessctl m" t))))) | ||
| 85 | (format nil "~3,1f%" (* (/ c m) 100)))) | ||
| 86 | |||
| 87 | (defun set-brightness (x) | ||
| 88 | (run-shell-command (concat "brightnessctl s " x)) | ||
| 89 | (message (concat "Brightness: " (get-brightness)))) | ||
| 90 | |||
| 91 | (defcommand my-volume-down () () | ||
| 92 | (pamixer:volume-down 5) | ||
| 93 | (message (format nil "Volume: ~s%" (pamixer:get-volume)))) | ||
| 94 | |||
| 95 | (defcommand my-volume-up () () | ||
| 96 | (pamixer:volume-up 5) | ||
| 97 | (message (format nil "Volume: ~s%" (pamixer:get-volume)))) | ||
| 98 | |||
| 99 | (defcommand my-toggle-mute () () | ||
| 100 | (pamixer:toggle-mute) | ||
| 101 | (if (pamixer:get-mute) | ||
| 102 | (message "Mute: ^2ON") | ||
| 103 | (message "Mute: ^1OFF"))) | ||
| 104 | |||
| 105 | (defcommand my-brightness-up () () | ||
| 106 | (set-brightness "+5%")) | ||
| 107 | |||
| 108 | (defcommand my-brightness-down () () | ||
| 109 | (set-brightness "5%-")) | ||
| 110 | |||
| 111 | (defcommand my-brightness-one () () | ||
| 112 | (set-brightness "1")) | ||
| 113 | |||
| 114 | |||
| 115 | (define-key *top-map* (kbd "XF86AudioMute") "my-toggle-mute") | ||
| 116 | (define-key *top-map* (kbd "XF86AudioRaiseVolume") "my-volume-up") | ||
| 117 | (define-key *top-map* (kbd "XF86AudioLowerVolume") "my-volume-down") | ||
| 118 | |||
| 119 | (define-key *top-map* (kbd "XF86MonBrightnessUp") "my-brightness-up") | ||
| 120 | (define-key *top-map* (kbd "XF86MonBrightnessDown") "my-brightness-down") | ||
| 121 | |||
| 122 | (defun my-screenshoot-command-wrapper (screenshot-command ss-name) | ||
| 123 | (apply screenshot-command (list (concat | ||
| 124 | "~/Pictures/Screenshots/" | ||
| 125 | (string-trim | ||
| 126 | (string #\newline) | ||
| 127 | (run-shell-command "date +%Y-%M-%d-%T" t)) | ||
| 128 | "-" (or ss-name "untitled") | ||
| 129 | ".png")))) | ||
| 130 | |||
| 131 | |||
| 132 | (defcommand my-screenshot-area (ss-name) | ||
| 133 | ((:string "Screenshot name: ")) | ||
| 134 | (my-screenshoot-command-wrapper #'screenshot:screenshot-area ss-name)) | ||
| 135 | |||
| 136 | (defcommand my-screenshot-window (ss-name) | ||
| 137 | ((:string "Screenshot name: ")) | ||
| 138 | (my-screenshoot-command-wrapper #'screenshot:screenshot-window ss-name)) | ||
| 139 | |||
| 140 | (defcommand my-screenshot (ss-name) | ||
| 141 | ((:string "Screenshot name: ")) | ||
| 142 | (my-screenshoot-command-wrapper #'screenshot:screenshot ss-name)) | ||
| 143 | |||
| 144 | (defvar *misc-keymap* | ||
| 145 | (let ((m (make-sparse-keymap))) | ||
| 146 | (define-key m (kbd "0") "my-toggle-mute") | ||
| 147 | (define-key m (kbd "+") "my-volume-up") | ||
| 148 | (define-key m (kbd "=") "my-volume-up") | ||
| 149 | (define-key m (kbd "-") "my-volume-down") | ||
| 150 | |||
| 151 | (define-key m (kbd "p") "pass-copy-menu") | ||
| 152 | (define-key m (kbd "C-p") "pass-copy-menu") | ||
| 153 | (define-key m (kbd "g") "pass-generate") | ||
| 154 | (define-key m (kbd "C-g") "pass-generate") | ||
| 155 | |||
| 156 | (define-key m (kbd "C-a") "my-screenshot-area") | ||
| 157 | (define-key m (kbd "a") "my-screenshot-area") | ||
| 158 | (define-key m (kbd "C-w") "my-screenshot-window") | ||
| 159 | (define-key m (kbd "w") "my-screenshot-window") | ||
| 160 | (define-key m (kbd "C-s") "my-screenshot") | ||
| 161 | (define-key m (kbd "s") "my-screenshot") | ||
| 162 | |||
| 163 | m)) | ||
| 164 | |||
| 165 | |||
| 166 | |||
| 167 | |||
| 168 | (define-key *root-map* (kbd "C-m") '*misc-keymap*) | ||
| 169 | |||
| 170 | ;; | ||
| 171 | ;; ;;; MODE-LINE | ||
| 172 | (require :cpu) | ||
| 173 | (require :mem) | ||
| 174 | (require :net) | ||
| 175 | |||
| 176 | (require :stumptray) | ||
| 177 | (stumptray:add-mode-line-hooks) | ||
| 178 | |||
| 179 | (defun update-stumptray-position (&rest args) | ||
| 180 | (setf (symbol-value (find-symbol "*TRAY-HEAD-SELECTION-FN*" :stumptray)) | ||
| 181 | (if (>= (list-length (stumpwm:screen-heads (stumpwm:current-screen))) 2) | ||
| 182 | #'second | ||
| 183 | #'first))) | ||
| 184 | |||
| 185 | (stumpwm:add-hook stumpwm:*new-head-hook* 'update-stumptray-position) | ||
| 186 | (update-stumptray-position) | ||
| 187 | |||
| 188 | (defun get-battery-status () | ||
| 189 | (let* ((state (string-trim | ||
| 190 | (string #\newline) | ||
| 191 | (run-shell-command | ||
| 192 | (concat "upower -i /org/freedesktop/UPower/devices/battery_BAT0 " | ||
| 193 | "| grep state: " | ||
| 194 | "| awk '{print $2}'") | ||
| 195 | t))) | ||
| 196 | (perc (string-trim | ||
| 197 | (string #\newline) | ||
| 198 | (run-shell-command (concat | ||
| 199 | "upower -i /org/freedesktop/UPower/devices/battery_BAT0 " | ||
| 200 | "| grep perc " | ||
| 201 | "| awk '{print $2}'") | ||
| 202 | t))) | ||
| 203 | (perc-num (parse-integer (aref (nth-value 1 (cl-ppcre:scan-to-strings "^(.*)\%$" perc)) 0)))) | ||
| 204 | (format | ||
| 205 | nil | ||
| 206 | (concat | ||
| 207 | "BAT: " | ||
| 208 | (cond | ||
| 209 | ((and (equal state "discharging") | ||
| 210 | (<= perc-num 20)) | ||
| 211 | "^1[-~a]^]") | ||
| 212 | ((equal state "discharging") "[-~a]") | ||
| 213 | ((equal state "charging") "[+~a]") | ||
| 214 | ((equal state "fully-charged") "[~a]") | ||
| 215 | (t (concat state " [~a]")))) | ||
| 216 | perc))) | ||
| 217 | |||
| 218 | |||
| 219 | |||
| 220 | (setq *screen-mode-line-format* (list "[^B%n^b] %W ^> %C | %M | %l | " | ||
| 221 | '(:eval (get-battery-status)) | ||
| 222 | " " ;; empty space for stumptray icons | ||
| 223 | )) | ||
| 224 | |||
| 225 | (require :yason) ;; json parser | ||
| 226 | (require :drakma) ;; http client | ||
| 227 | |||
| 228 | |||
| 229 | (defcommand kto-hakuje-p () () | ||
| 230 | (let* ((response (yason:parse | ||
| 231 | (flexi-streams:octets-to-string | ||
| 232 | (drakma:http-request "https://whois.at.hsp.sh/api/now")))) | ||
| 233 | (users (gethash "users" response)) | ||
| 234 | (unknown-devices (gethash "unknown_devices" response))) | ||
| 235 | (message (cond | ||
| 236 | ((and (= (list-length users) 0) | ||
| 237 | (= unknown-devices 0)) | ||
| 238 | "Spejs jest pusty!") | ||
| 239 | ((and (= (list-length users) 0) | ||
| 240 | (> unknown-devices 0)) | ||
| 241 | (format nil "W spejsie jest nieznanych ~a urzadzen." unknown-devices)) | ||
| 242 | ((and (> (list-length users) 0) | ||
| 243 | (= unknown-devices 0)) | ||
| 244 | (format nil "W spejsie jest ~a." users)) | ||
| 245 | ((and (> (list-length users) 0) | ||
| 246 | (> unknown-devices 0)) | ||
| 247 | (format nil "W spejsie jest ~a oraz ~a nieznane urzadzenia." users unknown-devices)))))) | ||
| 248 | |||
| 249 | |||
| 250 | (define-key *misc-keymap* (kbd "h") "kto-hakuje-p") | ||
| 251 | (define-key *misc-keymap* (kbd "C-h") "kto-hakuje-p") | ||
| 252 | |||
| 253 | |||
| 254 | (defun emacs-server-p () | ||
| 255 | (let ((status-code (caddr | ||
| 256 | (multiple-value-list | ||
| 257 | (uiop:run-program "ls /run/user/$(id -u)/emacs/server" | ||
| 258 | :ignore-error-status T))))) | ||
| 259 | (= status-code 0))) | ||
| 260 | |||
| 261 | (stumpwm:defcommand emacs-start-server (&optional (show-message T) (wait-for-start NIL)) () | ||
| 262 | (let ((mess (if (not (emacs-server-p)) | ||
| 263 | (progn (stumpwm:run-shell-command "emacs --daemon" wait-for-start) | ||
| 264 | "Emacs server is starting....") | ||
| 265 | "Emacs server is running already!"))) | ||
| 266 | (when show-message (message mess)))) | ||
| 267 | |||
| 268 | (stumpwm:defcommand emacs-stop-server (&optional (show-message T)) () | ||
| 269 | (let ((mess (if (emacs-server-p) | ||
| 270 | (progn (stumpwm:run-shell-command "emacsclient -e \"(server-force-delete)\"") | ||
| 271 | "Emacs server gone away :(....") | ||
| 272 | "Emacs server wasn't alive!"))) | ||
| 273 | (when show-message (message mess)))) | ||
| 274 | |||
| 275 | |||
| 276 | (stumpwm:defcommand emacs-restart-server (&optional (show-message T)) () | ||
| 277 | (emacs-stop-server NIL) | ||
| 278 | (emacs-start-server show-message)) | ||
| 279 | |||
| 280 | (defun postwalk (fun tree) | ||
| 281 | (if (consp tree) | ||
| 282 | (loop :for a :in tree | ||
| 283 | :if (consp a) | ||
| 284 | :collect (postwalk fun a) | ||
| 285 | :else | ||
| 286 | :collect (funcall fun a)) | ||
| 287 | (funcall fun tree))) | ||
| 288 | |||
| 289 | (defmacro eval-emacs-sexp (sexp | ||
| 290 | &key (create-new-frame NIL)) | ||
| 291 | `(stumpwm:run-shell-command | ||
| 292 | (format nil "emacsclient~{ ~A~} '~A'" | ||
| 293 | (list ,(if create-new-frame "-c" "") | ||
| 294 | "-e") | ||
| 295 | (postwalk (lambda (x) | ||
| 296 | (cond | ||
| 297 | ((stringp x) (concat "\"" x "\"")) | ||
| 298 | ((symbolp x) (string-downcase (string x))) | ||
| 299 | (T x))) | ||
| 300 | ,sexp)) | ||
| 301 | ,(not create-new-frame))) | ||
| 302 | |||
| 303 | |||
| 304 | (defmacro defcommand-from-emacs (name | ||
| 305 | (&rest args) | ||
| 306 | (&rest interactive-args) | ||
| 307 | (&key (create-new-frame T) (output-wrapper NIL)) | ||
| 308 | &body body) | ||
| 309 | `(stumpwm:defcommand ,name ,args ,interactive-args | ||
| 310 | (when (not (emacs-server-p)) | ||
| 311 | (emacs-start-server NIL T)) | ||
| 312 | |||
| 313 | ,(let ((x `(eval-emacs-sexp (progn ,@body) | ||
| 314 | :create-new-frame ,create-new-frame))) | ||
| 315 | (cond | ||
| 316 | ((and create-new-frame output-wrapper) | ||
| 317 | (error "Cannot wrap the output, becaouse create-new-frame is T.")) | ||
| 318 | (output-wrapper `(funcall ,output-wrapper ,x)) | ||
| 319 | (T `(funcall (lambda (x) (progn x nil)) ,x)))))) | ||
| 320 | |||
| 321 | |||
| 322 | (defcommand-from-emacs emacs-client () () () | ||
| 323 | nil) | ||
| 324 | |||
| 325 | (defcommand-from-emacs emacs-calc () () () | ||
| 326 | '(full-calc)) | ||
| 327 | |||
| 328 | (defcommand-from-emacs emacs-org-agenda () () () | ||
| 329 | '(org-agenda-list)) | ||
| 330 | |||
| 331 | (defcommand-from-emacs emacs-mu4e () () () | ||
| 332 | '(mu4e)) | ||
| 333 | |||
| 334 | (defcommand-from-emacs emacs-shell () () () | ||
| 335 | '(shell)) | ||
| 336 | |||
| 337 | (defcommand-from-emacs emacs-eshell () () () | ||
| 338 | '(eshell)) | ||
| 339 | |||
| 340 | (defvar *emacs-keymap* | ||
| 341 | (let ((e (make-sparse-keymap))) | ||
| 342 | (define-key e (kbd "a") "emacs-org-agenda") | ||
| 343 | (define-key e (kbd "C-a") "emacs-org-agenda") | ||
| 344 | (define-key e (kbd "c") "emacs-calc") | ||
| 345 | (define-key e (kbd "C-c") "emacs-calc") | ||
| 346 | (define-key e (kbd "m") "emacs-mu4e") | ||
| 347 | (define-key e (kbd "C-m") "emacs-mu4e") | ||
| 348 | |||
| 349 | e)) | ||
| 350 | |||
| 351 | |||
| 352 | |||
| 353 | |||
| 354 | (define-key *root-map* (kbd "C-e") '*emacs-keymap*) | ||
| 355 | (define-key *root-map* (kbd "e") "emacs-client") | ||
| 356 | (define-key *root-map* (kbd "c") "emacs-shell") | ||
| 357 | (define-key *root-map* (kbd "C") "emacs-eshell") | ||
| 358 | |||
| 359 | |||
| 360 | (emacs-start-server nil) | ||
diff --git a/guix/jd/desktops/base.scm b/guix/jd/desktops/base.scm deleted file mode 100644 index 748e11d..0000000 --- a/guix/jd/desktops/base.scm +++ /dev/null | |||
| @@ -1,249 +0,0 @@ | |||
| 1 | (define-module (jd desktops base) | ||
| 2 | #:use-module (jd home services polkit) | ||
| 3 | #:use-module (jd home services desktop) | ||
| 4 | #:use-module (jd home services emacs) | ||
| 5 | #:use-module (jd services polkit) | ||
| 6 | |||
| 7 | #:use-module (gnu) | ||
| 8 | #:use-module (gnu home) | ||
| 9 | #:use-module (gnu home services) | ||
| 10 | #:use-module (gnu home services desktop) | ||
| 11 | #:use-module (gnu home services gnupg) | ||
| 12 | #:use-module (gnu home services xdg) | ||
| 13 | #:use-module (gnu home services sound) | ||
| 14 | #:use-module (gnu home services ssh) | ||
| 15 | #:use-module (gnu services) | ||
| 16 | #:use-module (guix packages) | ||
| 17 | |||
| 18 | #:use-module (nongnu packages linux) | ||
| 19 | #:use-module (nongnu system linux-initrd)) | ||
| 20 | |||
| 21 | (use-package-modules wm gnome networking virtualization | ||
| 22 | lisp lisp-xyz cups fonts gnupg android) | ||
| 23 | |||
| 24 | (use-service-modules cups desktop networking ssh xorg | ||
| 25 | docker virtualization pm sound dbus | ||
| 26 | nix sddm guix) | ||
| 27 | |||
| 28 | (define-public %jd-base-home-services | ||
| 29 | (list | ||
| 30 | ;; (service home-redshift-service-type | ||
| 31 | ;; (home-redshift-configuration | ||
| 32 | ;; (location-provider 'manual) | ||
| 33 | ;; (latitude 51.919438) | ||
| 34 | ;; (longitude 19.145136))) | ||
| 35 | ;; Poland | ||
| 36 | |||
| 37 | (service home-dbus-service-type) | ||
| 38 | (service home-emacs-service-type) | ||
| 39 | (service home-desktop-service-type) | ||
| 40 | |||
| 41 | (service home-openssh-service-type | ||
| 42 | (home-openssh-configuration | ||
| 43 | (hosts | ||
| 44 | (list (openssh-host (name "gammu") | ||
| 45 | (host-name "172.16.1.102") | ||
| 46 | (user "serwis") | ||
| 47 | (host-key-algorithms '("+ssh-rsa"))) | ||
| 48 | (openssh-host (name "net47") | ||
| 49 | (host-name "net47.abaks.pl") | ||
| 50 | (user "serwis") | ||
| 51 | (port 22001)))))) | ||
| 52 | |||
| 53 | ;; Dont know why, but when i put home-gpg-agent-service-type as an | ||
| 54 | ;; extension in home-desktop-service-type service it doesn't work. | ||
| 55 | (service home-gpg-agent-service-type | ||
| 56 | (home-gpg-agent-configuration | ||
| 57 | (pinentry-program | ||
| 58 | (file-append pinentry-gnome3 "/bin/pinentry-gnome3")) | ||
| 59 | (ssh-support? #t) | ||
| 60 | (default-cache-ttl 28800) | ||
| 61 | (max-cache-ttl 28800) | ||
| 62 | (default-cache-ttl-ssh 28800) | ||
| 63 | (max-cache-ttl-ssh 28800))) | ||
| 64 | ;; (service home-polkit-gnome-service-type) | ||
| 65 | )) | ||
| 66 | |||
| 67 | |||
| 68 | (define-public %jakub-user | ||
| 69 | (user-account | ||
| 70 | (name "jakub") | ||
| 71 | (comment "Jakub Dlugosz") | ||
| 72 | (group "users") | ||
| 73 | (home-directory "/home/jakub") | ||
| 74 | (supplementary-groups '("wheel" ;; sudo | ||
| 75 | "netdev" ;; network devices | ||
| 76 | "kvm" | ||
| 77 | "libvirt" | ||
| 78 | "tty" | ||
| 79 | "input" | ||
| 80 | "docker" | ||
| 81 | "audio" ;; control audio devices | ||
| 82 | "video" ;; access to webcam | ||
| 83 | "dialout" ;; access to /dev/ttyUSBX devices | ||
| 84 | "adbusers" | ||
| 85 | )))) | ||
| 86 | |||
| 87 | (define-public %jd-base-user-accounts | ||
| 88 | (cons* | ||
| 89 | %jakub-user | ||
| 90 | %base-user-accounts)) | ||
| 91 | |||
| 92 | (define-public %stumpwm-packages | ||
| 93 | (list sbcl | ||
| 94 | sbcl-dbus | ||
| 95 | stumpwm+slynk | ||
| 96 | |||
| 97 | sbcl-stumpwm-screenshot | ||
| 98 | sbcl-stumpwm-pamixer | ||
| 99 | sbcl-stumpwm-pass | ||
| 100 | |||
| 101 | sbcl-stumpwm-cpu | ||
| 102 | sbcl-stumpwm-mem | ||
| 103 | sbcl-stumpwm-net | ||
| 104 | sbcl-stumpwm-battery-portable | ||
| 105 | sbcl-stumpwm-stumptray | ||
| 106 | |||
| 107 | sbcl-stumpwm-ttf-fonts | ||
| 108 | |||
| 109 | sbcl-drakma | ||
| 110 | sbcl-yason | ||
| 111 | |||
| 112 | (list stumpwm "lib"))) | ||
| 113 | |||
| 114 | (define-public %root-packages | ||
| 115 | (specifications->packages '("emacs" | ||
| 116 | "emacs-exwm" | ||
| 117 | "stow" | ||
| 118 | "bluez" | ||
| 119 | "bluez-alsa" | ||
| 120 | "exfat-utils" | ||
| 121 | "git" | ||
| 122 | "xf86-input-libinput" | ||
| 123 | "intel-vaapi-driver" | ||
| 124 | "libva-utils" ;; vainfo | ||
| 125 | ;; "nss-certs" -- it is in %base-packages from fdfd7667c66cf9ce746330f39bcd366e124460e1 | ||
| 126 | "nix"))) | ||
| 127 | |||
| 128 | (define-public %jd-base-packages | ||
| 129 | (append %root-packages | ||
| 130 | ;; %stumpwm-packages | ||
| 131 | %base-packages)) | ||
| 132 | |||
| 133 | (define-public %jd-base-services | ||
| 134 | (cons* | ||
| 135 | (service guix-home-service-type | ||
| 136 | `(("jakub" ,(home-environment | ||
| 137 | (services %jd-base-home-services))))) | ||
| 138 | |||
| 139 | (service openssh-service-type) | ||
| 140 | |||
| 141 | (service console-font-service-type | ||
| 142 | (map (lambda (tty) | ||
| 143 | (cons tty (file-append | ||
| 144 | font-terminus | ||
| 145 | "/share/consolefonts/ter-122n.psf.gz"))) | ||
| 146 | '("tty1" "tty2" "tty3" "tty4" "tty5" "tty6"))) | ||
| 147 | |||
| 148 | (service screen-locker-service-type | ||
| 149 | (screen-locker-configuration | ||
| 150 | (name "swaylock") | ||
| 151 | (program (file-append swaylock "/bin/swaylock")) | ||
| 152 | (using-pam? #t) | ||
| 153 | (using-setuid? #f))) | ||
| 154 | |||
| 155 | (service network-manager-service-type | ||
| 156 | (network-manager-configuration | ||
| 157 | (vpn-plugins (list network-manager-openvpn)))) | ||
| 158 | |||
| 159 | (simple-service 'dbus-packages dbus-root-service-type (list blueman | ||
| 160 | virt-manager)) | ||
| 161 | (service bluetooth-service-type | ||
| 162 | (bluetooth-configuration | ||
| 163 | (auto-enable? #t))) | ||
| 164 | |||
| 165 | (service containerd-service-type) | ||
| 166 | (service docker-service-type) | ||
| 167 | (service libvirt-service-type | ||
| 168 | (libvirt-configuration | ||
| 169 | (unix-sock-group "libvirt"))) | ||
| 170 | (service virtlog-service-type) | ||
| 171 | |||
| 172 | (service cups-service-type | ||
| 173 | (cups-configuration | ||
| 174 | (web-interface? #t) | ||
| 175 | (extensions | ||
| 176 | (list cups-filters)))) | ||
| 177 | |||
| 178 | (service thermald-service-type) | ||
| 179 | (service tlp-service-type | ||
| 180 | (tlp-configuration | ||
| 181 | (cpu-boost-on-ac? #t) | ||
| 182 | (wifi-pwr-on-bat? #t))) | ||
| 183 | |||
| 184 | (service nix-service-type) | ||
| 185 | |||
| 186 | polkit-network-manager-service | ||
| 187 | |||
| 188 | (udev-rules-service 'android android-udev-rules | ||
| 189 | #:groups '("adbusers")) | ||
| 190 | |||
| 191 | (udev-rules-service 'microbit (udev-rule | ||
| 192 | "69-microbit.rules" | ||
| 193 | (string-append "ACTION!=\"add|change\", GOTO=\"microbit_rules_end\"" | ||
| 194 | "SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0d28\", ATTR{idProduct}==\"0204\", TAG+=\"uaccess\"" | ||
| 195 | "LABEL=\"microbit_rules_end\""))) | ||
| 196 | |||
| 197 | ;; %desktop-services | ||
| 198 | (modify-services %desktop-services | ||
| 199 | (guix-service-type config => (guix-configuration | ||
| 200 | (inherit config) | ||
| 201 | (substitute-urls | ||
| 202 | (append (list "https://substitutes.nonguix.org") | ||
| 203 | %default-substitute-urls)) | ||
| 204 | (authorized-keys | ||
| 205 | (append (list (plain-file "non-guix.pub" | ||
| 206 | "(public-key (ecc (curve Ed25519) (q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)))")) | ||
| 207 | %default-authorized-guix-keys)))) | ||
| 208 | (delete network-manager-service-type) | ||
| 209 | ;; (delete mingetty-service-type) | ||
| 210 | (delete console-font-service-type) | ||
| 211 | |||
| 212 | (delete pulseaudio-service-type) | ||
| 213 | (delete alsa-service-type) | ||
| 214 | (delete (if (string-prefix? "x86_64" | ||
| 215 | (or (%current-target-system) | ||
| 216 | (%current-system))) | ||
| 217 | gdm-service-type | ||
| 218 | sddm-service-type))))) | ||
| 219 | |||
| 220 | ;; Odin is a base for my operating systems | ||
| 221 | (define-public odin-free | ||
| 222 | (operating-system | ||
| 223 | (locale "en_US.utf8") | ||
| 224 | (timezone "Europe/Warsaw") | ||
| 225 | (keyboard-layout (keyboard-layout "pl")) | ||
| 226 | (host-name "odin") | ||
| 227 | |||
| 228 | (users %jd-base-user-accounts) | ||
| 229 | (packages %jd-base-packages) | ||
| 230 | (services %jd-base-services) | ||
| 231 | |||
| 232 | (bootloader (bootloader-configuration | ||
| 233 | (bootloader grub-bootloader) | ||
| 234 | (targets (list "/boot/efi")) | ||
| 235 | (keyboard-layout keyboard-layout))) | ||
| 236 | |||
| 237 | (file-systems (cons* (file-system | ||
| 238 | (mount-point "/tmp") | ||
| 239 | (device "none") | ||
| 240 | (type "tmpfs") | ||
| 241 | (check? #f)) | ||
| 242 | %base-file-systems)))) | ||
| 243 | |||
| 244 | (define-public odin-non-free | ||
| 245 | (operating-system | ||
| 246 | (inherit odin-free) | ||
| 247 | (kernel linux) | ||
| 248 | (initrd microcode-initrd) | ||
| 249 | (firmware (list linux-firmware)))) | ||
diff --git a/guix/jd/desktops/berserker.scm b/guix/jd/desktops/berserker.scm deleted file mode 100755 index 3d6b0df..0000000 --- a/guix/jd/desktops/berserker.scm +++ /dev/null | |||
| @@ -1,17 +0,0 @@ | |||
| 1 | (define-module (jd desktops berserker) | ||
| 2 | #:use-module (jd desktops base) | ||
| 3 | #:use-module (jd packages linux) | ||
| 4 | #:use-module (jd utils) | ||
| 5 | #:use-module (gnu) | ||
| 6 | #:use-module (gnu home)) | ||
| 7 | |||
| 8 | (define-public home | ||
| 9 | (home-environment | ||
| 10 | (services %jd-base-home-services))) | ||
| 11 | |||
| 12 | (define-public system | ||
| 13 | (operating-system | ||
| 14 | (inherit odin-non-free) | ||
| 15 | (kernel-loadable-modules (list xmm7360-pci)) | ||
| 16 | (host-name "berserker"))) | ||
| 17 | |||
diff --git a/guix/jd/desktops/mimir.scm b/guix/jd/desktops/mimir.scm deleted file mode 100644 index e5db0b7..0000000 --- a/guix/jd/desktops/mimir.scm +++ /dev/null | |||
| @@ -1,14 +0,0 @@ | |||
| 1 | (define-module (jd desktops mimir) | ||
| 2 | #:use-module (jd desktops base) | ||
| 3 | #:use-module (gnu) | ||
| 4 | #:use-module (gnu home)) | ||
| 5 | |||
| 6 | (define-public home | ||
| 7 | (home-environment | ||
| 8 | (services %jd-base-home-services))) | ||
| 9 | |||
| 10 | (define-public system | ||
| 11 | (operating-system | ||
| 12 | (inherit odin-non-free) | ||
| 13 | (host-name "mimir"))) | ||
| 14 | |||
diff --git a/guix/jd/home/services/desktop.scm b/guix/jd/home/services/desktop.scm deleted file mode 100644 index 393c2d0..0000000 --- a/guix/jd/home/services/desktop.scm +++ /dev/null | |||
| @@ -1,198 +0,0 @@ | |||
| 1 | (define-module (jd home services desktop) | ||
| 2 | #:use-module (gnu packages) | ||
| 3 | #:use-module (gnu packages freedesktop) | ||
| 4 | #:use-module (gnu packages networking) | ||
| 5 | #:use-module (gnu packages syncthing) | ||
| 6 | #:use-module (gnu packages gnome) | ||
| 7 | #:use-module (gnu packages gnupg) | ||
| 8 | #:use-module (gnu services) | ||
| 9 | #:use-module (gnu services configuration) | ||
| 10 | #:use-module (gnu home services) | ||
| 11 | #:use-module (gnu home services shepherd) | ||
| 12 | #:use-module (gnu home services desktop) | ||
| 13 | #:use-module (gnu home services sound) | ||
| 14 | #:use-module (gnu home services xdg) | ||
| 15 | #:use-module (gnu home services gnupg) | ||
| 16 | #:use-module (gnu home services dotfiles) | ||
| 17 | #:use-module (guix gexp) | ||
| 18 | |||
| 19 | #:use-module (jd packages fonts)) | ||
| 20 | |||
| 21 | (define (desktop-profile-service config) | ||
| 22 | (append | ||
| 23 | (list font-terminus-ttf) | ||
| 24 | (specifications->packages '("sway" | ||
| 25 | ;; "swayfx" | ||
| 26 | "swaylock" | ||
| 27 | "swayidle" | ||
| 28 | "swaynotificationcenter" | ||
| 29 | "waybar" | ||
| 30 | "fuzzel" | ||
| 31 | "foot" | ||
| 32 | "mako" | ||
| 33 | "wl-clipboard" | ||
| 34 | "wlsunset" | ||
| 35 | "grimshot" | ||
| 36 | "swappy" | ||
| 37 | |||
| 38 | "htop" | ||
| 39 | "distrobox" | ||
| 40 | |||
| 41 | "udiskie" | ||
| 42 | ;; rest | ||
| 43 | "qutebrowser" | ||
| 44 | "ungoogled-chromium" | ||
| 45 | "firefox" | ||
| 46 | "tor-client" | ||
| 47 | "signal-desktop" | ||
| 48 | |||
| 49 | "pulsemixer" | ||
| 50 | "pavucontrol" | ||
| 51 | "alsa-utils" | ||
| 52 | |||
| 53 | "virt-manager" | ||
| 54 | |||
| 55 | "flatpak" | ||
| 56 | "redshift" | ||
| 57 | "fontmanager" | ||
| 58 | |||
| 59 | "polybar" | ||
| 60 | |||
| 61 | "blueman" | ||
| 62 | |||
| 63 | "nomacs" | ||
| 64 | |||
| 65 | "xdg-utils" | ||
| 66 | "xdg-dbus-proxy" | ||
| 67 | "xdg-desktop-portal-gtk" | ||
| 68 | "xdg-desktop-portal-wlr" | ||
| 69 | "glib:bin" | ||
| 70 | "gtk+:bin" | ||
| 71 | "gnome-keyring" | ||
| 72 | "shared-mime-info" | ||
| 73 | "libnotify" | ||
| 74 | "dconf" | ||
| 75 | "hicolor-icon-theme" | ||
| 76 | |||
| 77 | "dunst" | ||
| 78 | |||
| 79 | ; "gimp" | ||
| 80 | ; "inkscape" | ||
| 81 | |||
| 82 | "mpv" | ||
| 83 | "youtube-dl" | ||
| 84 | |||
| 85 | "pamixer" | ||
| 86 | "playerctl" | ||
| 87 | "scrot" | ||
| 88 | "brightnessctl" | ||
| 89 | "upower" | ||
| 90 | "tlp" | ||
| 91 | "feh" | ||
| 92 | "alacritty" | ||
| 93 | |||
| 94 | "curl" | ||
| 95 | "wget" | ||
| 96 | "zip" | ||
| 97 | "unzip" | ||
| 98 | "qrencode" | ||
| 99 | "trash-cli" | ||
| 100 | "pandoc" | ||
| 101 | "password-store" | ||
| 102 | "oath-toolkit" | ||
| 103 | ;; "pinentry" | ||
| 104 | |||
| 105 | "syncthing" | ||
| 106 | "syncthing-gtk" | ||
| 107 | |||
| 108 | "xmodmap" | ||
| 109 | "xrandr" | ||
| 110 | "arandr" | ||
| 111 | "xss-lock" | ||
| 112 | "libinput" | ||
| 113 | "xinput" | ||
| 114 | "xprop" | ||
| 115 | "rlwrap" | ||
| 116 | |||
| 117 | "nheko" | ||
| 118 | "quassel" | ||
| 119 | "inkscape" | ||
| 120 | "gimp" | ||
| 121 | "libreoffice" | ||
| 122 | "steam")))) | ||
| 123 | |||
| 124 | (define (desktop-environment-variables-service config) | ||
| 125 | `(("GTK_THEME" . "Adwaita:dark") | ||
| 126 | ("VISUAL" . "emacsclient") | ||
| 127 | ("EDITOR" . "emacsclient") | ||
| 128 | ("PATH" . "$HOME/.bin:$HOME/.local/bin:$HOME/.npm-global/bin:$PATH") | ||
| 129 | ("XDG_DATA_DIRS" . "$XDG_DATA_DIRS:$HOME/.local/share/flatpak/exports/share") | ||
| 130 | ("SBCL_HOME" . "/run/current-system/profile/lib/sbcl/") | ||
| 131 | |||
| 132 | ;; Set Wayland-specific environment variables (taken from RDE) | ||
| 133 | ("XDG_CURRENT_DESKTOP" . "sway") | ||
| 134 | ("XDG_SESSION_TYPE" . "wayland") | ||
| 135 | ("RTC_USE_PIPEWIRE" . "true") | ||
| 136 | ("SDL_VIDEODRIVER" . "wayland") | ||
| 137 | ("MOZ_ENABLE_WAYLAND" . "1") | ||
| 138 | ("CLUTTER_BACKEND" . "wayland") | ||
| 139 | ("ELM_ENGINE" . "wayland_egl") | ||
| 140 | ("ECORE_EVAS_ENGINE" . "wayland-egl") | ||
| 141 | ("QT_QPA_PLATFORM" . "wayland-egl"))) ;; QT_QPA_PLATFORM=xcb | ||
| 142 | |||
| 143 | (define (desktop-xdg-mime-applications-service config) | ||
| 144 | (home-xdg-mime-applications-configuration | ||
| 145 | (default '((inode/directory . emacsclient.desktop) | ||
| 146 | (application/pdf . emacsclient.desktop) | ||
| 147 | (x-scheme-handler/http= . firefox.desktop) | ||
| 148 | (x-scheme-handler/https= . firefox.desktop))) | ||
| 149 | ;; (desktop-entries | ||
| 150 | ;; (list (xdg-desktop-entry | ||
| 151 | ;; (file "emacs-desktop") | ||
| 152 | ;; (name "Emacs") | ||
| 153 | ;; (type 'application) | ||
| 154 | ;; (config | ||
| 155 | ;; '((exec . "emacsclient -a emacs %u")))))) | ||
| 156 | )) | ||
| 157 | |||
| 158 | (define (desktop-gpg-agent-service config) | ||
| 159 | (home-gpg-agent-configuration | ||
| 160 | (pinentry-program | ||
| 161 | (file-append pinentry-gnome3 "/bin/pinentry-gnome3")) | ||
| 162 | (ssh-support? #t) | ||
| 163 | (default-cache-ttl 28800) | ||
| 164 | (max-cache-ttl 28800) | ||
| 165 | (default-cache-ttl-ssh 28800) | ||
| 166 | (max-cache-ttl-ssh 28800))) | ||
| 167 | |||
| 168 | (define (desktop-gpg-agent-service config) | ||
| 169 | (home-gpg-agent-configuration | ||
| 170 | (pinentry-program | ||
| 171 | (file-append pinentry-gnome3 "/bin/pinentry-gnome3")) | ||
| 172 | (ssh-support? #t) | ||
| 173 | (default-cache-ttl 28800) | ||
| 174 | (max-cache-ttl 28800) | ||
| 175 | (default-cache-ttl-ssh 28800) | ||
| 176 | (max-cache-ttl-ssh 28800))) | ||
| 177 | |||
| 178 | (define (desktop-dotfiles-service config) | ||
| 179 | (home-dotfiles-configuration | ||
| 180 | (directories '("./files")))) | ||
| 181 | |||
| 182 | (define-public home-desktop-service-type | ||
| 183 | (service-type (name 'home-desktop) | ||
| 184 | (extensions (list (service-extension home-profile-service-type | ||
| 185 | desktop-profile-service) | ||
| 186 | (service-extension home-environment-variables-service-type | ||
| 187 | desktop-environment-variables-service) | ||
| 188 | (service-extension home-pipewire-service-type | ||
| 189 | (lambda (_) (home-pipewire-configuration))) | ||
| 190 | (service-extension home-xdg-mime-applications-service-type | ||
| 191 | desktop-xdg-mime-applications-service) | ||
| 192 | (service-extension home-gpg-agent-service-type | ||
| 193 | desktop-gpg-agent-service) | ||
| 194 | (service-extension home-dotfiles-service-type | ||
| 195 | desktop-dotfiles-service))) | ||
| 196 | (default-value #f) | ||
| 197 | (description "Runs desktop services."))) | ||
| 198 | |||
diff --git a/guix/jd/home/services/emacs.scm b/guix/jd/home/services/emacs.scm deleted file mode 100644 index 15f0e68..0000000 --- a/guix/jd/home/services/emacs.scm +++ /dev/null | |||
| @@ -1,113 +0,0 @@ | |||
| 1 | (define-module (jd home services emacs) | ||
| 2 | #:use-module (jd packages emacs) | ||
| 3 | |||
| 4 | #:use-module (gnu packages) | ||
| 5 | #:use-module (gnu packages emacs) | ||
| 6 | |||
| 7 | #:use-module (gnu services) | ||
| 8 | #:use-module (gnu services configuration) | ||
| 9 | #:use-module (gnu home services) | ||
| 10 | #:use-module (gnu home services shepherd) | ||
| 11 | #:use-module (gnu home services desktop) | ||
| 12 | |||
| 13 | #:use-module (guix gexp) | ||
| 14 | #:use-module (guix packages) | ||
| 15 | #:use-module (guix profiles)) | ||
| 16 | |||
| 17 | (define-configuration home-emacs-service-configuration | ||
| 18 | (emacs-package | ||
| 19 | (package emacs-next-pgtk) | ||
| 20 | "Emacs packages")) | ||
| 21 | |||
| 22 | (define (emacs-profile-service config) | ||
| 23 | (append (list emacs-org-roam-ui | ||
| 24 | emacs-lsp-mode! | ||
| 25 | (home-emacs-service-configuration-emacs-package | ||
| 26 | config)) | ||
| 27 | (specifications->packages '("emacs-sway" | ||
| 28 | "emacs-shackle" | ||
| 29 | "emacs-ytdl" | ||
| 30 | "emacs-desktop-environment" | ||
| 31 | "emacs-exwm" | ||
| 32 | "emacs-perspective" | ||
| 33 | "emacs-mu4e-alert" | ||
| 34 | "mu" | ||
| 35 | "isync" | ||
| 36 | "emacs-htmlize" | ||
| 37 | "emacs-bluetooth" | ||
| 38 | "emacs-nov-el" | ||
| 39 | "emacs-password-store" | ||
| 40 | "emacs-mastodon" | ||
| 41 | "emacs-elfeed" | ||
| 42 | "emacs-pdf-tools" | ||
| 43 | "emacs-emms" | ||
| 44 | "emacs-all-the-icons-dired" | ||
| 45 | "emacs-vterm" | ||
| 46 | "emacs-restclient" | ||
| 47 | "emacs-magit" | ||
| 48 | "emacs-neotree" | ||
| 49 | "emacs-projectile" | ||
| 50 | "emacs-company-box" | ||
| 51 | "emacs-company" | ||
| 52 | "emacs-docker" | ||
| 53 | "emacs-yaml-mode" | ||
| 54 | "emacs-web-mode" | ||
| 55 | "emacs-flycheck" | ||
| 56 | "emacs-tide" | ||
| 57 | "emacs-cider" | ||
| 58 | "emacs-typescript-mode" | ||
| 59 | "emacs-pyvenv" | ||
| 60 | "emacs-geiser-guile" | ||
| 61 | "emacs-racket-mode" | ||
| 62 | "emacs-geiser-racket" | ||
| 63 | "emacs-geiser" | ||
| 64 | "emacs-sly" | ||
| 65 | "emacs-rainbow-delimiters" | ||
| 66 | "emacs-paredit" | ||
| 67 | ;; "emacs-lsp-ivy" | ||
| 68 | ;; "emacs-lsp-mode" | ||
| 69 | "emacs-org-caldav" | ||
| 70 | "emacs-org-pomodoro" | ||
| 71 | "emacs-org-roam" | ||
| 72 | "emacs-org-roam-bibtex" | ||
| 73 | "emacs-org-superstar" | ||
| 74 | "emacs-org" | ||
| 75 | "emacs-ox-pandoc" | ||
| 76 | "emacs-beacon" | ||
| 77 | "emacs-all-the-icons" | ||
| 78 | "emacs-which-key" | ||
| 79 | "emacs-counsel" | ||
| 80 | "emacs-ivy" | ||
| 81 | "emacs-hl-todo" | ||
| 82 | "emacs-diminish" | ||
| 83 | "emacs-solarized-theme" | ||
| 84 | "font-terminus" | ||
| 85 | "emacs-undo-tree" | ||
| 86 | "emacs-hydra" | ||
| 87 | "emacs-multiple-cursors" | ||
| 88 | "emacs-general" | ||
| 89 | "emacs-guix" | ||
| 90 | "emacs-doom-modeline" | ||
| 91 | "emacs-use-package")))) | ||
| 92 | |||
| 93 | (define (emacs-shepherd-services config) | ||
| 94 | (list (shepherd-service | ||
| 95 | (documentation "Emacs daemon.") | ||
| 96 | (provision '(emacs)) | ||
| 97 | (start #~(make-forkexec-constructor | ||
| 98 | (list #$(file-append (home-emacs-service-configuration-emacs-package | ||
| 99 | config) | ||
| 100 | "/bin/emacs") | ||
| 101 | "--fg-daemon"))) | ||
| 102 | (stop #~(make-kill-destructor))))) | ||
| 103 | |||
| 104 | (define-public home-emacs-service-type | ||
| 105 | (service-type (name 'home-emacs) | ||
| 106 | (extensions (list (service-extension home-profile-service-type | ||
| 107 | emacs-profile-service) | ||
| 108 | (service-extension home-shepherd-service-type | ||
| 109 | emacs-shepherd-services) | ||
| 110 | )) | ||
| 111 | (default-value (home-emacs-service-configuration)) | ||
| 112 | (description "Runs emacs daemon service."))) | ||
| 113 | |||
diff --git a/guix/jd/home/services/polkit.scm b/guix/jd/home/services/polkit.scm deleted file mode 100644 index 327ee08..0000000 --- a/guix/jd/home/services/polkit.scm +++ /dev/null | |||
| @@ -1,31 +0,0 @@ | |||
| 1 | (define-module (jd home services polkit) | ||
| 2 | #:use-module (gnu packages) | ||
| 3 | #:use-module (gnu packages polkit) | ||
| 4 | #:use-module (gnu services) | ||
| 5 | #:use-module (gnu services configuration) | ||
| 6 | #:use-module (gnu home services) | ||
| 7 | #:use-module (gnu home services shepherd) | ||
| 8 | #:use-module (guix gexp)) | ||
| 9 | |||
| 10 | |||
| 11 | (define (polkit-gnome-profile-service config) | ||
| 12 | (specifications->packages '("polkit-gnome"))) | ||
| 13 | |||
| 14 | (define (polkit-gnome-shepherd-service config) | ||
| 15 | (list (shepherd-service | ||
| 16 | (documentation "Polkit gnome service.") | ||
| 17 | (provision '(polkit-gnome)) | ||
| 18 | (start #~(make-forkexec-constructor | ||
| 19 | (list #$(file-append polkit-gnome | ||
| 20 | "/libexec/polkit-gnome-authentication-agent-1")))) | ||
| 21 | (stop #~(make-kill-destructor))))) | ||
| 22 | |||
| 23 | (define-public home-polkit-gnome-service-type | ||
| 24 | (service-type (name 'home-polkit-gnome) | ||
| 25 | (extensions (list (service-extension home-profile-service-type | ||
| 26 | polkit-gnome-profile-service) | ||
| 27 | (service-extension home-shepherd-service-type | ||
| 28 | polkit-gnome-shepherd-service))) | ||
| 29 | (default-value #f) | ||
| 30 | (description "Runs the PolicyKit-gnome service."))) | ||
| 31 | |||
diff --git a/guix/jd/packages/emacs.scm b/guix/jd/packages/emacs.scm deleted file mode 100644 index 0b9b19d..0000000 --- a/guix/jd/packages/emacs.scm +++ /dev/null | |||
| @@ -1,57 +0,0 @@ | |||
| 1 | (define-module (jd packages emacs) | ||
| 2 | #:use-module (gnu packages emacs-xyz) | ||
| 3 | #:use-module (gnu packages) | ||
| 4 | #:use-module (guix packages) | ||
| 5 | #:use-module (guix git-download) | ||
| 6 | #:use-module (guix build-system emacs) | ||
| 7 | #:use-module ((guix licenses) #:prefix license:) | ||
| 8 | #:export (emacs-org-roam-ui | ||
| 9 | emacs-lsp-mode!)) | ||
| 10 | |||
| 11 | |||
| 12 | (define emacs-org-roam-ui | ||
| 13 | (let ((commit "9474a254390b1e42488a1801fed5826b32a8030b") | ||
| 14 | (revision "0")) | ||
| 15 | (package | ||
| 16 | (name "emacs-org-roam-ui") | ||
| 17 | (version (git-version "0" revision commit)) | ||
| 18 | (source (origin | ||
| 19 | (method git-fetch) | ||
| 20 | (uri (git-reference | ||
| 21 | (url "https://github.com/org-roam/org-roam-ui") | ||
| 22 | (commit commit))) | ||
| 23 | (file-name (git-file-name name version)) | ||
| 24 | (sha256 | ||
| 25 | (base32 | ||
| 26 | "0v54vxh95izch74wz2dl2dkdqicbvshra55l6qvd4xl5qmfhpjdc")))) | ||
| 27 | (build-system emacs-build-system) | ||
| 28 | (arguments | ||
| 29 | `(#:include (cons "^out" %default-include))) | ||
| 30 | (propagated-inputs | ||
| 31 | (list emacs-org-roam emacs-websocket emacs-simple-httpd emacs-f)) | ||
| 32 | (home-page "https://github.com/org-roam/org-roam-ui") | ||
| 33 | (synopsis "A graphical frontend for your org-roam Zettelkasten") | ||
| 34 | (description " Org-Roam-UI is a frontend for exploring and interacting | ||
| 35 | with your @code{org-roam} notes. It is meant a successor of | ||
| 36 | @code{org-roam-server} that extends functionality of org-roam with a Web app | ||
| 37 | that runs side-by-side with Emacs.") | ||
| 38 | (license license:gpl3+)))) | ||
| 39 | |||
| 40 | |||
| 41 | |||
| 42 | (define emacs-lsp-mode! | ||
| 43 | (let ((commit "808c4d0ab9f19bb92c56716cf59df89432b63f5d") | ||
| 44 | (revision "1")) | ||
| 45 | (package | ||
| 46 | (inherit emacs-lsp-mode) | ||
| 47 | (name "emacs-lsp-mode") | ||
| 48 | (version (git-version "8.0.1" revision commit)) | ||
| 49 | (source | ||
| 50 | (origin | ||
| 51 | (method git-fetch) | ||
| 52 | (uri (git-reference | ||
| 53 | (url "https://github.com/emacs-lsp/lsp-mode") | ||
| 54 | (commit commit))) | ||
| 55 | (file-name (git-file-name name version)) | ||
| 56 | (sha256 | ||
| 57 | (base32 "0ridjhzndwjj8947vabq05njgnns74hi69x77axgcbv1c4nasz2y"))))))) | ||
diff --git a/guix/jd/packages/fonts.scm b/guix/jd/packages/fonts.scm deleted file mode 100644 index fa70722..0000000 --- a/guix/jd/packages/fonts.scm +++ /dev/null | |||
| @@ -1,25 +0,0 @@ | |||
| 1 | (define-module (jd packages fonts) | ||
| 2 | #:use-module (gnu packages) | ||
| 3 | #:use-module (guix packages) | ||
| 4 | #:use-module (guix download) | ||
| 5 | #:use-module (guix build-system font) | ||
| 6 | #:use-module ((guix licenses) #:prefix license:)) | ||
| 7 | |||
| 8 | (define-public font-terminus-ttf | ||
| 9 | (package | ||
| 10 | (name "font-terminus-ttf") | ||
| 11 | (version "4.49.3") | ||
| 12 | (source (origin | ||
| 13 | (method url-fetch) | ||
| 14 | (uri (string-append "https://files.ax86.net/terminus-ttf/files/" | ||
| 15 | version "/terminus-ttf-" version ".zip")) | ||
| 16 | (sha256 | ||
| 17 | (base32 | ||
| 18 | "0xvm4mcf0gx7df35swqwxb7a5h3z0gf6dkg6zy84b6nrk0fr5b8f")))) | ||
| 19 | (build-system font-build-system) | ||
| 20 | (home-page "https://files.ax86.net/terminus-ttf/") | ||
| 21 | (synopsis "Terminus TTF Font") | ||
| 22 | (description | ||
| 23 | "Terminus TTF is a TrueType version of Terminus Font, a fixed-width bitmap font optimized for long work with computers.") | ||
| 24 | (license license:gpl2+))) | ||
| 25 | |||
diff --git a/guix/jd/packages/linux.scm b/guix/jd/packages/linux.scm deleted file mode 100644 index 94549c3..0000000 --- a/guix/jd/packages/linux.scm +++ /dev/null | |||
| @@ -1,51 +0,0 @@ | |||
| 1 | (define-module (jd packages linux) | ||
| 2 | #:use-module (guix packages) | ||
| 3 | #:use-module (guix download) | ||
| 4 | #:use-module (guix build-system linux-module) | ||
| 5 | #:use-module (guix git-download) | ||
| 6 | #:use-module (guix gexp) | ||
| 7 | #:use-module (gnu packages linux) | ||
| 8 | #:use-module (gnu packages pciutils) | ||
| 9 | #:use-module (gnu packages pkg-config) | ||
| 10 | #:use-module (gnu packages autotools) | ||
| 11 | #:use-module ((guix licenses) #:prefix license:)) | ||
| 12 | |||
| 13 | (define-public xmm7360-pci | ||
| 14 | (package | ||
| 15 | (name "xmm7360-pci") | ||
| 16 | (version "0.1.0") | ||
| 17 | (source | ||
| 18 | (origin | ||
| 19 | (method git-fetch) | ||
| 20 | (uri (git-reference | ||
| 21 | (url "https://github.com/xmm7360/xmm7360-pci.git") | ||
| 22 | (commit "a8ff2c6ceee84cbe74df8a78cfaa5a016d362ed4"))) | ||
| 23 | (file-name (git-file-name name version)) | ||
| 24 | (sha256 | ||
| 25 | (base32 | ||
| 26 | "1aals95hk76rgd21rknqc9qfjva6g6gwicw6wz19m20bn08bs2f3")))) | ||
| 27 | (build-system linux-module-build-system) | ||
| 28 | (arguments | ||
| 29 | (list | ||
| 30 | #:tests? #f | ||
| 31 | #:phases | ||
| 32 | #~(modify-phases %standard-phases | ||
| 33 | (add-after 'unpack 'patch-makefile | ||
| 34 | (lambda _ | ||
| 35 | (substitute* (find-files | ||
| 36 | "." "^Makefile(\\.include)?$") | ||
| 37 | (("^ccflags-y := .*$") | ||
| 38 | "ccflags-y := -Wno-multichar -Wno-incompatible-pointer-types"))))))) | ||
| 39 | (native-inputs | ||
| 40 | `(("pkg-config" ,pkg-config) | ||
| 41 | ("autoconf" ,autoconf) | ||
| 42 | ("automake" ,automake))) | ||
| 43 | (inputs | ||
| 44 | `(("kernel" ,linux-libre) | ||
| 45 | ("pciutils" ,pciutils))) | ||
| 46 | (synopsis "Kernel module for Intel XMM7360 LTE modem") | ||
| 47 | (description | ||
| 48 | "This package provides a kernel module for the Intel XMM7360 LTE modem, allowing it to function in Linux.") | ||
| 49 | (home-page "https://github.com/xmm7360/xmm7360-pci") | ||
| 50 | (license license:gpl3+))) | ||
| 51 | |||
diff --git a/guix/jd/services/polkit.scm b/guix/jd/services/polkit.scm deleted file mode 100644 index 948500c..0000000 --- a/guix/jd/services/polkit.scm +++ /dev/null | |||
| @@ -1,21 +0,0 @@ | |||
| 1 | (define-module (jd services polkit) | ||
| 2 | #:use-module (gnu services) | ||
| 3 | #:use-module (gnu services dbus) | ||
| 4 | #:use-module (gnu home services) | ||
| 5 | #:use-module (guix gexp)) | ||
| 6 | |||
| 7 | (define polkit-network-manager | ||
| 8 | (file-union | ||
| 9 | "polkit-wheel" | ||
| 10 | `(("share/polkit-1/rules.d/50-org.freedesktop.NetworkManager.rules" | ||
| 11 | ,(plain-file | ||
| 12 | "50-org.freedesktop.NetworkManager.rules" | ||
| 13 | "polkit.addRule(function(action, subject) { | ||
| 14 | if (action.id.indexOf(\"org.freedesktop.NetworkManager.\") == 0 && | ||
| 15 | subject.isInGroup(\"netdev\")) { | ||
| 16 | return polkit.Result.YES; | ||
| 17 | } | ||
| 18 | });"))))) | ||
| 19 | |||
| 20 | (define-public polkit-network-manager-service | ||
| 21 | (simple-service 'polkit-network-manager polkit-service-type (list polkit-network-manager))) | ||
diff --git a/guix/jd/utils.scm b/guix/jd/utils.scm deleted file mode 100644 index 72be6fc..0000000 --- a/guix/jd/utils.scm +++ /dev/null | |||
| @@ -1,75 +0,0 @@ | |||
| 1 | (define-module (jd utils) | ||
| 2 | #:use-module (gnu system) | ||
| 3 | #:use-module (ice-9 match) | ||
| 4 | #:export (jd-search-patches | ||
| 5 | current-operating-system | ||
| 6 | current-home)) | ||
| 7 | |||
| 8 | (define primitive-host-operating-system | ||
| 9 | "/etc/config.scm") | ||
| 10 | |||
| 11 | (define-macro (define-combine-operating-systems name fields) | ||
| 12 | `(define (,name os-to-inherit-from os) | ||
| 13 | (operating-system | ||
| 14 | (inherit os-to-inherit-from) | ||
| 15 | ,@(map (lambda (field) | ||
| 16 | `(,field | ||
| 17 | (,(string->symbol | ||
| 18 | (string-append | ||
| 19 | "operating-system-" | ||
| 20 | (symbol->string field))) | ||
| 21 | os))) | ||
| 22 | fields)))) | ||
| 23 | |||
| 24 | (define-combine-operating-systems combine-install-dest-informations | ||
| 25 | (bootloader mapped-devices file-systems)) | ||
| 26 | |||
| 27 | (define (make-reconfigureable-os os) | ||
| 28 | (combine-install-dest-informations | ||
| 29 | os | ||
| 30 | (load primitive-host-operating-system))) | ||
| 31 | |||
| 32 | (define (current-operating-system) | ||
| 33 | (make-reconfigureable-os | ||
| 34 | (module-ref | ||
| 35 | (resolve-module | ||
| 36 | `(jd desktops ,(string->symbol (gethostname)))) | ||
| 37 | 'system))) | ||
| 38 | |||
| 39 | (define (current-home) | ||
| 40 | (module-ref | ||
| 41 | (resolve-module | ||
| 42 | `(jd desktops ,(string->symbol (gethostname)))) | ||
| 43 | 'home)) | ||
| 44 | |||
| 45 | ;; This code is copied and modified from (gnu packages) module. | ||
| 46 | |||
| 47 | (define (make-custom-load-path dir-path) | ||
| 48 | (make-parameter | ||
| 49 | (map (lambda (directory) | ||
| 50 | (let ((custom-dir (string-append directory dir-path))) | ||
| 51 | (if (and (file-exists? custom-dir) | ||
| 52 | (file-is-directory? custom-dir)) | ||
| 53 | custom-dir | ||
| 54 | directory))) | ||
| 55 | %load-path))) | ||
| 56 | |||
| 57 | (define (make-custom-searcher load-path) | ||
| 58 | (lambda (file-name) | ||
| 59 | (or (search-path (load-path) file-name) | ||
| 60 | (raise (string-append file-name | ||
| 61 | ": not found"))))) | ||
| 62 | |||
| 63 | (define %jd-patch-path (make-custom-load-path "/jd/packages/patches")) | ||
| 64 | (define %jd-dot-files-path (make-custom-load-path "/jd/home/services/dotfiles")) | ||
| 65 | |||
| 66 | (define (jd-search-patch file-name) | ||
| 67 | "Search the patch FILE-NAME. Raise an error if not found." | ||
| 68 | (or (search-path (%jd-patch-path) file-name) | ||
| 69 | (raise (string-append file-name | ||
| 70 | ": patch not found")))) | ||
| 71 | |||
| 72 | (define-syntax-rule (jd-search-patches file-name ...) | ||
| 73 | "Return the list of absolute file names corresponding to each | ||
| 74 | FILE-NAME found in %JD-PATCH-PATH." | ||
| 75 | (list (jd-search-patch file-name) ...)) | ||
diff --git a/src/jd/config.scm b/src/jd/config.scm new file mode 100644 index 0000000..f79df44 --- /dev/null +++ b/src/jd/config.scm | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | (define-module (jd config) | ||
| 2 | #:use-module (jd host) | ||
| 3 | #:use-module (jd user) | ||
| 4 | #:use-module (rde features) | ||
| 5 | #:use-module (gnu services) | ||
| 6 | #:use-module (gnu system) | ||
| 7 | #:use-module (gnu services guix) | ||
| 8 | #:use-module (srfi srfi-1) | ||
| 9 | #:use-module (ice-9 match)) | ||
| 10 | |||
| 11 | |||
| 12 | (define-public jd-config | ||
| 13 | (rde-config | ||
| 14 | (integrate-he-in-os? #t) | ||
| 15 | (features | ||
| 16 | (append | ||
| 17 | (list (feature-nonfree-kernel)) | ||
| 18 | %host-features | ||
| 19 | %user-features)))) | ||
| 20 | |||
| 21 | (define-public %os | ||
| 22 | (rde-config-operating-system jd-config)) | ||
| 23 | |||
diff --git a/src/jd/features/mail.scm b/src/jd/features/mail.scm new file mode 100644 index 0000000..f5c3536 --- /dev/null +++ b/src/jd/features/mail.scm | |||
| @@ -0,0 +1,115 @@ | |||
| 1 | (define-module (jd features mail) | ||
| 2 | #:use-module (rde packages) | ||
| 3 | #:use-module (rde exceptions) | ||
| 4 | #:use-module (rde features) | ||
| 5 | #:use-module (rde predicates) | ||
| 6 | #:use-module (rde features emacs) | ||
| 7 | #:use-module (rde features mail) | ||
| 8 | #:use-module ((rde features mail providers) #:prefix mail-providers:) | ||
| 9 | #:use-module (gnu packages mail) | ||
| 10 | #:use-module (gnu packages emacs-xyz) | ||
| 11 | #:use-module (rde packages emacs-xyz) | ||
| 12 | #:use-module (rde packages mail) | ||
| 13 | #:use-module (rde serializers elisp) | ||
| 14 | #:use-module (rde home services mail) | ||
| 15 | #:use-module (gnu services) | ||
| 16 | #:use-module (gnu services configuration) | ||
| 17 | #:use-module (gnu home services) | ||
| 18 | #:use-module (gnu home-services mail) | ||
| 19 | #:use-module (gnu home services mcron) | ||
| 20 | #:use-module (gnu home-services version-control) | ||
| 21 | #:use-module (gnu home services xdg) | ||
| 22 | |||
| 23 | #:use-module (ice-9 match) | ||
| 24 | #:use-module (srfi srfi-1) | ||
| 25 | #:use-module (guix gexp) | ||
| 26 | #:use-module (guix deprecation) | ||
| 27 | #:use-module (guix diagnostics) | ||
| 28 | #:use-module (guix i18n) | ||
| 29 | |||
| 30 | #:export (feature-l2md* feature-mail-mcron)) | ||
| 31 | |||
| 32 | (define* (feature-l2md* | ||
| 33 | #:key | ||
| 34 | (l2md l2md)) | ||
| 35 | "Configure l2md MDA." | ||
| 36 | (ensure-pred file-like? l2md) | ||
| 37 | |||
| 38 | (define (get-home-services config) | ||
| 39 | (require-value 'mail-directory-fn config) | ||
| 40 | (require-value 'mailing-lists config) | ||
| 41 | (define mail-dir ((get-value 'mail-directory-fn config) config)) | ||
| 42 | (define mls (filter (lambda (x) (eq? (mailing-list-synchronizer x) 'l2md)) | ||
| 43 | (get-value 'mailing-lists config))) | ||
| 44 | (define (get-repo-config ml) | ||
| 45 | (let ((repo-config (mailing-list-config ml))) | ||
| 46 | (if (eq? %unset-value (l2md-repo-maildir repo-config)) | ||
| 47 | (l2md-repo | ||
| 48 | (inherit repo-config) | ||
| 49 | (maildir (string-append | ||
| 50 | mail-dir "/lists/" (mailing-list-fqda ml) "/archive"))) | ||
| 51 | repo-config))) | ||
| 52 | ;; <https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/l2md.git/about/> | ||
| 53 | ;; Applying patches <https://git.kyleam.com/piem/about/> | ||
| 54 | |||
| 55 | (define add-ml-tag | ||
| 56 | (map (lambda (x) | ||
| 57 | (format | ||
| 58 | #f "notmuch tag +~a -- path:lists/~a/**" | ||
| 59 | ;; TODO: Use new tag not to retag already existing entities. | ||
| 60 | ;; Do it before new tag will be romved | ||
| 61 | ;; TODO: Fix order of items in post-new hook | ||
| 62 | (mailing-list-id x) (mailing-list-fqda x))) | ||
| 63 | mls)) | ||
| 64 | |||
| 65 | (list | ||
| 66 | (simple-service | ||
| 67 | 'l2md-add-tags-to-mailing-list | ||
| 68 | home-notmuch-service-type | ||
| 69 | (home-notmuch-extension | ||
| 70 | (post-new | ||
| 71 | (list | ||
| 72 | #~(begin (for-each system '#$add-ml-tag)))))) | ||
| 73 | |||
| 74 | (service | ||
| 75 | home-l2md-service-type | ||
| 76 | (home-l2md-configuration | ||
| 77 | (l2md l2md) | ||
| 78 | (oneshot 1) | ||
| 79 | (repos (map get-repo-config mls)))))) | ||
| 80 | |||
| 81 | (feature | ||
| 82 | (name 'l2md) | ||
| 83 | (home-services-getter get-home-services) | ||
| 84 | (values `((l2md . ,l2md))))) | ||
| 85 | |||
| 86 | (define* (feature-mail-mcron | ||
| 87 | #:key | ||
| 88 | (time-spec '(next-minute | ||
| 89 | (range 0 60 20)))) | ||
| 90 | "Configure mcron to invoke other email commands based on the other | ||
| 91 | features that have been enabled." | ||
| 92 | (define (get-home-services config) | ||
| 93 | (list | ||
| 94 | (when (get-value 'isync config) | ||
| 95 | (let* ((sync-cmd (list `(,((get-value 'mbsync config) config) "-a"))) | ||
| 96 | (notmuch-cmd (if (get-value 'notmuch config) | ||
| 97 | (list `(,(file-append (get-value 'notmuch config) "/bin/notmuch") | ||
| 98 | "new")) | ||
| 99 | (list))) | ||
| 100 | (l2md-cmd (if (get-value 'l2md config) | ||
| 101 | (list `(,(file-append (get-value 'l2md config) "/bin/l2md"))) | ||
| 102 | (list)))) | ||
| 103 | (simple-service | ||
| 104 | 'isync-mcron-job | ||
| 105 | home-mcron-service-type | ||
| 106 | (list | ||
| 107 | #~(job '#$time-spec | ||
| 108 | (lambda () | ||
| 109 | (setenv "DISPLAY" ":0") | ||
| 110 | #$@(map (lambda (x) `(system* ,@x)) | ||
| 111 | (append sync-cmd l2md-cmd notmuch-cmd)))))))))) | ||
| 112 | |||
| 113 | (feature | ||
| 114 | (name 'mail-mcron) | ||
| 115 | (home-services-getter get-home-services))) | ||
diff --git a/src/jd/features/networking.scm b/src/jd/features/networking.scm new file mode 100644 index 0000000..59eeb90 --- /dev/null +++ b/src/jd/features/networking.scm | |||
| @@ -0,0 +1,81 @@ | |||
| 1 | (define-module (jd features networking) | ||
| 2 | #:use-module (rde features) | ||
| 3 | #:use-module (rde predicates) | ||
| 4 | |||
| 5 | #:use-module (gnu services) | ||
| 6 | #:use-module (gnu home services) | ||
| 7 | #:use-module (gnu home services shepherd) | ||
| 8 | #:use-module (rde home services i2p) | ||
| 9 | #:use-module (gnu services networking) | ||
| 10 | #:use-module (gnu system nss) | ||
| 11 | ;; #:use-module (rde system services networking) | ||
| 12 | #:use-module (rde system services accounts) | ||
| 13 | |||
| 14 | #:use-module (gnu packages i2p) | ||
| 15 | #:use-module (gnu packages networking) | ||
| 16 | #:use-module (gnu packages ssh) | ||
| 17 | #:use-module (gnu packages gnome) | ||
| 18 | #:use-module (rde packages) | ||
| 19 | |||
| 20 | #:use-module (guix gexp) | ||
| 21 | |||
| 22 | #:export (feature-networking*)) | ||
| 23 | |||
| 24 | (define* (feature-networking* | ||
| 25 | #:key | ||
| 26 | (iwd-autoconnect? #t) | ||
| 27 | (network-manager network-manager) | ||
| 28 | (network-manager-applet network-manager-applet) | ||
| 29 | (network-manager-vpn-plugins '()) | ||
| 30 | mdns?) | ||
| 31 | "Configure iwd and everything." | ||
| 32 | (ensure-pred file-like? network-manager) | ||
| 33 | (ensure-pred file-like? network-manager-applet) | ||
| 34 | |||
| 35 | (define f-name 'networking) | ||
| 36 | (define (get-home-services config) | ||
| 37 | |||
| 38 | (list | ||
| 39 | (simple-service 'network-manager-applet-package | ||
| 40 | home-profile-service-type | ||
| 41 | (list network-manager-applet)) | ||
| 42 | ;; TODO: Disable nm-applet notification by default | ||
| 43 | ;; gsettings set org.gnome.nm-applet disable-connected-notifications true | ||
| 44 | (simple-service | ||
| 45 | 'networking-nm-applet-shepherd-service | ||
| 46 | home-shepherd-service-type | ||
| 47 | (list | ||
| 48 | (shepherd-service | ||
| 49 | (provision '(nm-applet)) | ||
| 50 | (requirement '(dbus)) | ||
| 51 | (stop #~(make-kill-destructor)) | ||
| 52 | (start #~(make-forkexec-constructor | ||
| 53 | (list #$(file-append network-manager-applet "/bin/nm-applet") | ||
| 54 | "--indicator") | ||
| 55 | #:log-file (string-append | ||
| 56 | (getenv "XDG_STATE_HOME") "/log" | ||
| 57 | "/nm-applet.log")))))))) | ||
| 58 | |||
| 59 | (define (get-system-services config) | ||
| 60 | (list | ||
| 61 | (service network-manager-service-type | ||
| 62 | (network-manager-configuration | ||
| 63 | (network-manager network-manager) | ||
| 64 | (vpn-plugins network-manager-vpn-plugins) | ||
| 65 | (shepherd-requirement '(iwd)))) | ||
| 66 | (service (@@ (rde system services networking) iwd-service-type) | ||
| 67 | ((@@ (rde system services networking) iwd-configuration) | ||
| 68 | (main-conf | ||
| 69 | `((Settings ((AutoConnect . ,iwd-autoconnect?))))))) | ||
| 70 | (service modem-manager-service-type) | ||
| 71 | (service usb-modeswitch-service-type))) | ||
| 72 | |||
| 73 | (feature | ||
| 74 | (name f-name) | ||
| 75 | (values `((,f-name . #t) | ||
| 76 | ,@(if mdns? | ||
| 77 | `((name-service . ,%mdns-host-lookup-nss) | ||
| 78 | (mdns . #t)) | ||
| 79 | '()))) | ||
| 80 | (home-services-getter get-home-services) | ||
| 81 | (system-services-getter get-system-services))) | ||
diff --git a/src/jd/host.scm b/src/jd/host.scm new file mode 100644 index 0000000..7071a3f --- /dev/null +++ b/src/jd/host.scm | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | (define-module (jd host) | ||
| 2 | #:use-module (rde features base) | ||
| 3 | #:use-module (rde features system) | ||
| 4 | #:use-module (rde features wm) | ||
| 5 | #:use-module (gnu system file-systems) | ||
| 6 | #:use-module (gnu system mapped-devices) | ||
| 7 | #:use-module (ice-9 match)) | ||
| 8 | |||
| 9 | (define-public %host-features | ||
| 10 | (list | ||
| 11 | (feature-host-info | ||
| 12 | #:host-name "berserker" | ||
| 13 | #:timezone "Europe/Warsaw") | ||
| 14 | (feature-file-systems | ||
| 15 | #:mapped-devices (list (mapped-device | ||
| 16 | (source (uuid | ||
| 17 | "1f2b1bf2-89fe-4e2c-8b40-c460572bb776")) | ||
| 18 | (target "crypthome") | ||
| 19 | (type luks-device-mapping))) | ||
| 20 | #:file-systems (list | ||
| 21 | (file-system | ||
| 22 | (mount-point "/") | ||
| 23 | (device (uuid | ||
| 24 | "c895e61e-1a5e-470f-b7aa-a502fc0b8596" | ||
| 25 | 'ext4)) | ||
| 26 | (type "ext4")) | ||
| 27 | (file-system | ||
| 28 | (mount-point "/boot/efi") | ||
| 29 | (device (uuid "9669-0171" | ||
| 30 | 'fat32)) | ||
| 31 | (type "vfat")) | ||
| 32 | (file-system | ||
| 33 | (mount-point "/home") | ||
| 34 | (device "/dev/mapper/crypthome") | ||
| 35 | (type "ext4") | ||
| 36 | (dependencies | ||
| 37 | (list (mapped-device | ||
| 38 | (source (uuid | ||
| 39 | "1f2b1bf2-89fe-4e2c-8b40-c460572bb776")) | ||
| 40 | (target "crypthome") | ||
| 41 | (type luks-device-mapping))))))) | ||
| 42 | (feature-kanshi | ||
| 43 | #:extra-config | ||
| 44 | `((profile laptop ((output eDP-1 enable))) | ||
| 45 | (profile docked ((output eDP-1 disable) | ||
| 46 | (output DP-3 enable))))) | ||
| 47 | (feature-hidpi))) | ||
diff --git a/src/jd/user.scm b/src/jd/user.scm new file mode 100644 index 0000000..7c54a30 --- /dev/null +++ b/src/jd/user.scm | |||
| @@ -0,0 +1,507 @@ | |||
| 1 | (define-module (jd user) | ||
| 2 | #:use-module (gnu home services) | ||
| 3 | #:use-module (gnu home services shepherd) | ||
| 4 | #:use-module (gnu home-services ssh) | ||
| 5 | #:use-module (gnu home services xdg) | ||
| 6 | #:use-module (gnu packages) | ||
| 7 | #:use-module (gnu packages emacs-xyz) | ||
| 8 | #:use-module (gnu packages gnome) | ||
| 9 | #:use-module (gnu packages gnupg) | ||
| 10 | #:use-module (gnu packages guile-xyz) | ||
| 11 | #:use-module (gnu services) | ||
| 12 | #:use-module (gnu services nix) | ||
| 13 | |||
| 14 | #:use-module (guix channels) | ||
| 15 | #:use-module (guix download) | ||
| 16 | #:use-module (guix gexp) | ||
| 17 | #:use-module (guix inferior) | ||
| 18 | #:use-module (guix packages) | ||
| 19 | |||
| 20 | #:use-module (jd features mail) | ||
| 21 | #:use-module (jd features networking) | ||
| 22 | |||
| 23 | #:use-module (nongnu packages linux) | ||
| 24 | #:use-module (nongnu system linux-initrd) | ||
| 25 | |||
| 26 | #:use-module (rde features) | ||
| 27 | #:use-module (rde packages) | ||
| 28 | #:use-module (rde packages aspell) | ||
| 29 | |||
| 30 | #:use-module (srfi srfi-1)) | ||
| 31 | |||
| 32 | |||
| 33 | (define-syntax-rule (use-rde-features-modules module ...) | ||
| 34 | (use-modules (rde features module) ...)) | ||
| 35 | |||
| 36 | (define-syntax-rule (use-rde-home-services-modules module ...) | ||
| 37 | (use-modules (rde features module) ...)) | ||
| 38 | |||
| 39 | (use-rde-features-modules | ||
| 40 | android base bittorrent clojure containers | ||
| 41 | documentation emacs emacs-xyz finance fontutils | ||
| 42 | gnupg gtk guile image-viewers irc keyboard | ||
| 43 | libreoffice linux llm mail markup networking ocaml | ||
| 44 | password-utils presets security-token shells | ||
| 45 | shellutils sourcehut ssh system terminals tmux uml | ||
| 46 | version-control video virtualization web-browsers wm xdg python) | ||
| 47 | |||
| 48 | (use-rde-home-services-modules | ||
| 49 | emacs shells video wm) | ||
| 50 | |||
| 51 | (define* (mail-acc id user #:optional (type 'migadu)) | ||
| 52 | "Make a simple mail-account with gmail type by default." | ||
| 53 | (mail-account | ||
| 54 | (id id) | ||
| 55 | (fqda user) | ||
| 56 | (type type))) | ||
| 57 | |||
| 58 | (define* (mail-lst id fqda urls) | ||
| 59 | "Make a simple mailing-list." | ||
| 60 | (mailing-list | ||
| 61 | (id id) | ||
| 62 | (fqda fqda) | ||
| 63 | (config (l2md-repo | ||
| 64 | (name (symbol->string id)) | ||
| 65 | (urls urls))))) | ||
| 66 | |||
| 67 | (define-public %base-features | ||
| 68 | (list | ||
| 69 | (feature-backlight #:step 10) | ||
| 70 | (feature-networking* #:network-manager-vpn-plugins (list network-manager-openvpn) | ||
| 71 | #:mdns? #t) | ||
| 72 | (feature-base-services) | ||
| 73 | (feature-base-packages) | ||
| 74 | (feature-desktop-services) | ||
| 75 | (feature-xdg | ||
| 76 | #:xdg-user-directories-configuration | ||
| 77 | (home-xdg-user-directories-configuration | ||
| 78 | (music "$HOME/music") | ||
| 79 | (videos "$HOME/videos") | ||
| 80 | (pictures "$HOME/pictures") | ||
| 81 | (documents "$HOME/documents") | ||
| 82 | (download "$HOME/downloads") | ||
| 83 | (publicshare "$HOME/sync") | ||
| 84 | (desktop "$HOME") | ||
| 85 | (templates "$HOME"))) | ||
| 86 | (feature-pipewire) | ||
| 87 | (feature-shepherd))) | ||
| 88 | |||
| 89 | (define-public %desktop-features | ||
| 90 | (list | ||
| 91 | (feature-sway-run-on-tty #:sway-tty-number 2) | ||
| 92 | (feature-gtk3 #:gtk-theme (make-theme "Adwaita-dark" gnome-themes-extra)) | ||
| 93 | (feature-fonts #:default-font-size 14) | ||
| 94 | (feature-transmission #:auto-start? #f) | ||
| 95 | (feature-sway | ||
| 96 | #:extra-config | ||
| 97 | '((input type:touchpad | ||
| 98 | ((tap enabled) | ||
| 99 | (middle_emulation enabled))) | ||
| 100 | (workspace_layout tabbed) | ||
| 101 | (bindsym $mod+q layout tabbed) | ||
| 102 | (bindsym $mod+a layout stacking) | ||
| 103 | (bindsym $mod+z layout toggle split) | ||
| 104 | (default_border none) | ||
| 105 | (default_floating_border pixel 3) | ||
| 106 | ;; (default_border normal 3) | ||
| 107 | ;; (default_floating_border normal 3) | ||
| 108 | ;; (gaps inner 0) | ||
| 109 | (output * bg "#181818" solid_color) | ||
| 110 | (client.focused "#181818" "#383838" "#d8d8d8" "#7cafc2") | ||
| 111 | (client.focused_inactive "#181818" "#282828" "#b8b8b8" "#7cafc2") | ||
| 112 | (client.unfocused "#181818" "#282828" "#b8b8b8" "#7cafc2") | ||
| 113 | (client.urgent "#181818" "#ab4642" "#f8f8f8" "#181818") | ||
| 114 | (bindsym $mod+h focus left) | ||
| 115 | (bindsym $mod+j focus down) | ||
| 116 | (bindsym $mod+k focus up) | ||
| 117 | (bindsym $mod+l focus right) | ||
| 118 | |||
| 119 | (unbindsym --to-code $mod+Shift+l) | ||
| 120 | (bindsym --to-code $mod+Escape exec $lock) | ||
| 121 | |||
| 122 | (bindsym $mod+Shift+h move left) | ||
| 123 | (bindsym $mod+Shift+j move down) | ||
| 124 | (bindsym $mod+Shift+k move up) | ||
| 125 | (bindsym $mod+Shift+l move right))) | ||
| 126 | (feature-waybar | ||
| 127 | ;; #:base16-css base16-solarized-dark | ||
| 128 | #:waybar-modules | ||
| 129 | (list | ||
| 130 | (waybar-sway-workspaces | ||
| 131 | #:format-icons | ||
| 132 | `(,@(map | ||
| 133 | (lambda (x) (cons | ||
| 134 | (number->string x) | ||
| 135 | (number->string x))) | ||
| 136 | (iota 10 1)) | ||
| 137 | ("urgent" . ) | ||
| 138 | ("default" . ))) | ||
| 139 | (waybar-idle-inhibitor) | ||
| 140 | (waybar-temperature) | ||
| 141 | (waybar-cpu) | ||
| 142 | (waybar-battery #:intense? #f) | ||
| 143 | (waybar-tray) | ||
| 144 | (waybar-clock))) | ||
| 145 | (feature-foot) | ||
| 146 | (feature-yt-dlp) | ||
| 147 | (feature-libreoffice) | ||
| 148 | (feature-emacs-power-menu) | ||
| 149 | (feature-sway-screenshot) | ||
| 150 | (feature-swaynotificationcenter) | ||
| 151 | (feature-swayidle) | ||
| 152 | (feature-swaylock) | ||
| 153 | (feature-batsignal) | ||
| 154 | (feature-imv) | ||
| 155 | (feature-mpv) | ||
| 156 | (feature-librewolf) | ||
| 157 | (feature-ledger))) | ||
| 158 | |||
| 159 | (define-public %mail-features | ||
| 160 | (list | ||
| 161 | (feature-isync #:isync-verbose #t) | ||
| 162 | (feature-mail-mcron) | ||
| 163 | (feature-l2md*) | ||
| 164 | (feature-msmtp))) | ||
| 165 | |||
| 166 | (define-public %cli-features | ||
| 167 | (list | ||
| 168 | (feature-zsh #:enable-zsh-autosuggestions? #t) | ||
| 169 | (feature-git #:extra-config '((gpg ((program . "gpg"))))) | ||
| 170 | (feature-manpages) | ||
| 171 | (feature-vterm) | ||
| 172 | (feature-bash) | ||
| 173 | (feature-direnv) | ||
| 174 | (feature-guile) | ||
| 175 | (feature-ssh))) | ||
| 176 | |||
| 177 | (define* (feature-emacs-personal-config) | ||
| 178 | (define f-name 'personal-emacs-config) | ||
| 179 | |||
| 180 | (define (get-home-services config) | ||
| 181 | (list | ||
| 182 | (rde-elisp-configuration-service | ||
| 183 | f-name | ||
| 184 | config | ||
| 185 | `((with-eval-after-load 'geiser-mode | ||
| 186 | (defun jd/guix-repl () | ||
| 187 | (interactive) | ||
| 188 | (let ((geiser-guile-binary '("guix" "repl")) | ||
| 189 | (geiser-guile-load-path (cons "~/dotfiles/rde" geiser-guile-load-path))) | ||
| 190 | (geiser 'guile)))) | ||
| 191 | |||
| 192 | (with-eval-after-load 'notmuch | ||
| 193 | (setq-default notmuch-search-oldest-first nil)) | ||
| 194 | |||
| 195 | (with-eval-after-load 'paredit | ||
| 196 | (defun jd/paredit-RET () | ||
| 197 | "Wraps `paredit-RET' to provide a sensible minibuffer experience" | ||
| 198 | (interactive) | ||
| 199 | (cond | ||
| 200 | ((minibufferp) | ||
| 201 | (read--expression-try-read)) | ||
| 202 | ((and (eq major-mode 'inferior-emacs-lisp-mode) | ||
| 203 | (string-prefix-p "*ielm*" (buffer-name))) | ||
| 204 | (ielm-return)) | ||
| 205 | (t | ||
| 206 | (paredit-RET)))) | ||
| 207 | (bind-key "<return>" 'jd/paredit-RET paredit-mode-map) | ||
| 208 | |||
| 209 | (dolist (hook '(emacs-lisp-mode-hook | ||
| 210 | eval-expression-minibuffer-setup-hook | ||
| 211 | ielm-mode-hook | ||
| 212 | lisp-mode-hook | ||
| 213 | lisp-interaction-mode-hook | ||
| 214 | scheme-mode-hook | ||
| 215 | clojure-mode-hook)) | ||
| 216 | (add-hook hook 'paredit-mode))) | ||
| 217 | |||
| 218 | (with-eval-after-load 'rainbow-delimiters | ||
| 219 | (dolist (hook '(emacs-lisp-mode-hook | ||
| 220 | eval-expression-minibuffer-setup-hook | ||
| 221 | ielm-mode-hook | ||
| 222 | lisp-mode-hook | ||
| 223 | lisp-interaction-mode-hook | ||
| 224 | scheme-mode-hook | ||
| 225 | clojure-mode-hook)) | ||
| 226 | (add-hook hook 'rainbow-delimiters-mode))) | ||
| 227 | |||
| 228 | (with-eval-after-load 'undo-tree | ||
| 229 | (setq-default undo-tree-auto-save-history nil) | ||
| 230 | (global-undo-tree-mode 1)) | ||
| 231 | |||
| 232 | (with-eval-after-load 'multiple-cursors | ||
| 233 | (setq-default mc/always-run-for-all t) | ||
| 234 | (global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines) | ||
| 235 | (global-set-key (kbd "C->") 'mc/mark-next-like-this) | ||
| 236 | (global-set-key (kbd "C-<") 'mc/mark-previous-like-this) | ||
| 237 | (global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this)) | ||
| 238 | |||
| 239 | (with-eval-after-load 'page-break-lines | ||
| 240 | (global-page-break-lines-mode 1)) | ||
| 241 | |||
| 242 | (with-eval-after-load 'gptel | ||
| 243 | (setq gptel-model 'gpt-4o | ||
| 244 | gptel-backend (gptel-make-gh-copilot "Copilot"))) | ||
| 245 | |||
| 246 | (with-eval-after-load 'simple | ||
| 247 | (add-hook 'after-init-hook (lambda () | ||
| 248 | (delete-selection-mode 1) | ||
| 249 | (pixel-scroll-precision-mode 0) | ||
| 250 | (electric-pair-mode 1) | ||
| 251 | (setq-default truncate-lines t) | ||
| 252 | (setq-default cursor-in-non-selected-windows 'hollow) | ||
| 253 | (setq-default cursor-type 'box) | ||
| 254 | ;; (set-face-attribute 'default nil :height 165) | ||
| 255 | ;; (require 'solarized-theme) | ||
| 256 | (require 'multiple-cursors) | ||
| 257 | (require 'undo-tree) | ||
| 258 | (require 'rainbow-delimiters) | ||
| 259 | (require 'paredit) | ||
| 260 | )) | ||
| 261 | (set-default 'display-fill-column-indicator-column 100) | ||
| 262 | (add-hook 'prog-mode-hook 'display-fill-column-indicator-mode) | ||
| 263 | (setq display-line-numbers-type 'relative) | ||
| 264 | (add-hook 'prog-mode-hook 'display-line-numbers-mode))) | ||
| 265 | #:elisp-packages | ||
| 266 | (strings->packages | ||
| 267 | "emacs-rainbow-mode" | ||
| 268 | "emacs-rainbow-delimiters" | ||
| 269 | "emacs-paredit" | ||
| 270 | "emacs-hl-todo" | ||
| 271 | "emacs-undo-tree" | ||
| 272 | "emacs-multiple-cursors" | ||
| 273 | ;; "emacs-swiper" | ||
| 274 | ;; "emacs-solarized-theme" | ||
| 275 | "emacs-nginx-mode" | ||
| 276 | "emacs-yaml-mode" | ||
| 277 | "emacs-org-present")))) | ||
| 278 | (feature | ||
| 279 | (name f-name) | ||
| 280 | (values `((,f-name . #t))) | ||
| 281 | (home-services-getter get-home-services))) | ||
| 282 | |||
| 283 | (define-public %emacs-features | ||
| 284 | (list | ||
| 285 | (feature-emacs-modus-themes #:headings-scaling? #t | ||
| 286 | #:deuteranopia? #f) | ||
| 287 | (feature-emacs-citation #:global-bibliography (list "/home/jakub/Notes/Roam/references/master.bib")) | ||
| 288 | (feature-emacs-completion #:mini-frame? #f ;; Dziwne kurwa bledy | ||
| 289 | #:marginalia-align 'right) | ||
| 290 | (feature-emacs-corfu #:corfu-doc-auto #f) | ||
| 291 | (feature-emacs #:default-application-launcher? #t) | ||
| 292 | (feature-emacs-elfeed #:elfeed-org-files '("/home/jakub/Notes/Rss.org")) | ||
| 293 | (feature-emacs-erc #:erc-log? #t | ||
| 294 | #:erc-autojoin-channels-alist '((Libera.Chat "#rde") | ||
| 295 | (Libera.Chat "#systemcrafters") | ||
| 296 | (Libera.Chat "#lisp-pl") | ||
| 297 | (Libera.Chat "#hsp"))) | ||
| 298 | (feature-emacs-keycast #:turn-on? #f) | ||
| 299 | (feature-emacs-org-agenda #:org-agenda-files '("/home/jakub/Notes/Me.org" "/home/jakub/Notes/Work.org")) | ||
| 300 | (feature-emacs-org-dailies #:encrypted? #t) | ||
| 301 | (feature-emacs-org #:org-directory "/home/jakub/Notes" | ||
| 302 | #:org-indent? #f) | ||
| 303 | (feature-emacs-org-roam #:org-roam-directory "/home/jakub/Notes/Roam/slip-box") | ||
| 304 | (feature-emacs-spelling #:spelling-program (@ (gnu packages hunspell) hunspell) | ||
| 305 | #:spelling-dictionaries (list (@ (gnu packages hunspell) hunspell-dict-en) | ||
| 306 | (@ (gnu packages hunspell) hunspell-dict-pl)) | ||
| 307 | #:ispell-standard-dictionary "pl_PL") | ||
| 308 | (feature-emacs-dired #:extra-switches "-h") | ||
| 309 | (feature-emacs-appearance) | ||
| 310 | (feature-emacs-dashboard) | ||
| 311 | (feature-emacs-eglot) | ||
| 312 | (feature-emacs-eshell) | ||
| 313 | (feature-emacs-git) | ||
| 314 | (feature-emacs-gptel) | ||
| 315 | (feature-emacs-guix) | ||
| 316 | (feature-emacs-message) | ||
| 317 | (feature-emacs-monocle) | ||
| 318 | (feature-emacs-nov-el) | ||
| 319 | (feature-emacs-pdf-tools) | ||
| 320 | (feature-emacs-personal-config) | ||
| 321 | (feature-emacs-project) | ||
| 322 | (feature-emacs-time) | ||
| 323 | (feature-emacs-tramp) | ||
| 324 | (feature-emacs-vertico) | ||
| 325 | (feature-emacs-webpaste) | ||
| 326 | (feature-emacs-which-key) | ||
| 327 | (feature-emacs-battery) | ||
| 328 | (feature-notmuch) | ||
| 329 | (feature-plantuml) | ||
| 330 | (feature-compile))) | ||
| 331 | |||
| 332 | (define %dev-features | ||
| 333 | (list | ||
| 334 | (feature-android) | ||
| 335 | (feature-clojure) | ||
| 336 | (feature-markdown) | ||
| 337 | (feature-python))) | ||
| 338 | |||
| 339 | (define %virtualization-features | ||
| 340 | (list | ||
| 341 | (feature-distrobox) | ||
| 342 | (feature-podman) | ||
| 343 | (feature-qemu))) | ||
| 344 | |||
| 345 | (define (feature-ssh-extra-config) | ||
| 346 | (feature-custom-services | ||
| 347 | #:feature-name-prefix 'jd-ssh-extra-config | ||
| 348 | #:home-services | ||
| 349 | (list | ||
| 350 | (simple-service | ||
| 351 | 'ssh-extra-config | ||
| 352 | home-ssh-service-type | ||
| 353 | (home-ssh-extension | ||
| 354 | (extra-config | ||
| 355 | (append | ||
| 356 | (list | ||
| 357 | (ssh-host | ||
| 358 | (host "jdlugosz.com") | ||
| 359 | (options | ||
| 360 | '((user . "root") | ||
| 361 | (port . 22) | ||
| 362 | (compression . #t)))) | ||
| 363 | (ssh-host | ||
| 364 | (host "amg.abaks.pl") | ||
| 365 | (options | ||
| 366 | '((user . "serwis") | ||
| 367 | (port . 22) | ||
| 368 | (compression . #t)))) | ||
| 369 | (ssh-host | ||
| 370 | (host "wifi-dev.abaks.pl") | ||
| 371 | (options | ||
| 372 | '((user . "serwis") | ||
| 373 | (port . 22) | ||
| 374 | (compression . #t))))))) | ||
| 375 | (toplevel-options | ||
| 376 | '((host-key-algorithms . "+ssh-rsa") | ||
| 377 | (pubkey-accepted-key-types . "+ssh-rsa")))))))) | ||
| 378 | |||
| 379 | (define (feature-additional-services) | ||
| 380 | (feature-custom-services | ||
| 381 | #:feature-name-prefix 'jd-additional-services | ||
| 382 | #:system-services | ||
| 383 | (list (service nix-service-type)) | ||
| 384 | #:home-services | ||
| 385 | (list | ||
| 386 | (simple-service | ||
| 387 | 'home-environment-extra-variables | ||
| 388 | home-environment-variables-service-type | ||
| 389 | '(("XDG_DATA_DIRS" . "$XDG_DATA_DIRS:$HOME/.local/share/flatpak/exports/share"))) | ||
| 390 | ;; (simple-service | ||
| 391 | ;; 'home-nextcloud-package | ||
| 392 | ;; home-profile-service-type | ||
| 393 | ;; (list | ||
| 394 | ;; (@@ (gnu packages sync) nextcloud-client))) | ||
| 395 | (simple-service | ||
| 396 | 'nextcloud-shepherd-service | ||
| 397 | home-shepherd-service-type | ||
| 398 | (list | ||
| 399 | (shepherd-service | ||
| 400 | (provision `(nextcloud)) | ||
| 401 | (auto-start? #t) | ||
| 402 | (stop #~(make-kill-destructor)) | ||
| 403 | (start #~(make-forkexec-constructor | ||
| 404 | (list #$(program-file | ||
| 405 | "nextcloud" | ||
| 406 | #~(begin | ||
| 407 | (setenv "QT_QPA_PLATFORM" "wayland-egl;xcb") | ||
| 408 | (apply system* | ||
| 409 | (list | ||
| 410 | #$(file-append (@ (gnu packages sync) nextcloud-client) "/bin/nextcloud"))))))))))) | ||
| 411 | ;; (simple-service | ||
| 412 | ;; 'home-nextcloud-daemon) | ||
| 413 | (simple-service | ||
| 414 | 'home-profile-extra-packages | ||
| 415 | home-profile-service-type | ||
| 416 | (append | ||
| 417 | (list | ||
| 418 | (@ (gnu packages tree-sitter) tree-sitter-clojure) | ||
| 419 | (@ (gnu packages tree-sitter) tree-sitter-html)) | ||
| 420 | (strings->packages | ||
| 421 | "figlet" | ||
| 422 | "calibre" | ||
| 423 | |||
| 424 | "libnotify" | ||
| 425 | |||
| 426 | "flatpak" | ||
| 427 | |||
| 428 | "alsa-utils" | ||
| 429 | "pavucontrol" | ||
| 430 | "imagemagick" | ||
| 431 | "obs" "obs-wlrobs" | ||
| 432 | "binutils" "make" "gdb" | ||
| 433 | |||
| 434 | "hicolor-icon-theme" "adwaita-icon-theme" | ||
| 435 | "gnome-themes-extra" "papirus-icon-theme" | ||
| 436 | "arc-theme" | ||
| 437 | |||
| 438 | "fd" | ||
| 439 | "nautilus" | ||
| 440 | "qbittorrent" | ||
| 441 | "kdenlive" "gimp" | ||
| 442 | "blender" | ||
| 443 | |||
| 444 | "ripgrep" "curl")))))) | ||
| 445 | |||
| 446 | (define-public (feature-nonfree-kernel) | ||
| 447 | (feature-kernel | ||
| 448 | #:kernel linux | ||
| 449 | #:firmware (list linux-firmware) | ||
| 450 | #:initrd microcode-initrd)) | ||
| 451 | |||
| 452 | (define-public %all-features | ||
| 453 | (append | ||
| 454 | %base-features | ||
| 455 | %cli-features | ||
| 456 | %desktop-features | ||
| 457 | %dev-features | ||
| 458 | %emacs-features | ||
| 459 | %mail-features | ||
| 460 | %virtualization-features)) | ||
| 461 | |||
| 462 | (define-public %user-features | ||
| 463 | (append | ||
| 464 | %all-features | ||
| 465 | (list | ||
| 466 | (feature-user-info | ||
| 467 | #:user-name "jakub" | ||
| 468 | #:full-name "Jakub Dlugosz" | ||
| 469 | #:email "me@jdlugosz.com" | ||
| 470 | #:user-initial-password-hash | ||
| 471 | "$6$C6xUaxw3xOpsPrBF$/nmP.SXpzoAYGu7CrcIMQ02S4f8QDNZTuAyaIZusmz4e3xXTdSYpt8D1WCaLXcAuhVJA5llPf9MH7L1TTlgG81" | ||
| 472 | #:emacs-advanced-user? #t) | ||
| 473 | (feature-gnupg | ||
| 474 | #:gpg-primary-key "83AD9E56AE266488CA2F2598BACE123052C9E77A") | ||
| 475 | (feature-security-token) | ||
| 476 | (feature-password-store | ||
| 477 | #:password-store-directory "/home/jakub/.password-store" | ||
| 478 | #:remote-password-store-url "ssh://git@jdlugosz.com:passwords") | ||
| 479 | (feature-mail-settings | ||
| 480 | #:mail-directory-fn (lambda (config) | ||
| 481 | (string-append (get-value 'home-directory config) "/Mail")) | ||
| 482 | #:mail-accounts (list | ||
| 483 | (mail-account | ||
| 484 | (id 'work) | ||
| 485 | (type 'migadu) | ||
| 486 | (fqda "me@jdlugosz.com") | ||
| 487 | (aliases '("admin@jdlugosz.com" "postmaster@jdlugosz.com")) | ||
| 488 | (pass-cmd "pass show mail/me@jdlugosz.com"))) | ||
| 489 | #:mailing-lists (list (mail-lst 'guile-devel "guile-devel@gnu.org" | ||
| 490 | '("https://yhetil.org/guile-devel/0")) | ||
| 491 | (mail-lst 'guix-devel "guix-devel@gnu.org" | ||
| 492 | '("https://yhetil.org/guix-devel/0")) | ||
| 493 | (mail-lst 'guix-bugs "guix-bugs@gnu.org" | ||
| 494 | '("https://yhetil.org/guix-bugs/0")) | ||
| 495 | (mail-lst 'guix-patches "guix-patches@gnu.org" | ||
| 496 | '("https://yhetil.org/guix-patches/1")))) | ||
| 497 | (feature-irc-settings #:irc-accounts (list | ||
| 498 | (irc-account | ||
| 499 | (id 'libera) | ||
| 500 | (network "irc.libera.chat") | ||
| 501 | (nick "jdlugosz963")))) | ||
| 502 | (feature-sourcehut | ||
| 503 | #:user-name-fn (const "jdlugosz963")) | ||
| 504 | (feature-keyboard | ||
| 505 | #:keyboard-layout (keyboard-layout "pl")) | ||
| 506 | (feature-ssh-extra-config) | ||
| 507 | (feature-additional-services)))) | ||
