FFFF
Skip to content

Instantly share code, notes, and snippets.

View solanto's full-sized avatar

andrew sòlanto solanto

View GitHub Profile
@solanto
solanto / config.ghostty
Created July 24, 2026 19:00
ghostty config
theme = Ayu
font-family = Fira Code
window-width = 75
window-height = 25
window-padding-x = 8
window-padding-y = 8
window-padding-balance = true
window-vsync = true
alpha-blending = native
background-image-fit = cover
@solanto
solanto / toggle-airplane-mode
Created July 24, 2026 18:25
toggle airplane mode via gdbus
#!/bin/bash
state=$(gdbus call --session --dest org.gnome.SettingsDaemon.Rfkill \
--object-path /org/gnome/SettingsDaemon/Rfkill \
--method org.freedesktop.DBus.Properties.Get \
org.gnome.SettingsDaemon.Rfkill AirplaneMode | awk -F '[<>]' '{print $2}')
new_state="<true>"
[ "$state" = "true" ] && new_state="<false>"
@solanto
solanto / toggle-background
Created July 24, 2026 18:24
toggle ghostty background (hit <ctrl> + <shift> + <,> after)
#!/bin/bash
sed 's/^background-image =/# background-image =/; t quit; s/^# background-image =/background-image =/; : quit' ~/.config/ghostty/config.ghostty -i
@solanto
solanto / cycle-performance-mode
Last active July 24, 2026 18:21
cycle performance modes via ACPI, suitable for GNOME keybinding
#!/bin/bash
# gnome queues up multiple runs if you inevitably hold down a keybinding
# for more than a tick; detect other instances of this program or its
# children (like tee) and exit if any exist
MY_PID=$$
SCRIPT_NAME=$(basename "$0")
RUNNING_INSTANCES=$(pgrep -f "$SCRIPT_NAME" | grep -v "$MY_PID" | wc -l)
@solanto
solanto / dispatcher.d__99-vpn-zone.sh
Created July 24, 2026 03:42
configure VPN on networkmanager changes
#!/bin/bash
INTERFACE=$1
ACTION=$2
TRUSTED_ZONE="trusted"
VPN_NAME="proton-free"
ZONE=$(nmcli -g connection.zone connection show "$INTERFACE" 2>/dev/null)
[ -z "$ZONE" ] && ZONE=$(firewall-cmd --get-zone-of-interface=$INTERFACE 2>/dev/null)
@solanto
solanto / config.json
Created July 10, 2026 16:00
fresh config
{
"languages": {
"markdown": {
"auto_indent": false,
"extensions": [
"md",
"markdown",
"mdx"
],
"filenames": [
abbr -a -- s 'sudo systemctl'
abbr -a -- s- 'systemctl --user'
abbr -a -- nautilus 'nautilus . > /dev/null 2>&1 &'
abbr -a -- ls lsd
abbr -a -- la 'lsd -al'
abbr -a -- sudo -E
abbr -a -- vv 'v -l -al'
abbr -a -- which 'type -p'
abbr -a -- cat bat
0