Compare commits

...

28 Commits

Author SHA1 Message Date
539102d713 dotfiles/zshrc: use vulkan on Sway
Seems to work fine on all Intel now.
2025-02-10 09:14:43 +03:00
82f581d0a5 dotfiles/zshrc: enable Vulkan renderer on balozi 2025-01-02 10:32:24 +03:00
276bb1c239 dotfiles/local/bin/convert-libaom.sh: import latest 2024-12-31 10:37:57 +03:00
f386c25a22 dotfiles: minor updates for Sway v1.10 2024-10-31 09:39:00 +03:00
81c5870943 Use geoclue in darkman
Otherwise it doesn't realize that we have changed location.

See: https://darkman.whynothugo.nl/
2024-07-13 21:24:56 +03:00
ad43053789 Add dark-mode and light-mode scripts for darkman 2024-07-04 22:22:04 +03:00
418c44e47d dotfiles/local/bin/pre-process-media.sh: update
Add support for Pixel TopShot videos.
2024-06-17 21:56:45 +03:00
17e5212f76 dotfiles/config/waybar: hardcode Font Awesome 2024-05-06 17:06:36 +03:00
d21cb6a169 dotfiles/local/bin: update pre-process-media.sh 2024-04-28 13:11:48 +03:00
4c2b8eb267 dotfiles/zshrc: remove NODE_OPTIONS
I set this via .mise.toml in each project now.
2024-03-23 16:37:01 +03:00
4356256836 dotfiles/zshrc: disable vulkan WLR_RENDERER
This is still buggy. Lots of flickering.
2024-03-23 16:36:35 +03:00
d4415cf264 dotfiles/config/sway: use foot instead of wezterm
foot feels more minimal.
2024-03-23 16:35:12 +03:00
525d0a6fab dotfiles/zshrc: remove node_modules/bin
Don't need this anymore since we've moved on to DSpace 7 everywhere.
2024-03-18 11:10:43 +03:00
68d65ab43f dotfiles/wezterm.lua: use Selenized Dark theme
As of recent Wezterm release.
2024-01-30 08:50:50 +03:00
a520a68d04 dotfiles/zshrc: remove RTX_HIDE_UPDATE_WARNING
I don't think rtx has used this for some time, and now that rtx was
renamed to mise it definitely won't read it.
2024-01-04 10:07:55 +03:00
c84aa26825 dotfiles/zshrc: rtx→mise 2024-01-04 09:13:32 +03:00
6e18cca897 config.yaml: add convert-libaom.sh
Script to convert files to AV1. I don't know if this works actually
because we use dotdrop to manage ~/.local/bin as well.
2024-01-01 22:02:20 +03:00
8f53c7fa5c dotfiles/zshrc: use vulkan renderer in Sway 2023-12-27 08:39:57 +03:00
2ebf5090e0 Revert "dotfiles/zshrc: use vulkan in Sway"
This reverts commit 634e44346c.

This actually removed the setting entirely instead of enabling it.
2023-12-27 08:38:54 +03:00
d88642c3d3 Revert "dotfiles/zshrc: remove MOZ_ENABLE_WAYLAND"
This reverts commit d96d8d6550.

Thunderbird still needs this!
2023-12-26 10:01:17 +03:00
190e1cd550 Use wezterm instead of foot
It's fast and Wayland native, but doesn't have the weird character
box width glitch.
2023-12-24 22:10:20 +03:00
634e44346c dotfiles/zshrc: use vulkan in Sway
This is much more stable than the last time I tried it.
2023-12-24 22:09:14 +03:00
d96d8d6550 dotfiles/zshrc: remove MOZ_ENABLE_WAYLAND
Wayland is enabled by default on all platforms as of Firefox 121.
2023-12-22 08:35:29 +03:00
5d285d1677 Add ~/.wezterm.lua
Contains basic config with Selenized colorscheme.
2023-12-10 21:47:50 +03:00
30ce3d5e1d dotfiles/zshrc: only use some opts on dev hosts
Only use the Node.js and rsync variables on dev hosts.
2023-09-26 09:58:24 +03:00
e33ac6ffcb dotfiles/zshrc: add RSYNC_OLD_ARGS
Some time last year rsync made a breaking change around argument
parsing.
2023-09-26 09:57:24 +03:00
0e7a2b7b1e dotfiles/zshrc: add NODE_OPTIONS
I need this so Angular applications like DSpace's frontend don't
crash during build due to JavaScript heap memory.
2023-09-26 09:56:35 +03:00
6847354160 dotfiles: use fuzzel instead of wofi
Wofi is unmaintained since late 2022.
2023-08-22 15:05:02 +03:00
12 changed files with 112 additions and 31 deletions

