creton32 4 months ago
parent
commit
e9988ba11a
  1. 6
      README.md
  2. 9
      audio/.config/alsa/asoundrc
  3. 107
      bin/.local/bin/al
  4. 22
      bin/.local/bin/pwg
  5. 1
      bin/.local/bin/sy
  6. 30
      bin/.local/bin/vpn
  7. 14
      browser/.config/tridactyl/tridactylrc
  8. BIN
      browser/.mozilla/firefox/profile/bookmarks.html
  9. 1
      browser/.mozilla/firefox/profile/chrome/userChrome/tab.css
  10. 9
      browser/.mozilla/firefox/profile/user.js
  11. BIN
      chat/.config/weechat/weechat.conf
  12. 36
      desktop/.config/polybar/config.ini
  13. 1
      gui/.config/gtk-3.0/settings.ini
  14. 7
      input/.config/sxhkd/sxhkdrc
  15. BIN
      reader/.config/newsboat/urls
  16. 17
      term/.config/tmux/tmux.conf
  17. 52
      term/.config/zsh/.aliases
  18. 3
      term/.config/zsh/.zprofile
  19. 26
      up
  20. BIN
      util/dev/todo/linux.md
  21. BIN
      util/dev/todo/work.md
  22. 5
      video/.config/mpv/mpv.conf
  23. 2
      video/.config/straw-viewer/straw-viewer.conf

6
README.md

