Compare commits

...

5 Commits

Author SHA1 Message Date
KK
6953e4f8a2 Store screenshots in Pictures 2026-07-02 22:44:01 +02:00
KK
12d9019278 PI_OFFLINE 2026-07-02 22:39:03 +02:00
KK
d5e87dba70 pi config for tmux 2026-06-28 23:16:28 +02:00
KK
a2cecfe691 Update 2026-06-27 14:27:02 +02:00
KK
ac1005b842 Show battery status in sway bar 2026-06-26 00:05:57 +02:00
7 changed files with 43 additions and 20 deletions

View File

@@ -13,6 +13,8 @@ export VISUAL=kak
export BROWSER=firefox
export TERMINAL=foot
export PI_OFFLINE=1
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists

View File

@@ -19,7 +19,7 @@
],
"index_files": true,
// "color_scheme": "gruvbox (Light) (Soft).sublime-color-scheme",
"font_size": 11,
"font_size": 10,
"font_face": "Cascadia Code",
"theme": "Adaptive.sublime-theme",
"folder_exclude_patterns": ["external", ".svn", ".git", ".hg", "CVS", ".Trash", ".Trash-*"],

View File

@@ -232,13 +232,13 @@ bindsym $mod+r mode "resize"
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-; pkill -USR1 -f "$HOME/.config/sway/status.sh"
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+; pkill -USR1 -f "$HOME/.config/sway/status.sh"
# Special key to take a screenshot with grim
bindsym Print exec sh -c 'mkdir -p ~/screenshots; f=~/screenshots/$(date +%F-%H%M%S).png; grim "$f"; wl-copy < "$f"'
bindsym Shift+Print exec sh -c 'mkdir -p ~/screenshots; f=~/screenshots/$(date +%F-%H%M%S).png; grim -g "$(slurp)" "$f"; wl-copy < "$f"'
bindsym Print exec sh -c 'mkdir -p ~/screenshots; f=~/Pictures/$(date +%F-%H%M%S).png; grim "$f"; wl-copy < "$f"'
bindsym Shift+Print exec sh -c 'mkdir -p ~/screenshots; f=~/Pictures/$(date +%F-%H%M%S).png; grim -g "$(slurp)" "$f"; wl-copy < "$f"'
# Push-to-talk: hold Caps Lock to record, release to transcribe.
# xkb_options caps:none above disables the normal Caps Lock toggle, so bind by keycode.
bindcode 66 exec sh -c 'voxtype record start; pkill -USR1 -f "$HOME/.config/sway/status.sh"'
bindcode --release 66 exec sh -c 'voxtype record stop; pkill -USR1 -f "$HOME/.config/sway/status.sh"'
# bindcode 66 exec sh -c 'voxtype record start; pkill -USR1 -f "$HOME/.config/sway/status.sh"'
# bindcode --release 66 exec sh -c 'voxtype record stop; pkill -USR1 -f "$HOME/.config/sway/status.sh"'
#
# Status Bar:

View File

@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
print_status() {
volume_info=$(wpctl get-volume @DEFAULT_AUDIO_SINK@ 2>/dev/null)
@@ -7,21 +7,28 @@ print_status() {
brightness=$(brightnessctl -m 2>/dev/null | awk -F, '{print $4}')
voxtype_state=$(voxtype status 2>/dev/null)
case "$voxtype_state" in
recording) voxtype=' | VOX REC' ;;
transcribing) voxtype=' | VOX ...' ;;
*) voxtype='' ;;
esac
battery_device=$(upower -e 2>/dev/null | grep -m 1 battery)
if [ -n "$battery_device" ]; then
battery=$(upower -i "$battery_device" 2>/dev/null | awk '
/state/ { state=$2 }
/percentage/ { percentage=$2 }
END {
if (percentage != "") {
printf "%s", percentage
if (state != "") printf " %s", state
}
}
')
fi
printf 'VOL %s | BRI %s%s | %s\n' "${volume:-n/a}" "${brightness:-n/a}" "$voxtype" "$(date +'%Y-%m-%d %H:%M:%S')"
printf 'VOL %s | BRI %s | BAT %s | %s\n' "${volume:-n/a}" "${brightness:-n/a}" "${battery:-n/a}" "$(date +'%Y-%m-%d %H:%M:%S')"
}
trap print_status USR1
print_status
while :; do
sleep 1 &
sleep 60 &
wait $!
print_status
done

View File

@@ -1,8 +1,11 @@
# ~/.config/tmux/tmux.conf
# Enable extended key reporting for terminals/apps that support it.
# set -g extended-keys on
# set -g extended-keys-format csi-u
set -g extended-keys on
set -g extended-keys-format csi-u
# To fix ctrl-b + direction (hjkl) switching pane multiple times after hitting the direction again
set-option -g repeat-time 150
# Index windows/tabs and panes from 1 instead of 0.
set -g base-index 1

View File

@@ -40,7 +40,8 @@ desktop_packages=(
xdg-desktop-portal-gtk
xdg-user-dirs
xdg-utils
grim
grim # For screenshotting the desktop
upower # For querying battery charge
)
media_packages=(
@@ -48,8 +49,13 @@ media_packages=(
pipewire-pulse
pipewire-alsa
pipewire-jack
wireplumber
pipewire-libcamera
libcamera
pavucontrol
wireplumber
bluez
bluez-utils # bluetooth
rtkit # There was a pipewire error so I decided to add this, "changes scheduling policy of user threads to realtime"
ffmpeg
imv
mpv
@@ -155,6 +161,8 @@ pacman -Syu --needed \
updatedb
systemctl enable sshd.service
systemctl enable rtkit-daemon.service
systemctl enable --now bluetooth.service
printf '\nChroot setup complete. Exit, unmount /mnt, reboot, then log in as %s.\n' "${username}"
printf 'After first login, run: xdg-user-dirs-update\n'

View File

@@ -1,6 +1,9 @@
SRC=$HOME/dotfiles
rm $HOME/.bashrc
rm $HOME/.bash_profile
[ -e $HOME/.bashrc ] && echo "I won't install ~/.bashrc because there is already a file like that; skipping setup for this file."
[ -e $HOME/.vimrc ] && echo "I won't install ~/.vimrc because there is already a file like that; skipping setup for this file."
[ -e $HOME/.bash_profile ] && echo "I won't install ~/.bash_profile because there is already a file like that; skipping setup for this file."
[ -d $HOME/.config ] && echo "I won't install ~/.config because there is already a directory like that; skipping setup for this directory."
[ -d $HOME/bin ] && echo "I won't install ~/bin because there is already a directory like that; skipping setup for this directory."
ln -sf $SRC/.bashrc $HOME/.bashrc
ln -sf $SRC/.vimrc $HOME/.vimrc
ln -sf $SRC/.bash_profile $HOME/.bash_profile