Compare commits

...

7 commits

4 changed files with 66 additions and 29 deletions

View file

@ -10,6 +10,13 @@ if [ -z "$QUERY" ]; then
QUERY=''
fi
# Work around my inability to correctly name the things on my Yubikey :joy:
case "${QUERY}" in
aws*) QUERY="aws" ;;
*otc*) QUERY="otc" ;;
esac
list=$(ykman oath accounts list)
account=$(echo -e "${list}" | fzf -q "$QUERY")
ykman oath accounts code "${account}" | awk '{ print $2 }' | wl-copy
TOKEN=$(ykman oath accounts code "${account}" | awk '{ print $2 }')
swaymsg exec -- wtype -d 150 "${TOKEN}"

View file

@ -11,6 +11,11 @@ export FZF_DEFAULT_OPTS='
'
FOOT_OPTIONS=''
MONITOR_MAKE=$(swaymsg -t get_outputs | jq -r '.[]|select(.focused==true) | .make')
case "${MONITOR_MAKE}" in
"Mediatrix Peripherals Inc") MAX_DIMENSIONS="70x20" ;;
"Dell Inc.") MAX_DIMENSIONS="90x60" ;;
esac
if [[ -z "$1" ]]; then
FZF_DEFAULT_OPTS="--prompt='🦄 '${FZF_DEFAULT_OPTS}"
@ -18,14 +23,14 @@ if [[ -z "$1" ]]; then
elif [[ "$1" == "bookmarks" ]]; then
FZF_DEFAULT_OPTS="--prompt='🔖 '${FZF_DEFAULT_OPTS}"
COMMAND=~/bin/launcher-bookmarks
FOOT_OPTIONS="-W 120x40 ${FOOT_OPTIONS}"
FOOT_OPTIONS="-W ${MAX_DIMENSIONS:-120x40} ${FOOT_OPTIONS}"
elif [[ "$1" == "documents" ]]; then
FZF_DEFAULT_OPTS="--prompt='f '${FZF_DEFAULT_OPTS}"
COMMAND=~/bin/launcher-folder
FOOT_OPTIONS="-W 120x40 ${FOOT_OPTIONS}"
FOOT_OPTIONS="-W ${MAX_DIMENSIONS:-120x40} ${FOOT_OPTIONS}"
elif [[ "$1" == "clipboard" ]]; then
FZF_DEFAULT_OPTS="--prompt='📋 ' --algo=v1 --bind 'tab:up' ${FZF_DEFAULT_OPTS}"
FOOT_OPTIONS="-W 100x30 ${FOOT_OPTIONS}"
FOOT_OPTIONS="-W ${MAX_DIMENSIONS:-100x30} ${FOOT_OPTIONS}"
COMMAND=~/bin/launcher-clipboard
elif [[ "$1" == "gopass" ]]; then
FZF_DEFAULT_OPTS="--prompt='🔑 ' --algo=v1 --bind 'tab:up' ${FZF_DEFAULT_OPTS}"
@ -36,38 +41,38 @@ elif [[ "$1" == "snippets" ]]; then
COMMAND=~/bin/launcher-snippets
elif [[ "$1" == "qutebrowser" ]]; then
FZF_DEFAULT_OPTS="--prompt='🌐'${FZF_DEFAULT_OPTS}"
FOOT_OPTIONS="-W 250x40 ${FOOT_OPTIONS}"
FOOT_OPTIONS="-W ${MAX_DIMENSIONS:-250x40} ${FOOT_OPTIONS}"
COMMAND=~/bin/launcher-qutebrowser
elif [[ "$1" == "zoxide" ]]; then
FOOT_OPTIONS="-W 160x30 ${FOOT_OPTIONS}"
FOOT_OPTIONS="-W ${MAX_DIMENSIONS:-160x30} ${FOOT_OPTIONS}"
FZF_DEFAULT_OPTS="--prompt=' ' --algo=v1 --bind 'tab:up' ${FZF_DEFAULT_OPTS}"
COMMAND=~/bin/launcher-zoxide
elif [[ "$1" == "k8s" ]]; then
FZF_DEFAULT_OPTS="--prompt='󱃾 ' --algo=v1 --bind 'tab:up' ${FZF_DEFAULT_OPTS}"
COMMAND=~/bin/launcher-k8s
elif [[ "$1" == "calc" ]]; then
FOOT_OPTIONS="-W 120x40 ${FOOT_OPTIONS}"
FOOT_OPTIONS="-W ${MAX_DIMENSIONS:-120x40} ${FOOT_OPTIONS}"
FZF_DEFAULT_OPTS="--prompt='🧮 '${FZF_DEFAULT_OPTS}"
COMMAND=~/bin/iqalc
elif [[ "$1" == "emoji" ]]; then
FOOT_OPTIONS="-W 120x40 ${FOOT_OPTIONS}"
FOOT_OPTIONS="-W ${MAX_DIMENSIONS:-120x40} ${FOOT_OPTIONS}"
FZF_DEFAULT_OPTS="--prompt='🐈 '${FZF_DEFAULT_OPTS}"
COMMAND=~/bin/launcher-emoji
elif [[ "$1" == "alfaview-room" ]]; then
FOOT_OPTIONS="-W 120x40 ${FOOT_OPTIONS}"
FOOT_OPTIONS="-W ${MAX_DIMENSIONS:-120x40} ${FOOT_OPTIONS}"
FZF_DEFAULT_OPTS="--prompt='🧮 '${FZF_DEFAULT_OPTS}"
COMMAND=~/bin/alfaview-join-room
elif [[ "$1" == "totp" ]]; then
FOOT_OPTIONS="-W 40x30 ${FOOT_OPTIONS}"
FOOT_OPTIONS="-W ${MAX_DIMENSIONS:-40x30} ${FOOT_OPTIONS}"
FZF_DEFAULT_OPTS="--prompt='⏲️ '${FZF_DEFAULT_OPTS}"
export QUERY="${2}"
COMMAND=~/bin/launcher-totp
elif [[ "$1" == "dmenu" ]]; then
FOOT_OPTIONS="-W 40x30 ${FOOT_OPTIONS}"
FOOT_OPTIONS="-W ${MAX_DIMENSIONS:-40x30} ${FOOT_OPTIONS}"
FZF_DEFAULT_OPTS="--prompt='⏲️ '${FZF_DEFAULT_OPTS}"
COMMAND=~/bin/launcher-dmenu
elif [ -f "${HOME}/bin/launcher-${1}" ]; then
FOOT_OPTIONS="-W 140x30 ${FOOT_OPTIONS}"
FOOT_OPTIONS="-W ${MAX_DIMENSIONS:-140x30} ${FOOT_OPTIONS}"
COMMAND="${HOME}/bin/launcher-${1}"
else
exec foot --app-id launcher --config ~/.config/foot/foot-launcher.ini ~/bin/launcher-run