@ -43,8 +43,8 @@ Even though it is said to be [abandonware](https://ajaxnwnk.blogspot.com/2020/10
+ **WM (Window Manager)** - [bspwm](https://github.com/baskerville/bspwm)
I use BSPWM (Binary Space Partitioning Window Manager) because of the amount of customisability it provides by using a single binary `bspc` to control all its behaviour. The fact that I'm able to write shell scripts to tweak it to my liking is its killer feature and I also very much enjoy its default window representation as leaves of a binary tree. It also sticks to the UNIX philosophy, as the only things it provides is a window manager, no status bars or fancy notification panels.
Most times I'm using my laptop plugged to an external monitor, so I have a custom script [`wm subscribe`](bin/wm) which listens to monitor events and rearranges desktops automatically according to the display(s) connected.
I also like the fact that I can adjust window rules however I wish. For example, in my custom script [`term`](bin/term), in which I overlay an mpv window with a terminal window with the video info/comments, I'm able to set a sizing rule that inherits the window size of the current window as a one-off.
Most times I'm using my laptop plugged to an external monitor, so I have a custom script [`wm subscribe`](bin/.local/bin/wm) which listens to monitor events and rearranges desktops automatically according to the display(s) connected.
I also like the fact that I can adjust window rules however I wish. For example, in my custom script [`term`](bin/.local/bin/term), in which I overlay an mpv window with a terminal window with the video info/comments, I'm able to set a sizing rule that inherits the window size of the current window as a one-off.
+ Hotkey daemon: **sxhkd**
Another
+ Status bar: [polybar](https://github.com/polybar/polybar)
@ -182,7 +182,7 @@ pass otp otp/{account_name}
### Utilities
* Wireless daemon: **wpa_supplicant** with **dhcpcd**. I found [IWD](https://docs.voidlinux.org/config/network/iwd.html?highlight=iwd#iwd) too inconsistent. It may be caused by [this](https://bugzilla.kernel.org/show_bug.cgi?id=203709) or may be wireless-card specific.
* Boot manager: **rEFInd** as it's specific to UEFI systems. Replaces GRUB.
* Audio server: I try to use [sndio](https://sndio.org/) for most of the applications that support it as it makes the audio experience on Linux dead simple, offering changing ALSA devices on the fly, having fallback devices and per application volume control. However, one major gripe I have with it is that it doesn't support software ALSA PCMs, so projects like [bluez-alsa](https://github.com/Arkq/bluez-alsa) which bring bluetooth compatibility to ALSA, still don't work. I also use [alsa-sndio](https://github.com/Duncaen/alsa-sndio) and [apulse](https://github.com/i-rinat/apulse) for applications that don't support `sndio` or `ALSA` respectively.
* Audio server/mixer: I try to use [sndio](https://sndio.org/) for most of the applications that support it as it makes the audio experience on Linux dead simple, offering changing ALSA devices on the fly, having fallback devices and per application volume control. However, one major gripe I have with it is that it doesn't support software ALSA PCMs, so projects like [bluez-alsa](https://github.com/Arkq/bluez-alsa) which bring bluetooth compatibility to ALSA, still don't work. I also use [alsa-sndio](https://github.com/Duncaen/alsa-sndio) and [apulse](https://github.com/i-rinat/apulse) for applications that don't support `sndio` or `ALSA` respectively.
* Keyboard firmware: [QMK](https://github.com/qmk/qmk_firmware) to recompile my keyboard.
* Screenshots: [maim](https://github.com/naelstrof/maim)
* Screencasts: **ffmpeg** with [custom script](bin/.local/bin/cast)

9
audio/.config/alsa/asoundrc

@ -6,7 +6,7 @@ pcm.!default {
slave.pcm {
@func getenv
vars [ ALSA_DEFAULT_PCM ]
default "secondary"
default secondary
}
}
@ -37,6 +37,11 @@ pcm.secondary {
device 0
}
ctl.primary {
type hw
card PCH
}
ctl.secondary {
type hw
card Device
@ -61,7 +66,7 @@ pcm.bt-headset {
}
}
# ALSA fallback for applications that don't support sndio
# Adds sndio support to ALSA applications that don't support it (only playback)
pcm.sndio {
type sndio
}

107
bin/.local/bin/al

@ -2,13 +2,19 @@
# Control mixer volume
volume() {
n_connected="$(al bt --get | awk '{print $1}')"
device_alias="$(al bt --get | cut -d " " -f2-)"
n_connected="$(al -bt --get | awk '{print $1}')"
device_alias="$(al -bt --get | cut -d " " -f2-)"
# For volume bar
# Manual volume control for volume bar action format tags
case "$2" in
--hw)
if amixer -q sget Master 2>/dev/null; then
if pgrep bluetoothd >/dev/null && [ $n_connected -gt 0 ]; then
case "$3" in
up) amixer -q -D bluealsa sset "$device_alias - A2DP" 10+ ;;
down) amixer -q -D bluealsa sset "$device_alias - A2DP" 10- ;;
mute) amixer -q -D bluealsa cset name "$device_alias - A2DP Playback Switch" toggle
esac
elif amixer -q sget Master 2>/dev/null; then
case "$3" in
up) amixer -q sset Master 5+ ;;
down) amixer -q sset Master 5- ;;
@ -26,11 +32,12 @@ volume() {
case "$3" in
up) sndioctl output.level=+0.1 ;;
down) sndioctl output.level=-0.1 ;;
mute) sndioctl output.level=0
esac
;;
esac
# For bindings
# Automatic volume control for desktop bindings
if pgrep bluetoothd >/dev/null && [ $n_connected -gt 0 ]; then
case "$2" in
up) amixer -q -D bluealsa sset "$device_alias - A2DP" 10+ ;;
@ -41,8 +48,8 @@ volume() {
up) sndioctl output.level=+0.1 ;;
down) sndioctl output.level=-0.1 ;;
mute)
# TODO: is there a way to store the previous volume to replicate toggle behaviour?
sndio_vol=$(printf '%.0f' $(sndioctl output.level | awk -F= '{print $2}'))
notify-send "$sndio_vol"
if [ "$sndio_vol" -eq 0 ]; then
sndioctl output.level=$sndio_vol
else
@ -67,11 +74,12 @@ volume() {
draw_bar() {
level="$1"
size="$2"
vol_percent="$3"
completion_color="#5F6FAB"
empty_color="#9A9FBB"
i=0
while [ "$i" -le "$size" ]; do
while [ "$i" -lt "$size" ]; do
if [ "$level" -ge 0 ] && [ "$level" -lt 3 ]; then
ramp_volume="奄"
elif [ "$level" -ge 3 ] && [ "$level" -lt 6 ]; then
@ -87,45 +95,47 @@ draw_bar() {
fi
i=$((i + 1))
done
echo "$ramp_volume $bar %{F-}$volume_percent%"
echo "$ramp_volume $bar %{F-}$vol_percent%"
}
# Status bar volume bar
volume_bar() {
case "$2" in
--hw)
if amixer sget Master 2>/dev/null; then
volume=$(amixer sget Capture | awk -F '[][]' 'END{print $2}' | rev | cut -c 2- | rev)
else
volume=$(amixer sget PCM | awk -F '[][]' 'END{print $2}' | rev | cut -c 2- | rev)
fi
# Volume of hw mixer
volume_percent=$(printf '%.0f' $volume)
size=5
level=$((volume_percent * size / 100))
draw_bar $level $size
;;
--sw)
if pgrep sndiod >/dev/null; then
volume=$(echo "$(sndioctl output.level | awk -F= '{print $2}') * 100" | bc)
volume_percent=$(printf '%.0f' $volume)
size=5
level=$((volume_percent * size / 100))
n_connected="$(al -bt --get | awk '{print $1}')"
device_alias="$(al -bt --get | cut -d " " -f2-)"
draw_bar $level $size
fi
esac
}
if pgrep bluetoothd >/dev/null && [ $n_connected -gt 0 ]; then
volume_hw="$(amixer -D bluealsa sget "$device_alias - A2DP" 2>/dev/null | awk -F '[][]' 'END{print $2}' | rev | cut -c 2- | rev)"
elif pgrep sndiod >/dev/null; then
volume_sw="$(echo "$(sndioctl output.level | awk -F= '{print $2}') * 100" | bc)"
if amixer sget -q Master 2>/dev/null; then
volume_hw=$(amixer sget Master | awk -F '[][]' 'END{print $2}' | rev | cut -c 2- | rev)
else
volume_hw=$(amixer sget PCM | awk -F '[][]' 'END{print $2}' | rev | cut -c 2- | rev)
fi
elif amixer sget -q Master 2>/dev/null; then
volume_hw=$(amixer sget Master | awk -F '[][]' 'END{print $2}' | rev | cut -c 2- | rev)
else
volume_hw=$(amixer sget PCM | awk -F '[][]' 'END{print $2}' | rev | cut -c 2- | rev)
fi
# Volume of hardware mixer
volume_percent_hw=$(printf '%.0f' $volume_hw)
size=5
level_hw=$((volume_percent_hw * size / 100))
# Control the input volume
in_vol() {
amixer -c 0 name='Headset Mic Boost Volume' "$1"
# Volume of software mixer
if [ -n "$volume_sw" ]; then
volume_percent_sw=$(printf '%.0f' $volume_sw)
level_sw=$((volume_percent_sw * size / 100))
echo "%{A1:al -vol --hw mute:}%{A4:al -vol --hw up:}%{A5:al -vol --hw down:}$(draw_bar $level_hw $size $volume_percent_hw)%{A}%{A}%{A} %{A1:al -vol --sw mute:}%{A4:al -vol --sw up:}%{A5:al -vol --sw down:} $(draw_bar $level_sw $size $volume_percent_sw)%{A}%{A}%{A}"
else
echo "%{A1:al -vol --hw mute:}%{A4:al -vol --hw up:}%{A5:al -vol --hw down:}$(draw_bar $level_hw $size $volume_percent_hw)%{A}%{A}%{A}"
fi
}
# Change capture source
in_src() {
# Sound card with built-in capture and headset mic
if amixer -q cget 'Headset Mic Boost' 2>/dev/null && amixer -q cget 'Capture' 2>/dev/null; then
if amixer -q sget 'Headset Mic Boost' 2>/dev/null && amixer -q sget 'Capture' 2>/dev/null; then
mic_volume="$(amixer sget 'Headset Mic Boost' | awk -F ":" 'END{print $2}' | awk '{print $2}' | tr -d '[]')"
mic_level="$(amixer sget 'Headset Mic Boost' | awk -F ":" 'END{print $2}' | cut -c2)"
cap_volume="$(amixer sget 'Capture' | awk -F ":" 'END{print $2}' | awk '{print $3}' | tr -d '[]')"
@ -176,22 +186,21 @@ in_src() {
# Toggle Auto-Mute mode
auto_mute() {
case "$2" in
--toggle)
if amixer -c 0 sget 'Auto-Mute Mode' | grep -Fq "Item0: 'Enabled'"; then
amixer -c 0 sset 'Auto-Mute Mode' Disabled > /dev/null
else
amixer -c 0 sset 'Auto-Mute Mode' Enabled > /dev/null
fi
;;
*)
if amixer -c 0 sget 'Auto-Mute Mode' | grep -Fq "Item0: 'Enabled'"; then
echo ""
else
echo "蓼"
fi
--toggle)
case "$(amixer -q sget 'Auto-Mute Mode' 2>/dev/null | awk -F ":" '/Item0/{print $2}' | tr -d "''")" in
Enabled) amixer -q sset 'Auto-Mute Mode' Disabled ;;
Disabled) amixer -q sset 'Auto-Mute Mode' Enabled ;;
esac
;;
*)
case "$(amixer -q sget 'Auto-Mute Mode' 2>/dev/null | awk -F ":" '/Item0/{print $2}' | tr -d "''")" in
Enabled) echo "" ;;
Disabled) echo "蓼" ;;
esac
esac
}
# Manage bluetooth
bluetooth() {
case "$2" in
--toggle)

