summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2024-03-06 14:59:00 -0500
committerBenjamin Chausse <benjamin@chausse.xyz>2024-03-06 14:59:00 -0500
commit03dd8b3cd8d03300ee85377ea40fa486819d2ebc (patch)
treecdeffd7721bb73918184a83c2f9c034142381564
parentb9581d702f388489725ff7d5a7394009124b5154 (diff)
Update shortcutgen env and misc others
-rw-r--r--.Xresources2
-rw-r--r--.config/mutt/accounts/benjamin@chausse.xyz.muttrc79
-rw-r--r--.config/mutt/my-configs29
-rwxr-xr-x.local/bin/dropdowntoggle18
-rwxr-xr-x.local/bin/shortcutgen4
-rwxr-xr-x.local/bin/upsite27
-rw-r--r--.profile7
7 files changed, 125 insertions, 41 deletions
diff --git a/.Xresources b/.Xresources
index d03696e..5068056 100644
--- a/.Xresources
+++ b/.Xresources
@@ -32,7 +32,7 @@
*color7: #c5c8c6
*color15: #c0c7ca
!other
-*background: #222d32
+*background: #111a1f
*foreground: #acb3b5
*cursorColor: #ebcb88
! See "highlightColorMode" and "hm" options in XTerm manual page.
diff --git a/.config/mutt/accounts/benjamin@chausse.xyz.muttrc b/.config/mutt/accounts/benjamin@chausse.xyz.muttrc
new file mode 100644
index 0000000..99ffd4a
--- /dev/null
+++ b/.config/mutt/accounts/benjamin@chausse.xyz.muttrc
@@ -0,0 +1,79 @@
+# vim: filetype=neomuttrc
+# muttrc file for account benjamin@chausse.xyz
+set realname = "Benjamin Chausse"
+set from = "benjamin@chausse.xyz"
+set sendmail = "msmtp -a benjamin@chausse.xyz"
+alias me Benjamin Chausse <benjamin@chausse.xyz>
+set folder = "/home/master/.local/share/mail/benjamin@chausse.xyz"
+set header_cache = /home/master/.cache/mutt-wizard/benjamin@chausse.xyz/headers
+set message_cachedir = /home/master/.cache/mutt-wizard/benjamin@chausse.xyz/bodies
+set mbox_type = Maildir
+set hostname = "chausse.xyz"
+source /usr/share/mutt-wizard/switch.muttrc
+set spoolfile = +INBOX
+set postponed = +Drafts
+set trash = +Trash
+set record = +Sent
+
+set crypt_use_gpgme = yes
+set pgp_default_key = "ABC4A5A7430D6309ACBD219044F94DD6456590C3"
+set pgp_sign_as = "ABC4A5A7430D6309ACBD219044F94DD6456590C3"
+
+macro index o "<shell-escape>mw -y benjamin@chausse.xyz<enter>" "run mbsync to sync benjamin@chausse.xyz"
+macro index \eg "<enter-command>unset wait_key<enter><shell-escape>gpg --list-secret-keys; printf 'Enter email ID of user to publish: '; read eID; printf 'Enter fingerprint of GPG key to publish: '; read eFGPT; /usr/libexec/gpg-wks-client --create \$eFGPT \$eID | msmtp --read-envelope-from --read-recipients -a benjamin@chausse.xyz<enter>" "publish GPG key to WKS provider"
+macro index \eh "<pipe-message>/usr/libexec/gpg-wks-client --receive | msmtp --read-envelope-from --read-recipients -a benjamin@chausse.xyz<enter>" "confirm GPG publication"
+
+mailboxes "=Trash" "=Junk" "=Archives/2030" "=Archives/2029" "=Archives/2028" "=Archives/2027" "=Archives/2026" "=Archives/2025" "=Archives/2024" "=Archives/2023" "=Archives/2022" "=Archives/2021" "=Archives/2020" "=Bills" "=Sent" "=Drafts" "=INBOX"
+
+macro index,pager ga " <change-folder> =Archives/2024<enter>" "go to current year archive"
+macro index,pager Ma ";<save-message> =Archives/2024<enter>" "archive message"
+macro index,pager Ca " <copy-message> =Archives/2024<enter>" "copy message to archive"
+
+macro index,pager g0 " <change-folder> =Archives/2020<enter>" "go to 2020 archives"
+macro index,pager M0 ";<save-message> =Archives/2020<enter>" "move to 2020 archives"
+macro index,pager g0 " <copy-message> =Archives/2020<enter>" "copy to 2020 archives"
+
+macro index,pager g1 " <change-folder> =Archives/2021<enter>" "go to 2021 archives"
+macro index,pager M1 ";<save-message> =Archives/2021<enter>" "move to 2021 archives"
+macro index,pager g1 " <change-folder> =Archives/2021<enter>" "copy to 2021 archives"
+
+macro index,pager g2 " <change-folder> =Archives/2022<enter>" "go to 2022 archives"
+macro index,pager M2 ";<save-message> =Archives/2022<enter>" "move to 2022 archives"
+macro index,pager g2 " <change-folder> =Archives/2022<enter>" "copy to 2022 archives"
+
+
+macro index,pager g3 " <change-folder> =Archives/2023<enter>" "go to 2023 archives"
+macro index,pager M3 ";<save-message> =Archives/2023<enter>" "move to 2023 archives"
+macro index,pager g3 " <change-folder> =Archives/2023<enter>" "copy to 2023 archives"
+
+
+macro index,pager g4 " <change-folder> =Archives/2024<enter>" "go to 2024 archives"
+macro index,pager M4 ";<save-message> =Archives/2024<enter>" "move to 2024 archives"
+macro index,pager g4 " <change-folder> =Archives/2024<enter>" "copy to 2024 archives"
+
+
+macro index,pager g5 " <change-folder> =Archives/2025<enter>" "go to 2025 archives"
+macro index,pager M5 ";<save-message> =Archives/2025<enter>" "move to 2025 archives"
+macro index,pager g5 " <change-folder> =Archives/2025<enter>" "copy to 2025 archives"
+
+
+macro index,pager g6 " <change-folder> =Archives/2026<enter>" "go to 2026 archives"
+macro index,pager M6 ";<save-message> =Archives/2026<enter>" "move to 2026 archives"
+macro index,pager g6 " <change-folder> =Archives/2026<enter>" "copy to 2026 archives"
+
+
+macro index,pager g7 " <change-folder> =Archives/2027<enter>" "go to 2027 archives"
+macro index,pager M7 ";<save-message> =Archives/2027<enter>" "move to 2027 archives"
+macro index,pager g7 " <change-folder> =Archives/2027<enter>" "copy to 2027 archives"
+
+
+macro index,pager g8 " <change-folder> =Archives/2028<enter>" "go to 2028 archives"
+macro index,pager M8 ";<save-message> =Archives/2028<enter>" "move to 2028 archives"
+macro index,pager g8 " <change-folder> =Archives/2028<enter>" "copy to 2028 archives"
+
+
+macro index,pager g9 " <change-folder> =Archives/2029<enter>" "go to 2029 archives"
+macro index,pager M9 ";<save-message> =Archives/2029<enter>" "move to 2029 archives"
+macro index,pager g9 " <change-folder> =Archives/2029<enter>" "copy to 2029 archives"
+
+
diff --git a/.config/mutt/my-configs b/.config/mutt/my-configs
index 831bc67..a84efba 100644
--- a/.config/mutt/my-configs
+++ b/.config/mutt/my-configs
@@ -2,33 +2,4 @@
# Add the following line to your muttrc to have them:
# source $HOME/.config/mutt/my-configs
-# GOOBOOK: {{{
-# goobook let's you use google contacts information.
-# You install it with pip: pip install --user goobook
-# Query emails
-set query_command="goobook query %s"
-# Add email to contacts
-macro index,pager a "<pipe-message>goobook add<return>" "add the sender address to Google contacts"
-
-# Note that if you use an old version of mutt-wizard,
-# you will need to disable abook in it's script:
-# sed -i "s/^set\squery_command.*$//" /usr/share/mutt-wizard/mutt-wizard.muttrc
-# }}}
-
-# PGP Encryption: {{{
-# I want pgp encryption by default when possible.
-# The following line makes this possible:
-set crypt_use_gpgme=yes
-set crypt_autosign = yes
-set pgp_self_encrypt = yes
-set pgp_default_key = 'ABC4A5A7430D6309ACBD219044F94DD6456590C3'
-set pgp_import_command = "gpg --no-verbose --import -v %f"
-# }}}
-
-# Muttprint: {{{
-set print_command="muttprint"
-# Dump all headers
-# macro index p "<display-toggle-weed> <print-message> <display-toggle-weed> <exit>"
-# }}}
-
# vim: filetype=neomuttrc
diff --git a/.local/bin/dropdowntoggle b/.local/bin/dropdowntoggle
index f4a4705..91e834e 100755
--- a/.local/bin/dropdowntoggle
+++ b/.local/bin/dropdowntoggle
@@ -8,11 +8,23 @@
name="$1"
class="dropdown"
title="dropdown_$name"
-active="$(xdotool search --name $title | wc -l)"
+active="$(xdotool search --name "$title" | wc -l)"
shift
+case "$TERMINAL" in
+*st)
+ classflag="-c"
+ titleflag="-t"
+ cmdflag="-e"
+ ;;
+*alacritty)
+ classflag="--class"
+ titleflag="--title"
+ cmdflag="--command"
+ ;;
+esac
case "$active" in
- 0) $TERMINAL --class "dropdown" --title "$title" --command "$@" & ;;
- *) kill -9 `xdotool search --name "$class" getwindowpid` ;;
+0) $TERMINAL "$classflag" "dropdown" "$titleflag" "$title" "$cmdflag" "$@" & ;;
+*) kill -9 "$(xdotool search --name "$class" getwindowpid)" ;;
esac
diff --git a/.local/bin/shortcutgen b/.local/bin/shortcutgen
index ce29ffb..2335a92 100755
--- a/.local/bin/shortcutgen
+++ b/.local/bin/shortcutgen
@@ -16,5 +16,7 @@ echo "$raw" | sed 's/\(.*\),\(.*\),\(.*\)/map g\2 cd \3/' >"$XDG_CONFIG_HOME/lf/
echo "$raw" | sed 's/\(.*\),\(.*\),\(.*\)/alias g\2="cd \3"/' >"$HOME/.cache/zsh-shortcuts"
# Environment variables (read by .profile)
-echo "$raw" | sed 's/\(.*\),\(.*\),\(.*\)/export G\U\2="\3"/' >"$HOME/.cache/env-shortcuts"
+echo "$raw" | sed 's/^\(.*\),\(.*\),/export G\U\2=,/;s/,\(.*\)/\1/' >"$HOME/.cache/env-shortcuts"
+
+
diff --git a/.local/bin/upsite b/.local/bin/upsite
index c6ef404..5b15d21 100755
--- a/.local/bin/upsite
+++ b/.local/bin/upsite
@@ -1,11 +1,28 @@
#!/bin/sh
-sitename="chausse.xyz"
+username="master"
+url="chausse.xyz"
+siteroot="$HOME/Workspace/$url"
-branch="construction"
-
-cd "$HOME/Workspace/$sitename$construction" && git pull origin $branch && git checkout $branch
+case "$1" in
+ -d|--dev)
+ url="dev.$url"
+ destdir="/var/www/dev"
+ branch="master"
+ ;;
+ -m|--main)
+ destdir="/var/www/chausse"
+ branch="construction"
+ ;;
+ *)
+ echo "Usage: upsite [dev|main]"
+ exit 1
+ ;;
+esac
+cd "$siteroot" || exit 1
+git checkout $branch
+git pull
hugo --gc=true --minify
+rsync -aucz --delete --progress "$siteroot/public/" "$username@$url:$destdir"
-rsync -auvz "$HOME/Workspace/$sitename$construction/public/" "master@$sitename:/var/www/chausse"
diff --git a/.profile b/.profile
index b34376e..0055553 100644
--- a/.profile
+++ b/.profile
@@ -27,8 +27,8 @@ export TEXSRC=$HOME/.local/src/sherbrooke-tex
# Applications
export EDITOR=$(which nvim)
export READER=/usr/bin/zathura
-export TERMINAL=/usr/bin/alacritty
-export TERM=/usr/bin/alacritty
+export TERMINAL=/usr/local/bin/st
+export TERM=/usr/local/bin/st
export BROWSER=/usr/bin/firefox
# less/man colors
@@ -45,6 +45,9 @@ export LESS_TERMCAP_ue=$'\e[0m' # end underline
shortcutgen
aliasgen
+# Import shortcut ENV variables
+source "$HOME/.cache/env-shortcuts"
+
# Ensure XDG_RUNTIME_DIR is set
if test -z "$XDG_RUNTIME_DIR"; then
export XDG_RUNTIME_DIR=$(mktemp -d /tmp/$(id -u)-runtime-dir.XXX)