View File

@ -72,6 +72,24 @@ dotfiles:
f_fuzzel.ini: f_fuzzel.ini:
src: config/fuzzel/fuzzel.ini src: config/fuzzel/fuzzel.ini
dst: ~/.config/fuzzel/fuzzel.ini dst: ~/.config/fuzzel/fuzzel.ini
f_wezterm.lua:
src: wezterm.lua
dst: ~/.wezterm.lua
f_convert-libaom.sh:
src: local/bin/convert-libaom.sh
dst: ~/.local/bin/convert-libaom.sh
chmod: '755'
f_dark-mode-theme.sh:
src: local/share/dark-mode.d/01-gtk-theme.sh
dst: ~/.local/share/dark-mode.d/01-gtk-theme.sh
chmod: '755'
f_light-mode-theme.sh:
src: local/share/light-mode.d/01-gtk-theme.sh
dst: ~/.local/share/light-mode.d/01-gtk-theme.sh
chmod: '755'
f_darkman_config.yaml:
src: config/darkman/config.yaml
dst: ~/.config/darkman/config.yaml
profiles: profiles:
everywhere: everywhere:
dotfiles: dotfiles:
@ -101,6 +119,11 @@ profiles:
- f_ssh-agent.service - f_ssh-agent.service
- d_waybar - d_waybar
- f_fuzzel.ini - f_fuzzel.ini
- f_wezterm.lua
- f_convert-libaom.sh
- f_dark-mode-theme.sh
- f_light-mode-theme.sh
- f_darkman_config.yaml
knafeh: knafeh:
dotfiles: dotfiles:
- d_vim - d_vim
@ -124,3 +147,8 @@ profiles:
- f_ssh-agent.service - f_ssh-agent.service
- d_waybar - d_waybar
- f_fuzzel.ini - f_fuzzel.ini
- f_wezterm.lua
- f_convert-libaom.sh
- f_dark-mode-theme.sh
- f_light-mode-theme.sh
- f_darkman_config.yaml

View File

@ -0,0 +1 @@
usegeoclue: true

View File

@ -18,7 +18,7 @@ set $term foot
# Your preferred application launcher # Your preferred application launcher
# Note: pass the final command to swaymsg so that the resulting window can be opened # Note: pass the final command to swaymsg so that the resulting window can be opened
# on the original workspace that the command was run on. # on the original workspace that the command was run on.
set $menu wofi --show drun -i | xargs swaymsg exec -- set $menu fuzzel | xargs swaymsg exec --
### Display ### Display
@ -70,7 +70,7 @@ set $WOBSOCK $XDG_RUNTIME_DIR/wob.sock
# #
# exec swayidle -w \ # exec swayidle -w \
# timeout 300 'swaylock -f -c 000000' \ # timeout 300 'swaylock -f -c 000000' \
# timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ # timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
# before-sleep 'swaylock -f -c 000000' # before-sleep 'swaylock -f -c 000000'
# #
# This will lock your screen after 300 seconds of inactivity, then turn off # This will lock your screen after 300 seconds of inactivity, then turn off
@ -130,13 +130,6 @@ input type:keyboard {
# Exit sway (logs you out of your Wayland session) # Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit' bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
bindsym XF86AudioRaiseVolume exec pamixer -ui 5 && pamixer --get-volume > $WOBSOCK
bindsym XF86AudioLowerVolume exec pamixer -ud 5 && pamixer --get-volume > $WOBSOCK
bindsym XF86AudioMute exec pamixer --toggle-mute && ( pamixer --get-mute && echo 0 > $WOBSOCK ) || pamixer --get-volume > $WOBSOCK
bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
bindsym XF86MonBrightnessUp exec light -S "$(light -G | awk '{ print int(($1 + .72) * 1.4) }')" && light -G | cut -d'.' -f1 > $WOBSOCK
bindsym XF86MonBrightnessDown exec light -S "$(light -G | awk '{ print int($1 / 1.4) }')" && light -G | cut -d'.' -f1 > $WOBSOCK
# #
# Moving around: # Moving around:
# #
@ -259,6 +252,19 @@ mode "resize" {
bindsym Escape mode "default" bindsym Escape mode "default"
} }
bindsym $mod+r mode "resize" bindsym $mod+r mode "resize"
#
# Utilities:
#
# Special keys to adjust volume via PulseAudio
bindsym --locked XF86AudioMute exec pamixer --toggle-mute && ( pamixer --get-mute && echo 0 > $WOBSOCK ) || pamixer --get-volume > $WOBSOCK
bindsym --locked XF86AudioLowerVolume exec pamixer -ud 5 && pamixer --get-volume > $WOBSOCK
bindsym --locked XF86AudioRaiseVolume exec pamixer -ui 5 && pamixer --get-volume > $WOBSOCK
bindsym --locked XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
# Special keys to adjust brightness via brightnessctl
bindsym --locked XF86MonBrightnessUp exec light -S "$(light -G | awk '{ print int(($1 + .72) * 1.4) }')" && light -G | cut -d'.' -f1 > $WOBSOCK
bindsym --locked XF86MonBrightnessDown exec light -S "$(light -G | awk '{ print int($1 / 1.4) }')" && light -G | cut -d'.' -f1 > $WOBSOCK
# #
# Status Bar: # Status Bar:

View File

@ -8,8 +8,8 @@ Type=simple
ExecStart=/usr/bin/swayidle -w \ ExecStart=/usr/bin/swayidle -w \
timeout 300 'swaylock -f -c 000000 \ timeout 300 'swaylock -f -c 000000 \
-i /home/aorth/Downloads/3121px-Jerusalem-2013-Temple_Mount-Dome_of_the_Rock-Detail_01.jpg' \ -i /home/aorth/Downloads/3121px-Jerusalem-2013-Temple_Mount-Dome_of_the_Rock-Detail_01.jpg' \
timeout 600 'swaymsg "output * dpms off"' \ timeout 600 'swaymsg "output * power off"' \
resume 'swaymsg "output * dpms on"' \ resume 'swaymsg "output * power on"' \
before-sleep 'swaylock -f -c 000000 \ before-sleep 'swaylock -f -c 000000 \
-i /home/aorth/Downloads/3121px-Jerusalem-2013-Temple_Mount-Dome_of_the_Rock-Detail_01.jpg' -i /home/aorth/Downloads/3121px-Jerusalem-2013-Temple_Mount-Dome_of_the_Rock-Detail_01.jpg'

View File

@ -22,7 +22,7 @@
* { * {
border: none; border: none;
border-radius: 0; border-radius: 0;
font-family: Source Sans Pro Semibold, sans-serif; font-family: Source Sans Pro Semibold, "Font Awesome 6 Free", sans-serif;
font-size: 13px; font-size: 13px;
min-height: 0; min-height: 0;
} }

View File

@ -1,4 +1,4 @@
# 2021-05-24: See https://github.com/emersion/xdg-desktop-portal-wlr/issues/124 # 2021-05-24: See https://github.com/emersion/xdg-desktop-portal-wlr/issues/124
[screencast] [screencast]
chooser_cmd = wofi -d -n --prompt='Select the monitor to share:' chooser_cmd = fuzzel --dmenu --lines=3 --no-icons --prompt='Select the monitor to share:'
chooser_type = dmenu chooser_type = dmenu

View File