22
bin/.local/bin/pwg

@ -1,22 +0,0 @@
#!/bin/sh
config="/etc/wireguard/wireguard.conf"
config_name=$(basename "${config%.*}")
connection_status() {
connection=$(doas wg show "$config_name" 2>/dev/null | head -n 1 | awk '{print $NF }')
[ "$connection" = "$config_name" ] && echo "1" || echo "2"
}
case "$1" in
--toggle)
[ "$(connection_status)" = "1" ] &&
doas wg-quick down "$config" 2>/dev/null ||
doas wg-quick up "$config" 2>/dev/null
;;
*)
case "$(connection_status)" in
"1") echo "%{T4}聯($config_name)%T6" ;;
"3") echo "%{T4}Config not found!%{T-}" ;;
*) echo "%{T4}輦%{T-}" ;;
esac
esac

1
bin/.local/bin/sy

@ -87,4 +87,5 @@ ${ac} -_______\\ $(lr CPU) ${ic}${c_lvl}%% $(draw "$c_lvl" 10 10)
$(lr RAM) ${ic}${ram}%% $(draw "$ram" 10 10) ${ic}(${ram_mb}MB)
${ca}
"

30
bin/.local/bin/vpn

@ -0,0 +1,30 @@
#!/bin/sh
config="/etc/wireguard/wireguard.conf"
config_name=$(basename "${config%.*}")
connection_status() {
connection=$(doas wg show "$config_name" 2>/dev/null | head -n 1 | awk '{print $NF }')
if [ "$connection" = "$config_name" ]; then
echo "1"
else
echo "2"
fi
}
case "$1" in
--toggle)
if [ "$(connection_status)" = "1" ]; then
notify-send "Wireguard" "Disconnecting from $config_name..."
doas wg-quick down "$config" 2>/dev/null
else
notify-send "Wireguard" "Connecting to $config_name..."
doas wg-quick up "$config" 2>/dev/null
fi
;;
*)
case "$(connection_status)" in
1) echo "%{F#5F6FAB}%{T4}聯%{F-}%{T-}" ;;
3) echo "%{T4}Config not found!%{T-}" ;;
*) echo "%{T4}輦%{T-}" ;;
esac
esac

