diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2026-05-08 23:55:30 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2026-05-08 23:55:30 +0200 |
| commit | c4d0e3de7ad04114797abb14368e4a6f8da04a60 (patch) | |
| tree | 5ef72a5dfb5f6b1b15c1c3ac3e2e876bb9398ed2 | |
| parent | 453436ee53cd9935473cf1944dd072281d69a99f (diff) | |
| download | config-c4d0e3de7ad04114797abb14368e4a6f8da04a60.tar.gz config-c4d0e3de7ad04114797abb14368e4a6f8da04a60.zip | |
Updates from alpine
29 files changed, 61 insertions, 371 deletions
diff --git a/.config/alpine-packages b/.config/alpine-packages index 946a038..b939d00 100755 --- a/.config/alpine-packages +++ b/.config/alpine-packages | |||
| @@ -17,7 +17,7 @@ pulseaudio pulseaudio-bluez pulseaudio-alsa alsa-plugins-pulse pulseaudio-utils | |||
| 17 | # Core tools (non-X) | 17 | # Core tools (non-X) |
| 18 | coreutils-fmt curl imagemagick ffmpeg tmux ghostscript ncurses shellcheck | 18 | coreutils-fmt curl imagemagick ffmpeg tmux ghostscript ncurses shellcheck |
| 19 | kbd # For console keyboard configuration | 19 | kbd # For console keyboard configuration |
| 20 | syncthing fzf sfeed yt-dlp mblaze msmtp oath-toolkit | 20 | syncthing fzf sfeed yt-dlp mblaze msmtp isync oath-toolkit |
| 21 | 21 | ||
| 22 | # Development tools | 22 | # Development tools |
| 23 | build-base git gdb valgrind clang20 python3 rust cargo hare | 23 | build-base git gdb valgrind clang20 python3 rust cargo hare |
| @@ -27,12 +27,12 @@ libx11-dev libxft-dev libxinerama-dev | |||
| 27 | # Xorg | 27 | # Xorg |
| 28 | xorg-server | 28 | xorg-server |
| 29 | xinit eudev mesa-dri-gallium xf86-video-intel xf86-input-libinput xf86-input-synaptics | 29 | xinit eudev mesa-dri-gallium xf86-video-intel xf86-input-libinput xf86-input-synaptics |
| 30 | setxkbmap xsel xbanish xsetroot xwallpaper xev slock | 30 | setxkbmap xsel xbanish xsetroot xwallpaper xev slock brightnessctl |
| 31 | 31 | ||
| 32 | # X applications | 32 | # X applications |
| 33 | firefox libreoffice telegram-desktop vlc imv-x11 | 33 | firefox libreoffice telegram-desktop vlc imv-x11 |
| 34 | zathura-djvu zathura-pdf-mupdf zathura-ps | 34 | zathura-djvu zathura-pdf-mupdf zathura-ps |
| 35 | arandr iwgtk | 35 | arandr #iwgtk |
| 36 | 36 | ||
| 37 | # Fonts, but like a gazillion of them | 37 | # Fonts, but like a gazillion of them |
| 38 | font-terminus font-noto font-noto-extra font-arabic-misc | 38 | font-terminus font-noto font-noto-extra font-arabic-misc |
diff --git a/.config/dmenu/config.h b/.config/dmenu/config.h index fb69c65..889577e 100644 --- a/.config/dmenu/config.h +++ b/.config/dmenu/config.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */ | 4 | static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */ |
| 5 | /* -fn option overrides fonts[0]; default X11 font or font set */ | 5 | /* -fn option overrides fonts[0]; default X11 font or font set */ |
| 6 | static const char *fonts[] = { | 6 | static const char *fonts[] = { |
| 7 | "monospace:size=12" | 7 | "monospace:size=14" |
| 8 | }; | 8 | }; |
| 9 | static const char *prompt = NULL; /* -p option; prompt to the left of input field */ | 9 | static const char *prompt = NULL; /* -p option; prompt to the left of input field */ |
| 10 | static const char *colors[SchemeLast][2] = { | 10 | static const char *colors[SchemeLast][2] = { |
diff --git a/.config/dwm/config.h b/.config/dwm/config.h index 1a98237..91134c8 100644 --- a/.config/dwm/config.h +++ b/.config/dwm/config.h | |||
| @@ -5,8 +5,8 @@ static const unsigned int borderpx = 3; /* border pixel of windows */ | |||
| 5 | static const unsigned int snap = 32; /* snap pixel */ | 5 | static const unsigned int snap = 32; /* snap pixel */ |
| 6 | static const int showbar = 1; /* 0 means no bar */ | 6 | static const int showbar = 1; /* 0 means no bar */ |
| 7 | static const int topbar = 1; /* 0 means bottom bar */ | 7 | static const int topbar = 1; /* 0 means bottom bar */ |
| 8 | static const char *fonts[] = { "monospace:size=18" }; | 8 | static const char *fonts[] = { "monospace:size=14" }; |
| 9 | static const char dmenufont[] = "monospace:size=18"; | 9 | static const char dmenufont[] = "monospace:size=14"; |
| 10 | 10 | ||
| 11 | /* Dark scheme: */ | 11 | /* Dark scheme: */ |
| 12 | /* | 12 | /* |
| @@ -72,15 +72,12 @@ static const Layout layouts[] = { | |||
| 72 | /* commands */ | 72 | /* commands */ |
| 73 | static const char *termcmd[] = { "st", NULL }; | 73 | static const char *termcmd[] = { "st", NULL }; |
| 74 | static char dmenumon[2] = "0"; /* used in dmenucmd, manipulated in spawn() */ | 74 | static char dmenumon[2] = "0"; /* used in dmenucmd, manipulated in spawn() */ |
| 75 | static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, NULL }; | ||
| 76 | /* Colors in dmenu config.h built from source | ||
| 77 | static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, | 75 | static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, |
| 78 | "-fn", dmenufont, | 76 | "-fn", dmenufont, |
| 79 | "-nb", col_gray1, | 77 | "-nb", col_gray1, |
| 80 | "-nf", col_gray3, | 78 | "-nf", col_gray3, |
| 81 | "-sb", col_cyan, | 79 | "-sb", col_cyan, |
| 82 | "-sf", col_gray4, NULL }; | 80 | "-sf", col_gray4, NULL }; |
| 83 | */ | ||
| 84 | 81 | ||
| 85 | /* Necessary library for some multimedia key names */ | 82 | /* Necessary library for some multimedia key names */ |
| 86 | #include <X11/XF86keysym.h> | 83 | #include <X11/XF86keysym.h> |
| @@ -179,7 +176,6 @@ static Key keys[] = { | |||
| 179 | { MODKEY|ShiftMask, XK_Return, spawn, SHCMD("terminal") }, | 176 | { MODKEY|ShiftMask, XK_Return, spawn, SHCMD("terminal") }, |
| 180 | { MODKEY|ShiftMask, XK_backslash, spawn, SHCMD("popup-terminal") }, | 177 | { MODKEY|ShiftMask, XK_backslash, spawn, SHCMD("popup-terminal") }, |
| 181 | { MODKEY|ShiftMask, XK_f, spawn, SHCMD("firefox") }, | 178 | { MODKEY|ShiftMask, XK_f, spawn, SHCMD("firefox") }, |
| 182 | { MODKEY|ShiftMask, XK_g, spawn, SHCMD("xedit") }, | ||
| 183 | { MODKEY|ShiftMask, XK_j, spawn, SHCMD("terminal bc -q $HOME/box/bc.library") }, | 179 | { MODKEY|ShiftMask, XK_j, spawn, SHCMD("terminal bc -q $HOME/box/bc.library") }, |
| 184 | { MODKEY, XK_y, spawn, SHCMD("clip") }, | 180 | { MODKEY, XK_y, spawn, SHCMD("clip") }, |
| 185 | { MODKEY, XK_d, spawn, SHCMD("popup-cal12") }, | 181 | { MODKEY, XK_d, spawn, SHCMD("popup-cal12") }, |
| @@ -195,8 +191,8 @@ static Key keys[] = { | |||
| 195 | 191 | ||
| 196 | /* Multimedia */ | 192 | /* Multimedia */ |
| 197 | { 0, XK_Print, spawn, SHCMD("dmenu-screenshot") }, | 193 | { 0, XK_Print, spawn, SHCMD("dmenu-screenshot") }, |
| 198 | { 0, XF86XK_MonBrightnessUp, spawn, SHCMD("xbacklight -inc 5") }, | 194 | { 0, XF86XK_MonBrightnessUp, spawn, SHCMD("brightnessctl set 5%+") }, |
| 199 | { 0, XF86XK_MonBrightnessDown, spawn, SHCMD("xbacklight -dec 5") }, | 195 | { 0, XF86XK_MonBrightnessDown, spawn, SHCMD("brightnessctl set 5%-") }, |
| 200 | { 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("pulsemixer --change-volume +5 && xroot-update") }, | 196 | { 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("pulsemixer --change-volume +5 && xroot-update") }, |
| 201 | { 0, XF86XK_AudioLowerVolume, spawn, SHCMD("pulsemixer --change-volume -5 && xroot-update") }, | 197 | { 0, XF86XK_AudioLowerVolume, spawn, SHCMD("pulsemixer --change-volume -5 && xroot-update") }, |
| 202 | { 0, XF86XK_AudioMute, spawn, SHCMD("pulsemixer --toggle-mute && xroot-update") }, | 198 | { 0, XF86XK_AudioMute, spawn, SHCMD("pulsemixer --toggle-mute && xroot-update") }, |
diff --git a/.config/motd b/.config/motd new file mode 100644 index 0000000..68ee267 --- /dev/null +++ b/.config/motd | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | Welcome to Alpine! | ||
| 2 | |||
diff --git a/.config/st/config.h b/.config/st/config.h index b5e27c9..1535782 100644 --- a/.config/st/config.h +++ b/.config/st/config.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | * | 5 | * |
| 6 | * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html | 6 | * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html |
| 7 | */ | 7 | */ |
| 8 | static char *font = "Liberation Mono:pixelsize=32:antialias=true:autohint=true"; | 8 | static char *font = "Liberation Mono:pixelsize=18:antialias=true:autohint=true"; |
| 9 | static int borderpx = 2; | 9 | static int borderpx = 2; |
| 10 | 10 | ||
| 11 | /* | 11 | /* |
| @@ -1,6 +1,8 @@ | |||
| 1 | set -o vi | 1 | set -o vi |
| 2 | 2 | ||
| 3 | PATH="$HOME/scripts:$PATH" | ||
| 3 | PS1="[\h \W] \$ " | 4 | PS1="[\h \W] \$ " |
| 5 | export LC_COLLATE="C" | ||
| 4 | 6 | ||
| 5 | export HISTCONTROL=ignoredups | 7 | export HISTCONTROL=ignoredups |
| 6 | export HISTFILE=$HOME/.sh_history | 8 | export HISTFILE=$HOME/.sh_history |
| @@ -9,28 +11,24 @@ export HISTSIZE=10000 | |||
| 9 | # Standard stuff and variables for my scripts | 11 | # Standard stuff and variables for my scripts |
| 10 | export EDITOR=vi | 12 | export EDITOR=vi |
| 11 | export VISUAL=vi | 13 | export VISUAL=vi |
| 12 | export TERMINAL="ptyxis --new-window" | 14 | export XEDIT=xedit |
| 13 | export XEDIT="gnome-text-editor" | 15 | export NOTIFY=notify |
| 14 | export NOTIFY=notify-send | 16 | export OPENER=open-file |
| 15 | export OPENER=xdg-open #or set to open-file from scripts | ||
| 16 | export BROWSER=firefox | 17 | export BROWSER=firefox |
| 17 | export XDG_CONFIG_HOME="$HOME/.config" | 18 | export XDG_CONFIG_HOME="$HOME/.config" |
| 18 | export XDG_DATA_HOME="$HOME/.local/share" | 19 | export XDG_DATA_HOME="$HOME/.local/share" |
| 19 | export XDG_CACHE_HOME="$HOME/.cache" | 20 | export XDG_CACHE_HOME="$HOME/.cache" |
| 20 | export PYTHON_COLORS=0 | ||
| 21 | |||
| 22 | # Locale overrides | ||
| 23 | export LC_COLLATE="C" | ||
| 24 | 21 | ||
| 25 | ### Program-specific | 22 | # Program-specific stuff |
| 26 | export FZF_DEFAULT_OPTS="-e -i -m --no-bold --no-color --layout=reverse-list" | 23 | export FZF_DEFAULT_OPTS="-e -i -m --no-bold --no-color --layout=reverse-list" |
| 27 | export LYNX_CFG="$XDG_CONFIG_HOME/lynx/lynx.cfg" | 24 | export LYNX_CFG="$XDG_CONFIG_HOME/lynx/lynx.cfg" |
| 28 | export LYNX_LSS="$XDG_CONFIG_HOME/lynx/lynx.lss" | 25 | export LYNX_LSS="$XDG_CONFIG_HOME/lynx/lynx.lss" |
| 26 | export PYTHON_COLORS=0 | ||
| 29 | 27 | ||
| 30 | ### Aliases and functions | 28 | ### Aliases and functions |
| 31 | alias bc='bc -q /home/sebastiano/box/bc.library' | 29 | alias bc='bc -q /home/sebastiano/box/bc.library' |
| 32 | alias o='xdg-open' | 30 | alias o='open-file' |
| 33 | alias rm='trash-put' | 31 | alias rm='trash rm' |
| 34 | alias ls='ls --color=auto' | 32 | alias ls='ls --color=auto' |
| 35 | alias clip='clip -m fzf' | 33 | alias clip='clip -m fzf' |
| 36 | alias bm='dmenu-bookmarks -m fzf' | 34 | alias bm='dmenu-bookmarks -m fzf' |
| @@ -49,17 +47,8 @@ s() { mshow $@ | templess; } | |||
| 49 | sht() { mshow -A text/html $@; } | 47 | sht() { mshow -A text/html $@; } |
| 50 | n() { mshow .+1 | templess; } | 48 | n() { mshow .+1 | templess; } |
| 51 | 49 | ||
| 52 | # Comment out the next line when not working regularly with emscripten | ||
| 53 | #EMSDK_QUIET=1 source "$HOME/dev/emsdk/emsdk_env.sh" | ||
| 54 | |||
| 55 | # nissy build options | 50 | # nissy build options |
| 56 | export NISSY_BUILD_SANITIZE="address,undefined" | 51 | #export NISSY_BUILD_SANITIZE="address,undefined" |
| 57 | |||
| 58 | # Rust things | ||
| 59 | export RUSTUP_HOME="$HOME/dev/rustup" | ||
| 60 | export CARGO_HOME="$HOME/dev/cargo" | ||
| 61 | export PATH="$CARGO_HOME/bin:$PATH" | ||
| 62 | startrust() { source "$CARGO_HOME/env"; } | ||
| 63 | 52 | ||
| 64 | # Session cookies are kept in .ssh | 53 | # Session cookies are kept in .ssh |
| 65 | . $HOME/.ssh/sessions | 54 | [ -f $HOME/.ssh/sessions ] && . $HOME/.ssh/sessions |
| @@ -18,12 +18,10 @@ while true; do | |||
| 18 | done & | 18 | done & |
| 19 | 19 | ||
| 20 | # Extra settings | 20 | # Extra settings |
| 21 | xsetroot -cursor_name left_ptr & | ||
| 22 | setxkbmap -option compose:ralt | 21 | setxkbmap -option compose:ralt |
| 23 | setxkbmap -option caps:swapescape | 22 | setxkbmap -option caps:swapescape |
| 24 | xbacklight -set 30 | 23 | brightnessctl set 30% |
| 25 | xset s off -dpms | 24 | xset s off -dpms |
| 26 | xrdb -merge .Xresources | ||
| 27 | 25 | ||
| 28 | # Background and time | 26 | # Background and time |
| 29 | sleep 0.05 | 27 | sleep 0.05 |
| @@ -35,5 +33,5 @@ while read text; do | |||
| 35 | done & | 33 | done & |
| 36 | 34 | ||
| 37 | xbanish & | 35 | xbanish & |
| 38 | telegram-desktop & | 36 | Telegram & |
| 39 | exec dwm | 37 | exec dwm |
diff --git a/scripts/apkworld b/scripts/apkworld index 91deb8e..27483fe 100755 --- a/scripts/apkworld +++ b/scripts/apkworld | |||
| @@ -12,4 +12,4 @@ tmp_file=$(mktemp) | |||
| 12 | doas cp /etc/apk/world /etc/apk/world.backup | 12 | doas cp /etc/apk/world /etc/apk/world.backup |
| 13 | cat "$PACKAGES" | sed 's/#.*//' | grep -v '^[:space:]*$' > $tmp_file | 13 | cat "$PACKAGES" | sed 's/#.*//' | grep -v '^[:space:]*$' > $tmp_file |
| 14 | doas mv $tmp_file /etc/apk/world | 14 | doas mv $tmp_file /etc/apk/world |
| 15 | doas apk fix | 15 | doas apk fix --interactive |
diff --git a/scripts/old/brightness b/scripts/old/brightness deleted file mode 100755 index a7294fb..0000000 --- a/scripts/old/brightness +++ /dev/null | |||
| @@ -1,16 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # Increase / decrease brightness, and pops up a notification | ||
| 4 | # Requires: xbacklight, a notification program such as herbe or notify-send | ||
| 5 | # Usage: brightness {inc|dec} n | ||
| 6 | |||
| 7 | # ksh completion | ||
| 8 | # set -A complete_brightness_1 inc dec | ||
| 9 | # set -A complete_brightness_2 5 | ||
| 10 | |||
| 11 | #notify="notify-send" | ||
| 12 | notify="herbe" | ||
| 13 | |||
| 14 | pkill herbe # comment this too if not using herbe | ||
| 15 | |||
| 16 | xbacklight -$1 $2 && $notify "Brightness: $(xbacklight | sed 's/\..*$//')%" | ||
diff --git a/scripts/old/dmenu-filepicker-old b/scripts/old/dmenu-filepicker-old deleted file mode 100755 index 532fb82..0000000 --- a/scripts/old/dmenu-filepicker-old +++ /dev/null | |||
| @@ -1,31 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # A dmenu-based file picker (prints selected file to stdout) | ||
| 4 | # Requires: dmenu (or similar) | ||
| 5 | # Usage: dmenu-filepicker [path] | ||
| 6 | |||
| 7 | menu=${MENU:-dmenu} | ||
| 8 | menuopts="-i -l 15" | ||
| 9 | |||
| 10 | basedir="$(pwd)" | ||
| 11 | |||
| 12 | next="${@:-$(pwd)}" | ||
| 13 | |||
| 14 | while true; do | ||
| 15 | if [ -z "$next" ]; then | ||
| 16 | break | ||
| 17 | elif [ "$next" = "." ]; then | ||
| 18 | pwd | ||
| 19 | break | ||
| 20 | elif [ -d "$next" ]; then | ||
| 21 | cd "$next" | ||
| 22 | next=$(ls -a | $menu $menuopts) | ||
| 23 | else | ||
| 24 | echo "$next" | while read line; do | ||
| 25 | echo "$(pwd)/$line" | ||
| 26 | done | ||
| 27 | break | ||
| 28 | fi | ||
| 29 | done | ||
| 30 | |||
| 31 | cd "$basedir" | ||
diff --git a/scripts/old/dunst-toggle b/scripts/old/dunst-toggle deleted file mode 100755 index 2de2343..0000000 --- a/scripts/old/dunst-toggle +++ /dev/null | |||
| @@ -1,14 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # Toggle "do not disturbe" mode with dunst | ||
| 4 | # Requires: dunst, notify-send | ||
| 5 | |||
| 6 | if [ "$(dunstctl is-paused)" = "false" ]; then | ||
| 7 | notify-send -t 3000 "Notifications: OFF" "Notifications will be hidden" | ||
| 8 | sleep 3 | ||
| 9 | dunstctl set-paused true | ||
| 10 | else | ||
| 11 | dunstctl set-paused false | ||
| 12 | notify-send -t 3000 "Notifications: ON" "Notifications reactivated" | ||
| 13 | fi | ||
| 14 | |||
diff --git a/scripts/old/gfmt b/scripts/old/gfmt deleted file mode 100755 index d38351f..0000000 --- a/scripts/old/gfmt +++ /dev/null | |||
| @@ -1,9 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # Format text from gemtext format to short lines with double \n | ||
| 4 | |||
| 5 | # TODO: remove double spacing from within ``` | ||
| 6 | |||
| 7 | sed 's/ //' | \ | ||
| 8 | sed 'a\\' | \ | ||
| 9 | fold -sw 80 | ||
diff --git a/scripts/old/mail-checknow b/scripts/old/mail-checknow deleted file mode 100755 index 188042b..0000000 --- a/scripts/old/mail-checknow +++ /dev/null | |||
| @@ -1,18 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # Check for new email, save result to file. | ||
| 4 | # Requires: mpop, notify-send or similar | ||
| 5 | |||
| 6 | file="$XDG_DATA_HOME/newmail" | ||
| 7 | #notify="notify-send" | ||
| 8 | notify=herbe | ||
| 9 | |||
| 10 | l=$(cat "$file") | ||
| 11 | n=$(mpop -s | awk '/new*./{print $2}') | ||
| 12 | |||
| 13 | if [ -n "$n" ]; then | ||
| 14 | echo "$n" > "$file" | ||
| 15 | if [ "$n" != "no" ] && [ "$l" != "$n" ]; then | ||
| 16 | $notify "New email ($n)" | ||
| 17 | fi | ||
| 18 | fi | ||
diff --git a/scripts/old/mblaze-extras b/scripts/old/mblaze-extras deleted file mode 100755 index 7a4fe8a..0000000 --- a/scripts/old/mblaze-extras +++ /dev/null | |||
| @@ -1,61 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # Useful extra commands for mblaze | ||
| 4 | |||
| 5 | # Requires: mblaze, mpop | ||
| 6 | |||
| 7 | # Usage: mblaze-extras command | ||
| 8 | # List of commands: | ||
| 9 | # get [filter] | ||
| 10 | # pick [field] | ||
| 11 | # save | ||
| 12 | # scan [folder] | ||
| 13 | |||
| 14 | menu=${MENU:-dmenu} | ||
| 15 | mdir=$HOME/mail | ||
| 16 | mpopdir=$HOME/.config/mpop | ||
| 17 | |||
| 18 | mbextra_scan() { | ||
| 19 | folder=${1:-inbox} | ||
| 20 | mlist -t $mdir/$folder | mthread | mseq -S | ||
| 21 | mscan | ||
| 22 | } | ||
| 23 | |||
| 24 | mbextra_get() { | ||
| 25 | mpop --filter=$mpopdir/filter-$1.sh | ||
| 26 | minc -q $mdir/inbox | ||
| 27 | mbextra_scan inbox | ||
| 28 | } | ||
| 29 | |||
| 30 | mbextra_pick() { | ||
| 31 | field=$1 | ||
| 32 | shift | ||
| 33 | mpick -t "$field =~~ \"$@\"" | ||
| 34 | } | ||
| 35 | |||
| 36 | mbextra_save() { | ||
| 37 | dir=$2 | ||
| 38 | [ -z "$dir" ] && dir=$(dmenu-filepicker) | ||
| 39 | mkdir -p "$dir" | ||
| 40 | |||
| 41 | if [ ! -d "$dir" ]; then | ||
| 42 | echo "No directory selected, skipping." | ||
| 43 | else | ||
| 44 | cd "$dir" | ||
| 45 | mshow -x $1 | ||
| 46 | fi | ||
| 47 | } | ||
| 48 | |||
| 49 | if [ -z "$1" ]; then | ||
| 50 | echo "Usage: mblaze-extras COMMAND" | ||
| 51 | elif [ "$1" = "scan" ]; then | ||
| 52 | mbextra_scan $2 | ||
| 53 | elif [ "$1" = "get" ]; then | ||
| 54 | mbextra_get $2 | ||
| 55 | elif [ "$1" = "save" ]; then | ||
| 56 | shift | ||
| 57 | mbextra_save $@ | ||
| 58 | elif [ "$1" = "pick" ]; then | ||
| 59 | shift | ||
| 60 | mbextra_pick $@ | ||
| 61 | fi | ||
diff --git a/scripts/old/notify-battery b/scripts/old/notify-battery deleted file mode 100755 index 0294b70..0000000 --- a/scripts/old/notify-battery +++ /dev/null | |||
| @@ -1,10 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # Popup battery notification, based on the script battery-status | ||
| 4 | |||
| 5 | # Requires: notify-send or similar | ||
| 6 | |||
| 7 | #notify=notify-send | ||
| 8 | notify=herbe | ||
| 9 | |||
| 10 | $notify "Battery" "$(battery-status)" | ||
diff --git a/scripts/old/notify-status b/scripts/old/notify-status deleted file mode 100755 index 73a9435..0000000 --- a/scripts/old/notify-status +++ /dev/null | |||
| @@ -1,7 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # Simple script to send a notification displaying the output of status | ||
| 4 | |||
| 5 | # Requires: status, herbe (or similar, e.g. notify-send) | ||
| 6 | |||
| 7 | herbe "$(status '\n\n')" | ||
diff --git a/scripts/old/notify-time b/scripts/old/notify-time deleted file mode 100755 index 4b77c74..0000000 --- a/scripts/old/notify-time +++ /dev/null | |||
| @@ -1,15 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # Little notification to show time and date | ||
| 4 | |||
| 5 | # Requires: notify-send or similar | ||
| 6 | |||
| 7 | # TODO: check if it still works with notify-send | ||
| 8 | |||
| 9 | #notify=notify-send | ||
| 10 | notify=herbe | ||
| 11 | |||
| 12 | t=$(date +"%H:%M:%S") | ||
| 13 | d=$(date +"%d %B %Y, %A") | ||
| 14 | |||
| 15 | $notify "$t" "$d" | ||
diff --git a/scripts/old/sfeed-browser b/scripts/old/sfeed-browser deleted file mode 100755 index 774c808..0000000 --- a/scripts/old/sfeed-browser +++ /dev/null | |||
| @@ -1,80 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # This script is based on sfeed (https://codemadness.org/sfeed.html), but | ||
| 4 | # it allows you organize your feeds in directories and subdirectories. | ||
| 5 | # In your $sfd directory (see below) you should have two folders: | ||
| 6 | # urls: it can contain more subfolders and files. Each file should contain | ||
| 7 | # only one line with the url to the feed. The name of the file is the | ||
| 8 | # name of the feed (it can contains spaces and such). | ||
| 9 | # files: this one can be empty, it will be filled with the feed files | ||
| 10 | # An older version of this script also marked viewed items and removed | ||
| 11 | # them before displaying the choice of feeds. Contact me if you are interested | ||
| 12 | # in using it. | ||
| 13 | |||
| 14 | # Requires: sfeed, dmenu-file-picker (or similar), open-url (or similar) | ||
| 15 | |||
| 16 | # Usage: sfeed-browser [-m menu] | ||
| 17 | |||
| 18 | filepicker="dmenu-filepicker" # Try "nnn -p -" | ||
| 19 | menu="dmenu -l 35 -i" | ||
| 20 | urlopener=open-url | ||
| 21 | sfd="$HOME/box/sfeed" | ||
| 22 | showlast=10 | ||
| 23 | |||
| 24 | usage() { | ||
| 25 | echo "sfeed-browser [-m MENU]" | ||
| 26 | } | ||
| 27 | |||
| 28 | while getopts "m:" opt; do | ||
| 29 | case "$opt" in | ||
| 30 | m) | ||
| 31 | menu="$OPTARG" | ||
| 32 | ;; | ||
| 33 | *) | ||
| 34 | usage | ||
| 35 | exit 1 | ||
| 36 | ;; | ||
| 37 | esac | ||
| 38 | done | ||
| 39 | |||
| 40 | # Might add more stuff later | ||
| 41 | fixurl() { | ||
| 42 | sed 's/old\.reddit\.com/reddit\.com/' | ||
| 43 | } | ||
| 44 | |||
| 45 | dirtofeedpaths() { | ||
| 46 | while read -r line; do | ||
| 47 | find "$line" | while read -r fname; do | ||
| 48 | [ -f "$fname" ] && echo "$fname" | ||
| 49 | done | ||
| 50 | done | ||
| 51 | } | ||
| 52 | |||
| 53 | pathstosfeedrc() { | ||
| 54 | printf 'sfeedpath="%s"\n\nfeeds() {\n' "$sfd/files" | ||
| 55 | while read -r line; do | ||
| 56 | feedname=$(echo "$line" | sed 's/.*\///') | ||
| 57 | read -r feedurl <"$line" | ||
| 58 | printf '\tfeed "%s" "%s"\n' "$feedname" "$feedurl" | ||
| 59 | done | ||
| 60 | printf "}\n" | ||
| 61 | } | ||
| 62 | |||
| 63 | feedmenu() { | ||
| 64 | while read -r line; do | ||
| 65 | feedname=$(echo "$line" | sed 's/.*\///') | ||
| 66 | sfeed_plain "$sfd/files/$feedname" | head -$showlast | ||
| 67 | done | $menu | ||
| 68 | } | ||
| 69 | |||
| 70 | openfeeds() { | ||
| 71 | while read -r line; do | ||
| 72 | url=$(echo "$line" | sed 's/.*[\t ]//' | fixurl) | ||
| 73 | [ -n "$url" ] && echo "$url" | ||
| 74 | done | xargs $urlopener | ||
| 75 | } | ||
| 76 | |||
| 77 | $filepicker "$@" "$sfd/urls" | dirtofeedpaths > "$sfd/last" | ||
| 78 | pathstosfeedrc < "$sfd/last" > "$sfd/sfeedrc" | ||
| 79 | sfeed_update "$sfd/sfeedrc" | ||
| 80 | feedmenu < "$sfd/last" | openfeeds | ||
diff --git a/scripts/old/theme b/scripts/old/theme deleted file mode 100755 index 7e0107a..0000000 --- a/scripts/old/theme +++ /dev/null | |||
| @@ -1,23 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # This script is a shortcut to change between a dark and a light theme | ||
| 4 | # for my terminal emulator (st). | ||
| 5 | |||
| 6 | # Usage: theme (dark|light) | ||
| 7 | |||
| 8 | src=$HOME/.local/src | ||
| 9 | |||
| 10 | case "$@" in | ||
| 11 | dark) | ||
| 12 | cd $src/st-darkbg | ||
| 13 | ;; | ||
| 14 | light) | ||
| 15 | cd $src/st-lightbg | ||
| 16 | ;; | ||
| 17 | *) | ||
| 18 | echo "usage: theme (dark|light)" | ||
| 19 | exit 1 | ||
| 20 | ;; | ||
| 21 | esac | ||
| 22 | |||
| 23 | make && sudo make install | ||
diff --git a/scripts/old/togglemute b/scripts/old/togglemute deleted file mode 100755 index b799b02..0000000 --- a/scripts/old/togglemute +++ /dev/null | |||
| @@ -1,18 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # Toggle mute state and notify | ||
| 4 | # Requires: pulsemixer, notify-send or similar | ||
| 5 | |||
| 6 | #notify=notify-send | ||
| 7 | notify=herbe | ||
| 8 | |||
| 9 | ismute=$(pulsemixer --toggle-mute --get-mute) | ||
| 10 | |||
| 11 | if [ "$ismute" = "1" ]; then | ||
| 12 | m="muted" | ||
| 13 | else | ||
| 14 | m="unmuted" | ||
| 15 | fi | ||
| 16 | |||
| 17 | pkill herbe # comment this line too if not using herbe | ||
| 18 | $notify "Audio $m" | ||
diff --git a/scripts/old/volume b/scripts/old/volume deleted file mode 100755 index 8dcd36a..0000000 --- a/scripts/old/volume +++ /dev/null | |||
| @@ -1,13 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # Change volume and notify | ||
| 4 | # Usage: volume {+n|-n} | ||
| 5 | # Requires: pulsemixer, notify-send or similar | ||
| 6 | |||
| 7 | #notify=notify-send | ||
| 8 | notify=herbe | ||
| 9 | |||
| 10 | newvol=$(pulsemixer --change-volume "$1" --get-volume | awk '{print $1}') | ||
| 11 | |||
| 12 | pkill herbe # comment this line too if not using herbe | ||
| 13 | $notify "Volume" "$newvol%" | ||
diff --git a/scripts/old/xkboptions b/scripts/old/xkboptions deleted file mode 100755 index e63456d..0000000 --- a/scripts/old/xkboptions +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # Loads my xkboptions | ||
| 4 | |||
| 5 | setxkbmap -option compose:ralt | ||
| 6 | setxkbmap -option caps:swapescape | ||
diff --git a/scripts/old/xprop-active-window-id b/scripts/old/xprop-active-window-id deleted file mode 100755 index 97cf60f..0000000 --- a/scripts/old/xprop-active-window-id +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # Get the ID of the current active window (hexadecimal) | ||
| 4 | # Requires: xprop | ||
| 5 | |||
| 6 | xprop -root | grep _NET_ACTIVE_WINDOW | head -1 | sed 's/.* //' | ||
diff --git a/scripts/popup-cal12 b/scripts/popup-cal12 index 1c85b3d..ef37d08 100755 --- a/scripts/popup-cal12 +++ b/scripts/popup-cal12 | |||
| @@ -3,4 +3,4 @@ | |||
| 3 | # Popup terminal displaying cal -3 | 3 | # Popup terminal displaying cal -3 |
| 4 | # Requires: st (suckless terminal) | 4 | # Requires: st (suckless terminal) |
| 5 | 5 | ||
| 6 | st -T "stfloat" -g 69x36+620+250 -e sh -c "cal $(date +%Y); read x" | 6 | st -T "stfloat" -g 69x36+580+50 -e sh -c "cal $(date +%Y); read x" |
diff --git a/scripts/popup-terminal b/scripts/popup-terminal index 5a9a931..1a8bb22 100755 --- a/scripts/popup-terminal +++ b/scripts/popup-terminal | |||
| @@ -2,4 +2,4 @@ | |||
| 2 | 2 | ||
| 3 | # TODO maybe I want to run e.g. tmux in this? | 3 | # TODO maybe I want to run e.g. tmux in this? |
| 4 | 4 | ||
| 5 | st -T "stfloat" -g 85x25+550+300 tmux new-session "$@" | 5 | st -T "stfloat" -g 85x25+500+200 tmux new-session "$@" |
diff --git a/scripts/setup-config-alpine b/scripts/setup-config-alpine index a9a63b9..9db2c35 100755 --- a/scripts/setup-config-alpine +++ b/scripts/setup-config-alpine | |||
| @@ -42,11 +42,33 @@ for i in dmenu dwm st; do | |||
| 42 | cd $i | 42 | cd $i |
| 43 | cp ~/.config/$i/config.h ./config.h | 43 | cp ~/.config/$i/config.h ./config.h |
| 44 | make && doas make install | 44 | make && doas make install |
| 45 | cd .. | ||
| 45 | done | 46 | done |
| 46 | cd | 47 | cd |
| 47 | 48 | ||
| 49 | tmp_xorg_file=$(mktemp) | ||
| 50 | cat <<EOF > $tmp_xorg_file | ||
| 51 | Section "InputClass" | ||
| 52 | Identifier "libinput touchpad catchall" | ||
| 53 | MatchIsTouchpad "on" | ||
| 54 | MatchDevicePath "/dev/input/event*" | ||
| 55 | Driver "libinput" | ||
| 56 | Option "Tapping" "on" | ||
| 57 | EndSection | ||
| 58 | EOF | ||
| 59 | |||
| 60 | doas mkdir -p /etc/X11/xorg.conf.d | ||
| 61 | doas mv $tmp_xorg_file /etc/X11/xorg.conf.d/40-libinput.conf | ||
| 62 | |||
| 63 | tmp_doas_file=$(mktemp) | ||
| 64 | cp /etc/doas.d/20-wheel.conf $tmp_doas_file | ||
| 65 | for c in poweroff reboot; do | ||
| 66 | printf 'permit nopass :wheel as root cmd %s\n' "$c" >> $tmp_doas_file | ||
| 67 | done | ||
| 68 | doas cp $tmp_doas_file /etc/doas.d/20-wheel.conf | ||
| 69 | |||
| 48 | 70 | ||
| 49 | print_log "Swapping Escape and Caps Lock in console" | 71 | print_log "Configuring the console" |
| 50 | 72 | ||
| 51 | tmp_kmap_file=$(mktemp) | 73 | tmp_kmap_file=$(mktemp) |
| 52 | tmp_loadkmap_file=$(mktemp) | 74 | tmp_loadkmap_file=$(mktemp) |
| @@ -58,11 +80,18 @@ doas mv us-swapesc.bmap.gz /etc/keymap/ | |||
| 58 | printf 'KEYMAP=/etc/keymap/us-swapesc.bmap.gz\n' > $tmp_loadkmap_file | 80 | printf 'KEYMAP=/etc/keymap/us-swapesc.bmap.gz\n' > $tmp_loadkmap_file |
| 59 | doas mv $tmp_loadkmap_file /etc/conf.d/loadkmap | 81 | doas mv $tmp_loadkmap_file /etc/conf.d/loadkmap |
| 60 | 82 | ||
| 83 | tmp_blacklist_file=$(mktemp) | ||
| 84 | cp /etc/modprobe.d/blacklist.conf $tmp_blacklist_file | ||
| 85 | printf '\n# Disable PC speaker for real\nblacklist pcspkr\n' >> $tmp_blacklist_file | ||
| 86 | doas cp $tmp_blacklist_file /etc/modprobe.d/blacklist.conf | ||
| 87 | |||
| 61 | 88 | ||
| 62 | print_log "Setting up ACPI (see https://wiki.alpinelinux.org/wiki/Power_management)" | 89 | print_log "Setting up ACPI (see https://wiki.alpinelinux.org/wiki/Power_management)" |
| 63 | 90 | ||
| 64 | tmp_acpi_file=$(mktemp) | 91 | tmp_acpi_file=$(mktemp) |
| 65 | cat <<EOF > $tmp_acpi_file | 92 | cat <<EOF > $tmp_acpi_file |
| 93 | #!/bin/sh | ||
| 94 | |||
| 66 | xhci="$(grep XHCI /proc/acpi/wakeup | awk '{print $3}')" | 95 | xhci="$(grep XHCI /proc/acpi/wakeup | awk '{print $3}')" |
| 67 | [ "$xhci" == '*enabled' ] && echo XHCI > /proc/acpi/wakeup | 96 | [ "$xhci" == '*enabled' ] && echo XHCI > /proc/acpi/wakeup |
| 68 | echo mem > /sys/power/state | 97 | echo mem > /sys/power/state |
| @@ -74,6 +103,8 @@ for dir in LID PWRF; do | |||
| 74 | doas chmod +x /etc/acpi/$dir/00000080 | 103 | doas chmod +x /etc/acpi/$dir/00000080 |
| 75 | done | 104 | done |
| 76 | 105 | ||
| 106 | doas rc-update add acpid | ||
| 107 | |||
| 77 | 108 | ||
| 78 | print_log "Setting up WiFi (iwd) (see https://wiki.alpinelinux.org/wiki/Iwd)" | 109 | print_log "Setting up WiFi (iwd) (see https://wiki.alpinelinux.org/wiki/Iwd)" |
| 79 | 110 | ||
| @@ -130,6 +161,7 @@ echo " 1c. github" | |||
| 130 | echo " 3. Share folders in SyncThing, including but not limited to:" | 161 | echo " 3. Share folders in SyncThing, including but not limited to:" |
| 131 | echo " 2a. box with Artemisia, pizoc and phone" | 162 | echo " 2a. box with Artemisia, pizoc and phone" |
| 132 | echo " 2b. file-drop with phone" | 163 | echo " 2b. file-drop with phone" |
| 133 | echo " 4. Copy your mailbox.org password to .ssh/mailbox.org" | 164 | echo " 4. Copy your mailbox.org password to .ssh/mailbox.org." |
| 165 | echo " 5. Log into Firefox account and set up extensions, if needed." | ||
| 134 | echo "" | 166 | echo "" |
| 135 | echo "Enjoy!" | 167 | echo "Enjoy!" |
diff --git a/scripts/popup-cal3 b/scripts/unused/popup-cal3 index 6dfed54..6dfed54 100755 --- a/scripts/popup-cal3 +++ b/scripts/unused/popup-cal3 | |||
diff --git a/scripts/xedit b/scripts/unused/xedit index 3f68f24..3f68f24 100755 --- a/scripts/xedit +++ b/scripts/unused/xedit | |||
diff --git a/scripts/xedit-filter b/scripts/unused/xedit-filter index 7caf12c..7caf12c 100755 --- a/scripts/xedit-filter +++ b/scripts/unused/xedit-filter | |||