@ -11,6 +11,7 @@
# - https://trac.ffmpeg.org/wiki/Encode/AV1 # - https://trac.ffmpeg.org/wiki/Encode/AV1
# #
# Changes: # Changes:
# 2024-01-21: minor improvement to handling of output file name
# 2022-06-13: use _max_crf in mkvpropedit if we don't find an acceptable vmaf # 2022-06-13: use _max_crf in mkvpropedit if we don't find an acceptable vmaf
# 2022-04-05: update VMAF log parsing # 2022-04-05: update VMAF log parsing
# 2021-10-21: I tested 2-pass and found it doesn't do anything for constant # 2021-10-21: I tested 2-pass and found it doesn't do anything for constant
@ -53,15 +54,16 @@ elif [[ ! -r "$1" ]]; then
exit 1 exit 1
fi fi
INPUT_FILE_BASENAME=$(basename "$1") INPUT_FILE_BASENAME=$(basename -- "$1")
INPUT_FILE_EXTENSION=${INPUT_FILE_BASENAME##*.} INPUT_FILE_EXTENSION=${INPUT_FILE_BASENAME##*.}
INPUT_FILE_DIRNAME=$(dirname "$1") INPUT_FILE_DIRNAME=$(dirname -- "$1")
# Check if an output file name was specified (like if we are calling from the # Check if an output file name was specified (like if we are calling from the
# benchmarking script, in which case we want to exit as soon as possible). If # benchmarking script, in which case we want to exit as soon as possible). If
# not then we can continue with a simple filename based on the input file's. # not then we can continue with a simple filename based on the input file's.
if [[ -z $_output_file ]]; then if [[ -z $_output_file ]]; then
_output_file="${INPUT_FILE_BASENAME/.*/}.webm"; # Strip file extension from end of string and replace with webm
_output_file="${INPUT_FILE_BASENAME%$INPUT_FILE_EXTENSION}webm";
_benchmark_mode="false" _benchmark_mode="false"
else else
_benchmark_mode="true" _benchmark_mode="true"

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# #
# pre-process-media.sh v2022-08-01 # pre-process-media.sh v2024-04-28
# #
# Prepare a directory of images and videos for long-term archival by normalizing # Prepare a directory of images and videos for long-term archival by normalizing
# their names, optimizing JPEGs with jpeg-archive, and stripping embedded MP4s # their names, optimizing JPEGs with jpeg-archive, and stripping embedded MP4s
@ -10,6 +10,7 @@
# Changes: # Changes:
# #
# v2024-04-28: support Pixel portrait images
# v2022-08-01: fix minor syntax issue # v2022-08-01: fix minor syntax issue
# v2022-01-15: support Pixel panorama images # v2022-01-15: support Pixel panorama images
# v2021-12-26: add 'ftypiso6' for Nokia Android 9 MVIMG files, anchor regexes to # v2021-12-26: add 'ftypiso6' for Nokia Android 9 MVIMG files, anchor regexes to
@ -90,6 +91,9 @@ perl-rename 's/^PXL_([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]+)\.NIGHT\.jpg/$1-$2-$3
# Rename PXL_20211118_162823829.PORTRAIT.jpg to 2021-11-18_162823829.jpg (Pixel Portrait mode) # Rename PXL_20211118_162823829.PORTRAIT.jpg to 2021-11-18_162823829.jpg (Pixel Portrait mode)
perl-rename 's/^PXL_([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]+)\.PORTRAIT\.jpg/$1-$2-$3_$4.jpg/' *.jpg perl-rename 's/^PXL_([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]+)\.PORTRAIT\.jpg/$1-$2-$3_$4.jpg/' *.jpg
# Rename PXL_20230413_231026946.PORTRAIT.ORIGINAL.jpg to 2023-04-13_231026946.jpg (Pixel portrait original?)
perl-rename 's/^PXL_([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]+)\.PORTRAIT\.ORIGINAL\.jpg/$1-$2-$3_$4.jpg/' *.jpg
# Rename PXL_20210925_150154460.PANO.jpg to 2021-09-25_150154460.jpg (Pixel Panorama mode) # Rename PXL_20210925_150154460.PANO.jpg to 2021-09-25_150154460.jpg (Pixel Panorama mode)
perl-rename 's/^PXL_([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]+)\.PANO\.jpg/$1-$2-$3_$4.jpg/' *.jpg perl-rename 's/^PXL_([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]+)\.PANO\.jpg/$1-$2-$3_$4.jpg/' *.jpg
@ -117,6 +121,9 @@ perl-rename 's/^([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]+)\.mp4/$1-$2-$3_$4.mp4/' *
# Rename PXL_20210714_145336054.mp4 to 2021-07-14_145336054.mp4 # Rename PXL_20210714_145336054.mp4 to 2021-07-14_145336054.mp4
perl-rename 's/PXL_([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]+)\.mp4/$1-$2-$3_$4\.mp4/' *.mp4 perl-rename 's/PXL_([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]+)\.mp4/$1-$2-$3_$4\.mp4/' *.mp4
# Rename PXL_20240101_142720131.TS.MP4 to 2024-01-01_142720131.mp4 (Pixel 7a TopShot feature)
perl-rename 's/PXL_([0-9]{4})([0-9]{2})([0-9]{2})_([0-9]+)\.TS\.mp4/$1-$2-$3_$4\.mp4/' *.mp4
# Optimize JPEGs with jpeg-archive # Optimize JPEGs with jpeg-archive
find . -name '*.jpg' | chrt -b 0 parallel --no-notice "jpeg-recompress -q high {} {}" find . -name '*.jpg' | chrt -b 0 parallel --no-notice "jpeg-recompress -q high {} {}"

View File

@ -0,0 +1,4 @@
#!/usr/bin/bash
gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark"
gsettings set org.gnome.desktop.interface color-scheme "prefer-dark"

View File

@ -0,0 +1,4 @@
#!/usr/bin/bash
gsettings set org.gnome.desktop.interface gtk-theme "Adwaita"
gsettings set org.gnome.desktop.interface color-scheme "prefer-light"

32
dotfiles/wezterm.lua Normal file
View File

@ -0,0 +1,32 @@
-- Pull in the wezterm API
local wezterm = require 'wezterm'
-- This table will hold the configuration.
local config = {}
-- In newer versions of wezterm, use the config_builder which will
-- help provide clearer error messages
if wezterm.config_builder then
config = wezterm.config_builder()
end
config.font = wezterm.font 'Cascadia Mono'
config.font_size = 13.5
-- This is where you actually apply your config choices
config.color_scheme = 'Selenized Dark (Gogh)'
-- Disable bold colors for Solarized / Selenized
config.bold_brightens_ansi_colors = false
config.hide_tab_bar_if_only_one_tab = true
-- Disable default padding
config.window_padding = {
left = 0,
right = 0,
top = 0,
bottom = 0,
}
-- and finally, return the configuration to wezterm
return config

View File

@ -27,11 +27,6 @@ compinit
if [[ "$OSTYPE" =~ ^linux.*$ ]]; then if [[ "$OSTYPE" =~ ^linux.*$ ]]; then
PATH=~/.local/bin:$PATH PATH=~/.local/bin:$PATH
# System Node.js with local "global" package prefix, for DSpace build environment:
# $ npm config set prefix ~/.node_modules
# $ npm install -g bower grunt grunt-cli
PATH=$PATH:~/.node_modules/bin
{%@@ if profile == "knafeh" or profile == "balozi" @@%} {%@@ if profile == "knafeh" or profile == "balozi" @@%}
# Export these variables in our TTY so that Sway can read them when it # Export these variables in our TTY so that Sway can read them when it
# starts. It's not pretty, but it's all we can do since support for # starts. It's not pretty, but it's all we can do since support for
@ -47,23 +42,25 @@ if [[ "$OSTYPE" =~ ^linux.*$ ]]; then
export SDL_VIDEODRIVER=wayland export SDL_VIDEODRIVER=wayland
# Signal to xdg-desktop-portal that we're on Sway # Signal to xdg-desktop-portal that we're on Sway
export XDG_CURRENT_DESKTOP=sway export XDG_CURRENT_DESKTOP=sway
# 2022-12-26: use Vulkan renderer in Sway
# 2023-01-03: a bit buggy on older Intel, especially in Thunderbird (even on new Intel)
#export WLR_RENDERER=vulkan
{%@@ endif @@%}
# 2023-02-05: tell pip/poetry not to probe for keyrings. I'm not publishing # 2023-02-05: tell pip/poetry not to probe for keyrings. I'm not publishing
# packages to pypi.org and the popup during pip/poetry install is annoying. # packages to pypi.org and the popup during pip/poetry install is annoying.
# See: https://github.com/python-poetry/poetry/issues/1917 # See: https://github.com/python-poetry/poetry/issues/1917
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
# Don't show rtx version update warnings # For rsync breaking change in arg parsing since 2022
export RTX_HIDE_UPDATE_WARNING=1 # See: https://github.com/bit-team/backintime/issues/1247
export RSYNC_OLD_ARGS=1
{%@@ endif @@%}
{%@@ if profile == "knafeh" or profile == "balozi" @@%}
export WLR_RENDERER=vulkan
{%@@ endif @@%}
fi fi
# Enable zsh completions for rtx version manager # Enable zsh completions for mise version manager
if [[ -f /usr/bin/rtx ]]; then if [[ -f /usr/bin/mise ]]; then
eval "$(/usr/bin/rtx activate zsh)" eval "$(/usr/bin/mise activate zsh)"
fi fi
alias ls='ls -F --color=auto' alias ls='ls -F --color=auto'