14
browser/.config/tridactyl/tridactylrc

@ -112,7 +112,7 @@ unbind <C-u>
unbind --mode=ex <C-a>
unbind --mode=ex <C-c>
bind F composite hint -pipe a href | tabopen
bind F composite hint -Jpipe a href | tabopen
bind <C-j> tabmove -1
bind <C-k> tabmove +1
bind / fillcmdline find
@ -139,12 +139,12 @@ bind c fillcmdline tabopen -c
bind A composite bmark; fillcmdline_tmp 1000 Removed bookmark
" Open with external programs
bind <Space>i composite hint -pipe img src | shellescape | !s tri -o
" bind <Space>o composite hint -pipe a href; js document.cookie + " " window.location | fillcmdline
bind <Space>o composite hint -pipe a href | !s tri -o
bind <Space>i composite hint -Jpipe img src | shellescape | !s tri -o
" bind <Space>o composite hint -Jpipe a href; js document.cookie + " " window.location | fillcmdline
bind <Space>o composite hint -Jpipe a href | !s tri -o
"| !s tri -o
bind <Space>w composite hint -pipe img src | shellescape | !s tri -w
bind <Space>d composite hint -pipe a href | !s tri -d
bind <Space>w composite hint -Jpipe img src | shellescape | !s tri -w
bind <Space>d composite hint -Jpipe a href | !s tri -d
"
@ -253,6 +253,8 @@ set searchurls.gr https://github.com/%s1/%s2
set searchurls.gs https://github.com/%s1?q=%s2&type=&language=
set searchurls.gl https://gitlab.com/explore/projects?utf8=%E2%9C%93&name=%s&sort=latest_activity_desc
set searchurls.sh https://sr.ht/projects?search=%s&sort=recently-updated
set searchurls.c https://codeberg.org/explore/repos?tab=&sort=recentupdate&q=%s
set searchurls.cr https://codeberg.org/%s1/%s2
" Media
set searchurls.pt https://sepiasearch.org/search?search=%s&sort=-match