View file

@ -37,7 +37,7 @@
native-comp-deferred-compilation t)
#+end_src
* TODO Hypergalactic new =init.el= [0/1]
* TODO Hypergalactic new =init.el= [0/2]
This is where I'm at after a few evenings of porting my existing doomemacs configuration over to a bare bones from scratch Emacs (with a little help and inspiration from the [[https://codeberg.org/ashton314/emacs-bedrock][emacs-bedrock]] project).
@ -170,10 +170,12 @@ This is mostly cobbled together from Bedrock Emacs and ~technomancy's better-def
)
#+end_src
** More defaults from bedrock still
** TODO More defaults from bedrock still
Some day I'm going to clean them up. Some day.
- [ ] Only show trailing whitespace when we're in =prog-mode=
#+begin_src emacs-lisp :tangle init.el
;; Save history of minibuffer
(savehist-mode)
@ -227,7 +229,7 @@ And even more from the other bedrock files
(setopt x-underline-at-descent-line nil) ; Prettier underlines
(setopt switch-to-buffer-obey-display-actions t) ; Make switching buffers more consistent
(setopt show-trailing-whitespace t) ; By default, don't underline trailing spaces
(setopt show-trailing-whitespace nil) ; By default, don't underline trailing spaces
(setopt indicate-buffer-boundaries 'left) ; Show buffer top and bottom in the margin
;; Enable horizontal scrolling
@ -395,7 +397,7 @@ Well, which key is it?
#+begin_src emacs-lisp :tangle init.el
(use-package jinx
:hook text-mode prog-mode conf-mode mu4e-compose-mode git-commit-mode
:hook markdown-mode org-mode conf-mode mu4e-compose-mode git-commit-mode
:bind (("M-$" . 'jinx-correct)
("C-M-$" . 'jinx-languages))
:config
@ -865,20 +867,29 @@ Might not even need this since I do have embark now.
*** Prots ef-themes
Gorgeous.
Gorgeous. Pick a theme according to whichever Emacs daemon I'm currently in, so I can actually tell them apart.
#+begin_src emacs-lisp :tangle init.el
(use-package ef-themes
:ensure t
;; :defer t
:init
:config
(setq ef-themes-mixed-fonts t
ef-themes-variable-pitch-ui t)
(mapc #'disable-theme custom-enabled-themes)
(if (string= (daemonp) "workmacs")
(ef-themes-select 'ef-cyprus)
(ef-themes-select 'ef-light))
(cond ((string= (daemonp) "workmacs") (ef-themes-select 'ef-cyprus))
((string= (daemonp) "comacs") (ef-themes-select 'ef-light))
(t (ef-themes-select 'ef-trio-light)))
(when (string= (daemonp) "workmacs")
(set-face-attribute 'mode-line nil
:background nil
:foreground nil
:box '(:line-width 4 :color nil :background nil)
:overline nil
:underline nil))
(when (string= (daemonp) "workmacs")
(set-face-attribute 'mode-line nil
:background "#b7c7ff"
:foreground "#151515"
@ -891,14 +902,28 @@ Gorgeous.
:foreground "#70627f"
:box '(:line-width 4 :color "#dbdbdb")
:overline nil
:underline nil))
(when (string= (daemonp) "comacs")
(set-face-attribute 'mode-line nil
:background "#a5c67f"
:foreground "#142810"
:box '(:line-width 4 :color "#b7c7ff")
:overline nil
:underline nil)
(set-face-attribute 'avy-lead-face nil
:background "deep pink"
:foreground "snow"
:bold t
)
)
(set-face-attribute 'mode-line-inactive nil
:background "#dbdbdb"
:foreground "#70627f"
:box '(:line-width 4 :color "#dbdbdb")
:overline nil
:underline nil))
;; Make sure I actually notice the tiny avy overlay
(set-face-attribute 'avy-lead-face nil
:background "deep pink"
:foreground "snow"
:bold t))
#+end_src
** Olivetti Mode

View file

@ -102,7 +102,7 @@ config.bind('<z><l>', 'spawn --userscript qute-pass --mode gopass -d "fzf-dmenu"
config.bind('<z><u><l>', 'spawn --userscript qute-pass --mode gopass -d "fzf-menu" --username-target secret --username-pattern "user: (.+)" --username-only')
config.bind('<z><p><l>', 'spawn --userscript qute-pass --mode gopass -d "fzf-menu" --username-target secret --username-pattern "user: (.+)" --password-only')
config.bind('<z><o><l>', 'spawn --userscript qute-pass --mode gopass -d "fzf-menu" --username-target secret --username-pattern "user: (.+)" --otp-only')
config.bind('<z><t><l>', 'spawn my-rofi totp {url:host}')
config.bind('<z><t><l>', 'mode-enter insert ;; spawn my-rofi totp {url:host}')
config.bind('ygs', 'spawn get-gitlab-shortcode {url}')
config.bind('ygm', 'spawn get-gitlab-shortcode-as-markdown {url}')