aliquote.org

Latest micro-posts

You can also also view the full archives of micro-posts. Longer blog posts are available in the Articles section.

2025-08-27 09:07 #

Now playing from Apple Music right into Tmux status line!

img

Put this script somewhere in your $PATH:

#!/bin/sh
unset title

title=$(osascript -e 'if application "Music" is running then' -e 'tell application "Music" to get name of current track' -e 'end if')
artist=$(osascript -e 'if application "Music" is running then' -e 'tell application "Music" to get artist of current track' -e 'end if')

if ${title+"true"}; then echo "$artist$title"; fi

If you don’t mind using the -e switch as your line separator; otherwise just write a .scpt file and load it directly.

See this gist for a more elaborated solution that accounts for both Cmus and Apple Music.

2025-08-25 11:32 #

Tonight I updated my default colorscheme (quiet) in Neovim when I noticed there was a monochrome version. Since we cannot set t_Co in Neovim, I create a user colorscheme named morequiet using these specs only. I added a few tweaks for diff mode (I like the look’n feel of the quiet colors in this case) and TODO-like @comment.* identified by Treesitter. So far so good. #vim

2025-08-25 11:30 #

Everything Is Correlated. Great article, as always, full of historical references.

2025-08-21 21:23 #

Recently I settled on glow and doxx. See also Terminal Trove.

2025-08-21 16:19 #

No more Python or Bash or Javascript to fetch title or other metadata from Youtube link required if you have yt-dlp installed on your system:

img

2025-08-21 16:18 #

More importantly, though, feed readers put your subscriptions under your control. There’s no risk that the administrator of an RSS feed sells your details to spammers, or accidentally leaks them like the aforementioned world renowned expert on account information leaks, because there’s no administrator. If you decide you don’t want to see a particular feed any more, you just instruct your reader to stop fetching it. There’s no sending of mail or clicking of unsubscribe links. Nothing changes in the content creator’s system; they don’t even need to know it happened. — Really Simple Syndication

2025-08-21 16:10 #

Mavericks Forever. This reminded me that I still have my old MacBook Pro from late 2013, which came with Mavericks pre-installed. I ended up my Apple journey with Mojave running on a Macbook 12”, which has always been my preferred version of OSX, and one of the best laptop I used to use over the years. Now the MBP is waiting for Ubuntu to upgrade thousand of packages (I haven’t used it for two years now) before I perform a do-release-upgrade.

2025-08-20 09:01 #

I recently switched to vi keymap for Zsh. Here are some useful remapping to make it feels smoother:

bindkey -M vicmd '~' vi-swap-case
bindkey -M vicmd 'u' undo
bindkey -M vicmd 'U' redo
bindkey -M vicmd "?" history-incremental-pattern-search-backward
bindkey -M vicmd "/" history-incremental-pattern-search-forward

bindkey -M viins '^?' backward-delete-char # backspace
bindkey -M viins '^[[Z' reverse-menu-complete # shift-tab
bindkey -M viins '^a' beginning-of-line
bindkey -M viins '^e' end-of-line
bindkey -M viins '^h' backward-delete-char
bindkey -M viins '^k' kill-line
bindkey -M viins '^n' down-history
bindkey -M viins '^p' up-history
bindkey -M viins '^u' backward-kill-line
bindkey -M viins '^w' backward-delete-word
bindkey -M viins '^y' yank

autoload -U edit-command-line
zle -N edit-command-line
bindkey '^f' edit-command-line

I don’t use ^r for backward search since it is managed by Fzf directly.

And in Tmux:

bind -T copy-mode-vi u send-keys -X halfpage-up
bind -T copy-mode-vi d send-keys -X halfpage-down
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi C-l send-keys -X clear-selection
bind -T copy-mode-vi y send-keys -X copy-selection-and-cancel
bind -T copy-mode-vi 'C-v' send-keys -X rectangle-toggle \; send -X begin-selection
bind -T copy-mode-vi n send-keys -X search-forward "» "
bind -T copy-mode-vi p send-keys -X search-backward "» "
bind -T copy-mode-vi / command-prompt -i -I "#{pane_search_string}" -p "(search down)" { send -X search-forward-incremental '%%%' }
bind -T copy-mode-vi ? command-prompt -i -I "#{pane_search_string}" -p "(search up)" { send -X search-backward-incremental '%%%' }
%if "#{!=:$EDITOR,}"
set editor $EDITOR
bind -T copy-mode-vi C-f send-keys -X pipe-and-cancel 'xargs -I% tmux send-keys $EDITOR Space % Enter'
%endif

Which means in both case you can edit a command or a visual selection in your $EDITOR using ^f.

2025-08-19 22:00 #

/me is listening to “Facility Girls” by Soft Cell