BIN
browser/.mozilla/firefox/profile/bookmarks.html

Binary file not shown.

1
browser/.mozilla/firefox/profile/chrome/userChrome/tab.css

@ -70,6 +70,7 @@
background: var(--secondary-bg) !important;
border-radius: 40px;
}
/* TODO: find out how to display icon on different color when there's only one tab opened */
.tabbrowser-tab[first-visible-tab="true"][last-visible-tab="true"] .tab-icon-image,
.tabbrowser-tab[first-visible-tab="true"][last-visible-tab="true"] .tab-icon-pending,
.tabbrowser-tab[first-visible-tab="true"][last-visible-tab="true"] .tab-icon-sound,

9
browser/.mozilla/firefox/profile/user.js

@ -191,17 +191,18 @@ user_pref("browser.startup.page", 3);
user_pref("browser.cache.disk.enable", true);
// Clear history settings when Firefox closes
user_pref("privacy.clearOnShutdown.cache", true);
user_pref("privacy.clearOnShutdown.downloads",true);
user_pref("privacy.clearOnShutdown.downloads", false);
user_pref("privacy.clearOnShutdown.formdata", true);
user_pref("privacy.clearOnShutdown.offlineApps", true);
user_pref("privacy.clearOnShutdown.offlineApps", false);
user_pref("privacy.clearOnShutdown.cache", false);
// Enabled as otherwise session restore doesn't work
user_pref("privacy.clearOnShutdown.history", false);
user_pref("privacy.clearOnShutdown.sessions", false);
user_pref("privacy.clearOnShutdown.siteSettings", false);
// Do not download URLs for the offline cache
// Do not store anything in offline cache
user_pref("browser.cache.offline.enable", false);
user_pref("browser.cache.offline.storage.enable", true);
// Disable history
user_pref("places.history.enabled", false);

BIN
chat/.config/weechat/weechat.conf

Binary file not shown.

36
desktop/.config/polybar/config.ini

@ -4,7 +4,7 @@ fground = #9a9fbb
sbground = #1C1E2B
accent = #5f6fab
contrast = #2A2D41
transparent = #0000000
transparent = #00000000
[global/wm]
margin-bottom = 0
@ -20,7 +20,7 @@ width = 98.4%
height = 22
offset-x = 15
offset-y = 8
background = #0000000
background = ${color.transparent}
foreground = ${color.fground}
radius-top = 0
radius-bottom = 0
@ -42,7 +42,7 @@ font-4 = "icomoon:size=13;3"
font-5 = "icomoon:size=10;3"
modules-left = acc-start launcher acc-right bspwm title end start-float mpd end
modules-right = start input alsa_toggle vpn alsa_input bluetooth wm_preset mail pkgs end-float start volume_hw volume_sw battery xkeyboard network date acc-left powermenu acc-end
modules-right = start input alsa_toggle vpn alsa_input bluetooth wm_preset mail pkgs end-float start volume battery xkeyboard network date acc-left powermenu acc-end
spacing = 0
dim-value = 1.0
@ -50,7 +50,7 @@ dim-value = 1.0
tray-position = none
tray-detached = false
tray-maxsize = 16
tray-transparent = false
tray-transparent = true
tray-background = ${color.bground}
tray-offset-x = 0
tray-offset-y = 0
@ -208,7 +208,7 @@ format-online-foreground = ${color.fground}
format-online-padding = 1
format-online-font = 2
format-online = "<icon-prev> <icon-seekb> <toggle> <icon-seekf> <icon-next> <icon-stop> <icon-single> <icon-repeat> <label-song> <label-time> <bar-progress>"
label-song = "%artist:0:10:...% - %title:0:10:...% "
label-song = "%artist:0:10:...% - %title:0:10:...%"
label-song-maxlen = 50
label-song-ellipsis = true
label-song-font = 4
@ -338,9 +338,9 @@ ramp-volume-0 = 奄
ramp-volume-1 = 奔
ramp-volume-2 =
[module/volume_sw]
[module/volume]
type = custom/script
exec = al -vol-bar --sw
exec = al -vol-bar
label = %output%
format = <label>
format-font = 4
@ -348,22 +348,6 @@ format-background = ${color.bground}
format-foreground = ${color.fground}
format-padding = 1
interval = 1
scroll-up = al -vol --sw up
scroll-down = al -vol --sw down
[module/volume_hw]
type = custom/script
exec = al -vol-bar --hw
label = %output%
format = <label>
format-font = 4
format-background = ${color.bground}
format-foreground = ${color.fground}
format-padding = 1
interval = 1
scroll-up = al -vol --hw up
scroll-down = al -vol --hw down
click-left = al -vol --hw mute
[module/battery]
type = internal/battery
@ -476,9 +460,9 @@ click-left = xkb-switch -n
[module/vpn]
type = custom/script
exec = pwg
exec = vpn
interval = 2
click-left = pwg --toggle
click-left = vpn --toggle
label = %output%
format = <label>
format-padding = 1
@ -504,7 +488,7 @@ format-disconnected-padding = 1
label-connected = "%{A1:iwctl_reconnect disconnect:}%essid%%{A}"
label-connected-font = 4
label-disconnected = "%{A1:iwctl_reconnect connect:}睊Disconnected%{A}"
label-disconnected = "%{A1:iwctl_reconnect connect:}睊 Disconnected%{A}"
label-disconnected-font = 4
ramp-signal-0 =

1
gui/.config/gtk-3.0/settings.ini

@ -16,3 +16,4 @@ gtk-xft-hinting=0
gtk-xft-hintstyle=hintnone
gtk-xft-rgba=none
gtk-decoration-layout=menu:close
gtk-recent-files-enabled=false

7
input/.config/sxhkd/sxhkdrc

@ -8,7 +8,7 @@ super + {space,backslash}
# Browser
super + {_,shift +}u
{_,ALSA_DEVICE=7} apulse firefox
{_,ALSA_DEVICE=7} firefox
# Make sxhkd reload its configuration files
super + r
@ -44,7 +44,7 @@ super + {_, shift + }ctrl + c
super + {_,shift +}y
key {start,stop}
# Wallpaper solid/image
# Wallpaper solid color/image
super + ctrl + {_, shift +}p
wp -{s,i}
@ -59,12 +59,13 @@ super + {less,greater,shift + space}
super + alt + {comma,period,p}
playerctl {previous,next,stop}
super + alt + {p,shift + P,n}
super + alt + {t,shift + P,n}
playerctl loop {Playlist,Track,None}
super + ctrl + {comma,period}
playerctl position {0,$(playerctl metadata mpris:length)}
# Display binds help menu
super + slash
ro -sxhkd

BIN
reader/.config/newsboat/urls

Binary file not shown.

17
term/.config/tmux/tmux.conf

@ -169,7 +169,7 @@ setw -g window-status-current-format \
"#{?window_start_flag\
,#[bg=#12141E]#[fg=#5F6FAB]\
,#[bg=default]#[fg=#5f6fab]\
}#[fg=#27293b]#[bg=#5F6FAB]#I #W\
}#[fg=#27293b]#[bg=#5F6FAB]#[align=centre]#I #W\
#{?window_zoomed_flag,\
#[fg=#272293b]#[bg=#5f6fab] ↕\,}\
#{?window_end_flag\
@ -179,12 +179,19 @@ setw -g window-status-current-format \
setw -g window-status-format \
"#{?window_start_flag\
,#[bg=NONE]#[fg=#1C1E2B]\
,#[bg=#1C1E2B]#[fg=#1C1E2B] }\
,#[bg=#1C1E2B]#[fg=#1C1E2B]}\
#{?window_start_flag,\
#[fg=#9A9FBB]#[bg=#1C1E2B]#[align=centre]#I #W \
#{?window_zoomed_flag,\
#[fg=#9a9fbb]#[bg=#1C1E2B]↕ ,},\
#{?window_end_flag\
,#[fg=#9A9FBB]#[bg=#1C1E2B]#I #W\
,#[fg=#9A9FBB]#[bg=#1C1E2B]#I #W }\
,#[fg=#9A9FBB]#[bg=#1C1E2B]#[align=centre] #I #W\
#{?window_zoomed_flag,\
#[fg=#9a9fbb]#[bg=#1C1E2B] ↕,},\
#[fg=#9A9FBB]#[bg=#1C1E2B]#[align=centre] #I #W \
#{?window_zoomed_flag,\
#[fg=#9a9fbb]#[bg=#1C1E2B] ↕\,}\
#[fg=#9a9fbb]#[bg=#1C1E2B]↕ ,}\
}}\
#{?window_end_flag\
,#[bg=#12141E]#[fg=#1C1E2B]\
,#[bg=#1C1E2B]#[fg=#1C1E2B]}"

52
term/.config/zsh/.aliases

@ -1,16 +1,15 @@
#!/bin/sh
# General
alias ls="lsd"
alias l="ls -l"
alias la="ls --color -A"
alias lla="ls -la"
alias lt="ls --tree"
alias cp="cp --interactive --verbose"
alias mv="mv --interactive --verbose"
alias rm="rm --interactive --verbose"
alias cat="bat"
alias du="dust"
alias ..="cd .."
@ -28,7 +27,6 @@ alias nb="newsboat -q"
alias wu="d wg-quick up"
alias wd="d wg-quick down"
alias mntnfs='d mount -t nfs'
alias vpn='d openfortivpn -c /etc/openfortivpn/config'
alias tk="taskell"
alias sf="sea-cli"
alias sha="sha256sum"
@ -43,6 +41,7 @@ alias n="navi"
alias nt="navi --tldr"
# Edit configuration files
alias zshrc="v $XDG_CONFIG_HOME/zsh/.zshrc && source $XDG_CONFIG_HOME/zsh/.zshrc"
alias aliases="v $XDG_CONFIG_HOME/zsh/.aliases && source $XDG_CONFIG_HOME/zsh/.aliases"
alias envs="v $XDG_CONFIG_HOME/zsh/.zshenv && source $XDG_CONFIG_HOME/zsh/.zshenv"
@ -53,15 +52,18 @@ alias ki="v $XDG_CONFIG_HOME/kitty/kitty.conf"
alias trirc="v ${XDG_CONFIG_HOME:-$HOME/.config}/tridactyl/tridactylrc"
# XDG compatibility
alias mbsync="mbsync -c "$XDG_CONFIG_HOME"/isync/mbsyncrc"
alias abook="abook --config "$XDG_CONFIG_HOME"/abook/abookrc --datafile "$XDG_DATA_HOME"/abook/addressbook"
alias lynx="lynx -cfg "$XDG_CONFIG_HOME"/lynx/lynx.cfg -lss "$XDG_CONFIG_HOME"/lynx/lynx.lss"
alias mbsync="mbsync -c $XDG_CONFIG_HOME/isync/mbsyncrc"
alias abook="abook --config $XDG_CONFIG_HOME/abook/abookrc --datafile $XDG_DATA_HOME/abook/addressbook"
alias lynx="lynx -cfg $XDG_CONFIG_HOME/lynx/lynx.cfg -lss $XDG_CONFIG_HOME/lynx/lynx.lss"
alias xsel="xsel --logfile $XDG_CACHE_HOME/xsel/log"
alias yarn="yarn --use-yarnrc $XDG_CONFIG_HOME/yarn/config"
alias gcal="gcalcli --config-folder $XDG_CONFIG_HOME/gcalcli"
alias gcalw="gcal calw now --monday --military --color-border black --color-date blue --color-now-marker cyan"
alias gpg2="gpg2 --homedir $XDG_DATA_HOME/gnupg"
# Git
alias gi="git init"
alias gcl="git clone"
alias gc="gia commit"
@ -87,6 +89,7 @@ alias grd="gia remote del"
alias grv="gia remote list"
# Docker
alias dr="docker restart"
alias drm="docker rm"
alias ds="docker stop"
@ -94,22 +97,37 @@ alias dps="docker ps -a --format 'table {{.Names}}\t{{.Status}}\t{{.Image}}\t{{.
alias dcf="docker-compose -f"
alias dcu="docker-compose up"
alias dcuf="docker-compose up -d --force-recreate"
# tmux
# Tmux
alias tns="tmux new-session -s"
alias tks="tmux kill-session -t"
alias tls="tmux ls"
alias tas="tmux attach-session -t"
# XBPS
alias xi="d xi"
# Install locally built package(s)
alias xs="$HOME/void-packages/xbps-src"
alias xis="d xbps-install -S" # install package(s)
alias xu="d xbps-install -Suv" # synchronize packages
alias xqr="xbps-query -Rs" # return list of packages that match query string
alias xqm="xbps-query -m" # return list of explicitly installed packages
alias xo="doas xbps-remove -Oo" # remove dependencies that are no longer needed and clean local cache
alias xr="d xbps-remove -Rf" # remove a single package and all its dependencies
alias xd="xbps-query -X" # what depends on this package
alias xdd='function _() { xd $1 | while read line;do (echo $2$line | sed "s/__/ /g");_ $line "__"$2 ;done }; _' # what is the dependency tree hanging from this package
alias xdp="xbps-query -x" # what packages does this package depend on
alias xff='function _() { xbps-query -Rs $1 | grep "*"; }; _' # what packages matching the string are already installed
# Install package(s)
alias xis="d xbps-install -S"
# Synchronize packages
alias xu="d xbps-install -Suv"
# Return list of packages that match query string
alias xqr="xbps-query -Rs"
# Return list of explicitly installed packages
alias xqm="xbps-query -m"
# Remove dependencies that are no longer needed and clean local cache
alias xo="doas xbps-remove -Oo"
# Remove a single package and all its dependencies
alias xr="d xbps-remove -Rf"
# What depends on this package
alias xd="xbps-query -X"
# Print the dependency tree hanging from this package
alias xdd='function _() { xd $1 | while read line;do (echo $2$line | sed "s/__/ /g");_ $line "__"$2 ;done }; _'
# Print packages this package depends on
alias xdp="xbps-query -x"
# Print installed packages matching the string
alias xff='function _() { xbps-query -Rs $1 | grep "*"; }; _'
# Put package(s) on hold
alias xph="d xbps-pkgdb -m hold"

3
term/.config/zsh/.zprofile

@ -1,3 +1,4 @@
export PATH="$HOME"/.local/bin:"$HOME"/.config/vifm/scripts:$(yarn global bin):$PATH
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
gpgconf --launch gpg-agent
[[ -z $DISPLAY && XDG_VTNR -eq 1 ]] && exec startx ${XDG_CONFIG_HOME:-~/.config}/X11/xinitrc >/dev/null 2>&1

26
up

@ -120,8 +120,8 @@ EOF
audio() {
if [ -f /etc/modprobe.d/alsa.conf ]; then
$(command -v doas) && doas cat <<EOF > /etc/modprobe.d/alsa.conf
options snd-hda-intel position fix=1
options snd-hda-intel index=0 model=alc255-asus,asus-zenbook,headset-mic
options snd-hda-intel index=0 model=alc255-asus,headset-mic
options snd-usb-audio index=1,2 vid=0x0c76,0x046d pid=0x161f,0x0826
EOF
# If the above doesn't work, one can try and add
# options snd-hda-intel dmic_detect=0
@ -154,9 +154,10 @@ sym() {
# Setup runit services
sv() {
for service in \
chronyd docker sshd wireguard wpa_supplicant \
chronyd docker sshd wpa_supplicant \
mpd dbus dhcpcd elogind acpid crond cronie \
bluetoothd bluez-alsa socklog-unix nanoklogd sndiod; do
bluetoothd bluez-alsa socklog-unix \
nanoklogd sndiod ; do
doas ln -s /etc/sv/"$service" /var/service
done
@ -174,6 +175,14 @@ sv() {
# Permissions
perm() {
doas usermod -aG bluetooth,docker,socklog $USER
echo '
permit persist keepenv $USER as root
permit nopass $USER cmd reboot
permit nopass $USER cmd xi
permit nopass $USER cmd input
permit nopass $USER wg-quick
permit nopass $USER wg
' | doas tee -a /etc/doas.conf
}
# Cronjobs
@ -193,6 +202,15 @@ ignore_pkg() {
doas ln -s doas /bin/sudo
}
# Set GUI settings
gui() {
if [ $(command -v gsettings) ]; then
gsettings set org.gtk.Settings.FileChooser show-hidden true
gsettings set org.gtk.Settings.FileChooser startup-mode cwd
gsettings set org.gtk.Settings.FileChooser sort-directories-first true
fi
}
case "$1" in
--dirs) pre_up ;;
--init) up ;;

BIN
util/dev/todo/linux.md

Binary file not shown.

BIN
util/dev/todo/work.md

Binary file not shown.

5
video/.config/mpv/mpv.conf

@ -9,8 +9,9 @@ input-ipc-server=/tmp/mpvsocket
# set minimum window size as "max" (autofit or autofit-smaller)
autofit=800x800
background="#FF0F111A"
ao=sndio
# audio-device=alsa/default
# Disabled sndio backend from v0.33.0, hopefully will be reintroduced in next release
ao=sndio
#audio-device=alsa/default
#
# OSD / OSC

2
video/.config/straw-viewer/straw-viewer.conf

@ -3,7 +3,7 @@
# CLI Straw Viewer 0.1.0 - configuration file
our $CONFIG = {
api_host => "invidious.tube",
api_host => "tube.connect.cafe",
auto_captions => 0,
autoplay_mode => 0,
cache_dir => "$ENV{HOME}/.cache/straw-viewer",

Loading…
Cancel
Save