Compare commits
56 Commits
50bb7df89e
...
master
Author | SHA1 | Date | |
---|---|---|---|
539102d713
|
|||
82f581d0a5
|
|||
276bb1c239
|
|||
f386c25a22
|
|||
81c5870943
|
|||
ad43053789
|
|||
418c44e47d
|
|||
17e5212f76
|
|||
d21cb6a169
|
|||
4c2b8eb267
|
|||
4356256836
|
|||
d4415cf264
|
|||
525d0a6fab
|
|||
68d65ab43f
|
|||
a520a68d04
|
|||
c84aa26825
|
|||
6e18cca897
|
|||
8f53c7fa5c
|
|||
2ebf5090e0
|
|||
d88642c3d3
|
|||
190e1cd550
|
|||
634e44346c
|
|||
d96d8d6550
|
|||
5d285d1677
|
|||
30ce3d5e1d
|
|||
e33ac6ffcb
|
|||
0e7a2b7b1e
|
|||
6847354160
|
|||
c38e7d8280
|
|||
26cad4107e
|
|||
5c684c084f | |||
113496cc2b
|
|||
50fab353e2
|
|||
b468cf8c94
|
|||
c7a14964b0
|
|||
3f5393758e
|
|||
f4465c4056
|
|||
96fb353c2c
|
|||
01bb3f6d3a
|
|||
b3a7212ff7 | |||
7f024d3cff
|
|||
811e10f04d
|
|||
188e055677
|
|||
79cf112ad4
|
|||
ee09822398
|
|||
75ebcd48e3
|
|||
8b23f5748e
|
|||
144e015223
|
|||
dd44606a6f
|
|||
a1eb0994fd
|
|||
936385d111
|
|||
808e06eaf8
|
|||
6d568a8c94
|
|||
59d99715ab
|
|||
f1b55c6be9
|
|||
afa622369b
|
13
README.md
13
README.md
@ -1,5 +1,16 @@
|
||||
# Alan's dotfiles
|
||||
Alan's dotfiles are managed with [dotdrop](https://github.com/deadc0de6/dotdrop). To set up on a new machine, do this:
|
||||
Alan's dotfiles are managed with [dotdrop](https://github.com/deadc0de6/dotdrop). To set up on a new Arch Linux machine install [dotdrop from AUR](https://aur.archlinux.org/packages/dotdrop) and do this:
|
||||
|
||||
## Setup on Arch Linux
|
||||
Install [dotdrop from AUR](https://aur.archlinux.org/packages/dotdrop) and then install the dotfiles:
|
||||
|
||||
```console
|
||||
$ git clone --recursive https://git.mjanja.ch/alanorth/dotfiles.git
|
||||
$ dotdrop install
|
||||
```
|
||||
|
||||
## Setup on Other Linux
|
||||
Bootstrap the repository's copy of dotdrop, prepare Python deps, and then install the dotfiles:
|
||||
|
||||
```console
|
||||
$ git clone --recursive https://git.mjanja.ch/alanorth/dotfiles.git
|
||||
|
51
config.yaml
51
config.yaml
@ -48,9 +48,6 @@ dotfiles:
|
||||
f_psqlrc:
|
||||
src: psqlrc
|
||||
dst: ~/.psqlrc
|
||||
f_pam_environment:
|
||||
src: pam_environment
|
||||
dst: ~/.pam_environment
|
||||
f_bashrc:
|
||||
src: bashrc
|
||||
dst: ~/.bashrc
|
||||
@ -63,6 +60,36 @@ dotfiles:
|
||||
d_local_bin:
|
||||
src: local/bin
|
||||
dst: ~/.local/bin
|
||||
f_ssh_config:
|
||||
src: ssh/config
|
||||
dst: ~/.ssh/config
|
||||
f_ssh-agent.service:
|
||||
src: config/systemd/user/ssh-agent.service
|
||||
dst: ~/.config/systemd/user/ssh-agent.service
|
||||
d_waybar:
|
||||
src: config/waybar
|
||||
dst: ~/.config/waybar
|
||||
f_fuzzel.ini:
|
||||
src: 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:
|
||||
everywhere:
|
||||
dotfiles:
|
||||
@ -87,9 +114,16 @@ profiles:
|
||||
- f_wob.socket
|
||||
- f_sway-session.target
|
||||
- f_psqlrc
|
||||
- f_pam_environment
|
||||
- f_xdg_desktop_portal_wlr_config
|
||||
- d_local_bin
|
||||
- f_ssh-agent.service
|
||||
- d_waybar
|
||||
- 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:
|
||||
dotfiles:
|
||||
- d_vim
|
||||
@ -107,7 +141,14 @@ profiles:
|
||||
- f_wob.socket
|
||||
- f_sway-session.target
|
||||
- f_psqlrc
|
||||
- f_pam_environment
|
||||
- f_xdg_desktop_portal_wlr_config
|
||||
- f_geoclue-agent.service
|
||||
- d_local_bin
|
||||
- f_ssh-agent.service
|
||||
- d_waybar
|
||||
- f_fuzzel.ini
|
||||
- f_wezterm.lua
|
||||
- f_convert-libaom.sh
|
||||
- f_dark-mode-theme.sh
|
||||
- f_light-mode-theme.sh
|
||||
- f_darkman_config.yaml
|
||||
|
1
dotfiles/config/darkman/config.yaml
Normal file
1
dotfiles/config/darkman/config.yaml
Normal file
@ -0,0 +1 @@
|
||||
usegeoclue: true
|
@ -1,7 +1,7 @@
|
||||
# -*- conf -*-
|
||||
|
||||
# 2021-01-20: avoid errors on remote systems when using less etc when the foot
|
||||
# terminfo is not available.
|
||||
# terminfo is not available. Check with `infocmp tmux-256color`.
|
||||
term=xterm-256color
|
||||
|
||||
# Use fc-list to check fonts and styles
|
||||
|
28
dotfiles/config/fuzzel/fuzzel.ini
Normal file
28
dotfiles/config/fuzzel/fuzzel.ini
Normal file
@ -0,0 +1,28 @@
|
||||
dpi-aware=auto
|
||||
# Use fc-list to check fonts and styles
|
||||
font=Source Sans Pro:style=Roman:size=12
|
||||
fields=name,generic,comment,categories,filename,keywords
|
||||
terminal=foot -e
|
||||
prompt="❯ "
|
||||
layer=overlay
|
||||
[colors]
|
||||
# Selenized colors
|
||||
# base03
|
||||
background=103c48ff
|
||||
# base0
|
||||
text=adbcbcff
|
||||
# magenta
|
||||
match=f275beff
|
||||
# base02
|
||||
selection=184956ff
|
||||
# base0
|
||||
selection-text=adbcbcff
|
||||
border=adbcbcfa
|
||||
|
||||
[border]
|
||||
radius=20
|
||||
|
||||
[dmenu]
|
||||
exit-immediately-if-empty=yes
|
||||
|
||||
# vim: ft=dosini
|
@ -18,7 +18,7 @@ set $term foot
|
||||
# Your preferred application launcher
|
||||
# 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.
|
||||
set $menu wofi --show drun -i | xargs swaymsg exec --
|
||||
set $menu fuzzel | xargs swaymsg exec --
|
||||
|
||||
### Display
|
||||
|
||||
@ -46,6 +46,9 @@ for_window [shell="xwayland"] title_format "%title [XWayland]"
|
||||
# 2022-06-27 Chromium windows launched with --app disable shortcuts
|
||||
# See: https://www.reddit.com/r/swaywm/comments/vlvpws/chromeium_app_flag_spawns_windows_with_shortcut/
|
||||
for_window [app_id="^chrome-.*__-.*$"] shortcuts_inhibitor disable
|
||||
for_window [app_id="org.twosheds.iwgtk"] floating enable
|
||||
# LibreOffice Calc import window
|
||||
for_window [app_id="soffice"] floating enable
|
||||
|
||||
### Output configuration
|
||||
#
|
||||
@ -67,7 +70,7 @@ set $WOBSOCK $XDG_RUNTIME_DIR/wob.sock
|
||||
#
|
||||
# exec swayidle -w \
|
||||
# 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'
|
||||
#
|
||||
# This will lock your screen after 300 seconds of inactivity, then turn off
|
||||
@ -127,13 +130,6 @@ input type:keyboard {
|
||||
# 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 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:
|
||||
#
|
||||
@ -256,26 +252,29 @@ mode "resize" {
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
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:
|
||||
#
|
||||
# Read `man 5 sway-bar` for more information about this section.
|
||||
bar {
|
||||
position bottom
|
||||
|
||||
# When the status_command prints a new line to stdout, swaybar updates.
|
||||
# The default just shows the current date and time.
|
||||
status_command while ~/.config/sway/status.py; do sleep 1; done
|
||||
|
||||
colors {
|
||||
statusline #ffffff
|
||||
background #323232
|
||||
inactive_workspace #32323200 #32323200 #5c5c5c
|
||||
}
|
||||
swaybar_command waybar
|
||||
}
|
||||
|
||||
include /etc/sway/config.d/*
|
||||
|
||||
# Start sway-session.target, to which kanshi.service and swayidle.service bind.
|
||||
exec_always "systemctl --user import-environment; systemctl --user start sway-session.target"
|
||||
exec_always "systemctl --user start sway-session.target"
|
||||
|
@ -1,67 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Requires the following packages on Arch Linux:
|
||||
# - ttf-twemoji (and make sure there are no other emoji fonts like noto-fonts-emoji
|
||||
# - iwd (iwctl)
|
||||
# - pulsemixer
|
||||
# - python-psutil
|
||||
|
||||
from datetime import datetime
|
||||
from subprocess import check_output
|
||||
from sys import stdout
|
||||
|
||||
from psutil import sensors_battery
|
||||
|
||||
|
||||
def write(data):
|
||||
stdout.write("%s\n" % data)
|
||||
stdout.flush()
|
||||
|
||||
|
||||
def refresh():
|
||||
try:
|
||||
ssid = (
|
||||
check_output(
|
||||
"iwctl station wlan0 show | grep -o 'Connected network.*$' | sed 's/^Connected network\s\+//'",
|
||||
shell=True,
|
||||
)
|
||||
.strip()
|
||||
.decode("utf-8")
|
||||
)
|
||||
except Exception:
|
||||
ssid = "None"
|
||||
|
||||
wifi_status = f"{ssid} 📶"
|
||||
|
||||
battery_percent = int(sensors_battery().percent)
|
||||
battery_icon = "🔋"
|
||||
battery_status = f"{battery_percent} {battery_icon}"
|
||||
power_status = "🔌" if sensors_battery().power_plugged else ""
|
||||
|
||||
try:
|
||||
# pulsemixer returns "10 10" so we need to split the output to get "10"
|
||||
volume_level = (
|
||||
check_output("pulsemixer --get-volume", shell=True).strip().decode("utf-8")
|
||||
)
|
||||
volume_level = int(volume_level.split(" ")[0])
|
||||
|
||||
if volume_level >= 70:
|
||||
volume_icon = "🔊"
|
||||
elif volume_level >= 30 and volume_level < 70:
|
||||
volume_icon = "🔉"
|
||||
elif volume_level < 30 and volume_level >= 1:
|
||||
volume_icon = "🔈"
|
||||
else:
|
||||
volume_icon = "🔇"
|
||||
except Exception:
|
||||
volume_level = ""
|
||||
volume_icon = ""
|
||||
|
||||
volume_status = f"{volume_level} {volume_icon}"
|
||||
|
||||
date = datetime.now().strftime("%Y-%m-%d %l:%M:%S %p")
|
||||
|
||||
write(f"{wifi_status} {volume_status} {battery_status} {power_status} {date}")
|
||||
|
||||
|
||||
refresh()
|
13
dotfiles/config/systemd/user/ssh-agent.service
Normal file
13
dotfiles/config/systemd/user/ssh-agent.service
Normal file
@ -0,0 +1,13 @@
|
||||
# From: https://wiki.archlinux.org/title/SSH_keys#SSH_agents
|
||||
[Unit]
|
||||
Description=SSH key agent
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
|
||||
# DISPLAY required for ssh-askpass to work
|
||||
Environment=DISPLAY=:0
|
||||
ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
@ -8,8 +8,8 @@ Type=simple
|
||||
ExecStart=/usr/bin/swayidle -w \
|
||||
timeout 300 'swaylock -f -c 000000 \
|
||||
-i /home/aorth/Downloads/3121px-Jerusalem-2013-Temple_Mount-Dome_of_the_Rock-Detail_01.jpg' \
|
||||
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 \
|
||||
-i /home/aorth/Downloads/3121px-Jerusalem-2013-Temple_Mount-Dome_of_the_Rock-Detail_01.jpg'
|
||||
|
||||
|
@ -102,11 +102,20 @@ set-option -g status-right '#[fg=colour47]#H #[fg=red]#(cut -d " " -f 1-3 /proc/
|
||||
# scrollback buffer
|
||||
set-option -g history-limit 4096
|
||||
|
||||
# 2020-07-10: According to the tmux FAQ, inside tmux TERM must be "screen",
|
||||
# "tmux" or similar (such as "tmux-256color"). Systems with older terminfo
|
||||
# like CentOS 7 don't support tmux-256color so let's keep screen-256color
|
||||
# for now.
|
||||
set-option -g default-terminal "screen-256color"
|
||||
# 2022-11-26: According to the tmux FAQ, inside tmux TERM must be "screen",
|
||||
# "tmux" or similar (such as "tmux-256color"). As of CentOS Stream 8, now
|
||||
# all my systems support this (check with `infocmp tmux-256color`).
|
||||
#
|
||||
# See: https://github.com/tmux/tmux/wiki/FAQ#how-do-i-use-a-256-colour-terminal
|
||||
set-option -g default-terminal "tmux-256color"
|
||||
|
||||
# 2022-11-26: Tell Tmux that the outside terminal supports true color. I
|
||||
# need to use the tmux-specific extension "Tc" for now until all my hosts
|
||||
# are on tmux 3.2+.
|
||||
#
|
||||
# See: https://github.com/tmux/tmux/wiki/FAQ#how-do-i-use-rgb-colour
|
||||
# See: https://jdhao.github.io/2018/10/19/tmux_nvim_true_color/
|
||||
set -as terminal-overrides ",*-256color*:Tc"
|
||||
|
||||
#### COLOUR (Solarized dark)
|
||||
|
||||
|
70
dotfiles/config/waybar/config
Normal file
70
dotfiles/config/waybar/config
Normal file
@ -0,0 +1,70 @@
|
||||
{
|
||||
"position": "bottom", // Waybar position (top|bottom|left|right)
|
||||
"height": 25, // Waybar height (to be removed for auto height)
|
||||
"spacing": 2, // Gaps between modules (4px)
|
||||
// Choose the order of the modules
|
||||
"modules-left": ["sway/workspaces", "sway/mode", "sway/scratchpad"],
|
||||
"modules-center": ["sway/window"],
|
||||
"modules-right": ["idle_inhibitor", "wireplumber", "network", "sway/language", "battery", "clock", "tray"],
|
||||
// Modules configuration
|
||||
"sway/workspaces": {
|
||||
"disable-scroll": true,
|
||||
},
|
||||
"sway/mode": {
|
||||
"format": "<span style=\"italic\">{}</span>"
|
||||
},
|
||||
"sway/scratchpad": {
|
||||
"format": "{icon} {count}",
|
||||
"show-empty": false,
|
||||
"format-icons": ["", ""],
|
||||
"tooltip": true,
|
||||
"tooltip-format": "{app}: {title}"
|
||||
},
|
||||
"sway/window": {
|
||||
"format": "{title}",
|
||||
"max-length": 50,
|
||||
},
|
||||
"sway/language": {
|
||||
"format": "{short} {variant}",
|
||||
},
|
||||
"idle_inhibitor": {
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
"activated": "",
|
||||
"deactivated": ""
|
||||
}
|
||||
},
|
||||
"tray": {
|
||||
"spacing": 10
|
||||
},
|
||||
"clock": {
|
||||
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
|
||||
"format": "{:%Y-%m-%d %H:%M %p}"
|
||||
},
|
||||
"battery": {
|
||||
"states": {
|
||||
"good": 95,
|
||||
"warning": 30,
|
||||
"critical": 15
|
||||
},
|
||||
"format": "{capacity}% {icon}",
|
||||
"format-charging": "{capacity}% ",
|
||||
"format-plugged": "{capacity}% ",
|
||||
"format-alt": "{time} {icon}",
|
||||
"format-icons": ["", "", "", "", ""]
|
||||
},
|
||||
"network": {
|
||||
"format-wifi": "{essid} ({signalStrength}%) ",
|
||||
"format-ethernet": "{ipaddr}/{cidr} ",
|
||||
"tooltip-format": "{ifname} via {gwaddr} ",
|
||||
"format-linked": "{ifname} (No IP) ",
|
||||
"format-disconnected": "Disconnected ⚠",
|
||||
"format-alt": "{ifname}: {ipaddr}/{cidr}"
|
||||
},
|
||||
"wireplumber": {
|
||||
"format": "{volume}% {icon}",
|
||||
"format-muted": "",
|
||||
"on-click": "helvum",
|
||||
"format-icons": ["", "", ""]
|
||||
},
|
||||
}
|
127
dotfiles/config/waybar/style.css
Normal file
127
dotfiles/config/waybar/style.css
Normal file
@ -0,0 +1,127 @@
|
||||
/* List of selenized-dark colors vs solarized-dark */
|
||||
|
||||
/* {
|
||||
--base03: #103c48 (002b36);
|
||||
--base02: #184956 (073642);
|
||||
--base01: #84c747 (586e75);
|
||||
--base00: #ebc13d (657b83);
|
||||
--base0: #adbcbc (839496);
|
||||
--base1: #53d6c7 (93a1a1);
|
||||
--base2: #72898f (eee8d5);
|
||||
--base3: #cad8d9 (fdf6e3);
|
||||
--yellow: #dbb32d (b58900);
|
||||
--orange: #ff665c (cb4b16);
|
||||
--red: #fa5750 (dc322f);
|
||||
--magenta: #f275be (d33682);
|
||||
--violet: #ff84cd (6c71c4);
|
||||
--blue: #4695f7 (268bd2);
|
||||
--cyan: #41c7b9 (2aa198);
|
||||
--green: #75b938 (859900);
|
||||
} */
|
||||
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-family: Source Sans Pro Semibold, "Font Awesome 6 Free", sans-serif;
|
||||
font-size: 13px;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: #103c48;
|
||||
color: #f275be;
|
||||
transition-property: background-color;
|
||||
transition-duration: .5s;
|
||||
}
|
||||
|
||||
window#waybar.hidden {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 3px;
|
||||
background-color: transparent;
|
||||
color: #adbcbc;
|
||||
border-bottom: 2px solid transparent;
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
background-color: #184956;
|
||||
border-bottom: 2px solid #fa5750;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: #f275be;
|
||||
}
|
||||
|
||||
#clock, #battery, #network, #wireplumber, #tray, #mode, #language, #idle_inhibitor, #window {
|
||||
padding: 0 10px;
|
||||
margin: 0 2px;
|
||||
color: #adbcbc;
|
||||
}
|
||||
|
||||
#clock {
|
||||
background-color: #184956;
|
||||
}
|
||||
|
||||
#battery {
|
||||
background-color: #184956;
|
||||
}
|
||||
|
||||
#battery.charging {
|
||||
color: #103c48;
|
||||
background-color: #75b938;
|
||||
}
|
||||
|
||||
#language {
|
||||
background-color: #184956;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #f275be;
|
||||
color: #53d6c7;
|
||||
}
|
||||
}
|
||||
|
||||
#battery.critical:not(.charging) {
|
||||
background-color: #fa5750;
|
||||
color: #53d6c7;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
label:focus {
|
||||
background-color: #184956;
|
||||
}
|
||||
|
||||
#network {
|
||||
background-color: #184956;
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
background-color: #103c48;
|
||||
}
|
||||
|
||||
#wireplumber {
|
||||
background-color: #184956;
|
||||
}
|
||||
|
||||
#wireplumber.muted {
|
||||
background-color: #103c48;
|
||||
}
|
||||
|
||||
#tray {
|
||||
background-color: #103c48;
|
||||
}
|
||||
|
||||
#idle_inhibitor {
|
||||
background-color: #103c48;
|
||||
}
|
||||
|
||||
#idle_inhibitor.activated {
|
||||
background-color: #184956;
|
||||
}
|
@ -1,33 +1,60 @@
|
||||
/**
|
||||
* Selenized dark variant Wofi Color theme
|
||||
**/
|
||||
|
||||
|
||||
window {
|
||||
border: 2px solid #2aa198;
|
||||
border-radius: 12px;
|
||||
background-color: rgba(4, 30, 37, 0.88);
|
||||
margin: 1px;
|
||||
border: 1px solid #adbcbc;
|
||||
background-color: #103c48;
|
||||
}
|
||||
|
||||
#input {
|
||||
color: #859900;
|
||||
border: 2px solid #2aa198;
|
||||
border-radius: 12px;
|
||||
background-color: rgba(4, 30, 37, 0.88);
|
||||
font-size: 18px;
|
||||
margin: 1px;
|
||||
border: 2px dashed #84c747;
|
||||
border-top-color: #103c48;
|
||||
border-left-color: #103c48;
|
||||
border-right-color: #103c48;
|
||||
border-bottom-color: #84c747;
|
||||
background-color: #103c48;
|
||||
color: #adbcbc;
|
||||
font: 14px DejaVu Sans Mono;
|
||||
}
|
||||
|
||||
#inner-box {
|
||||
margin: 1px;
|
||||
border: 2px none #103c48;
|
||||
background-color: #103c48;
|
||||
}
|
||||
|
||||
#outer-box {
|
||||
margin: 10px;
|
||||
margin: 1px;
|
||||
border: 2px none #103c48;
|
||||
background-color: #103c48;
|
||||
}
|
||||
|
||||
#scroll {
|
||||
margin: 5px 0px;
|
||||
font-size: 16px;
|
||||
color: #859900;
|
||||
margin: 1px;
|
||||
border: 2px solid #103c48;
|
||||
background-color: #103c48;
|
||||
color: #adbcbc;
|
||||
}
|
||||
|
||||
#scroll label {
|
||||
margin: 1px 1px;
|
||||
#text {
|
||||
margin: 1px;
|
||||
border: 1px none #103c48;
|
||||
font: 14px DejaVu Sans Mono;
|
||||
}
|
||||
|
||||
#entry:selected {
|
||||
color: #000000;
|
||||
background-color: #d33682;
|
||||
#selected {
|
||||
margin: 0px;
|
||||
border: 2px none #325b66;
|
||||
background-color: #325b66;
|
||||
color: #adbcbc;
|
||||
}
|
||||
|
||||
#entry {
|
||||
margin: 1px;
|
||||
border: 1px none #103c48;
|
||||
background-color: #103c48;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
# 2021-05-24: See https://github.com/emersion/xdg-desktop-portal-wlr/issues/124
|
||||
[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
|
||||
|
@ -1,3 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
convert "$1" -trim \( +clone -background grey25 -shadow 80x40+5+30 \) +swap -background transparent -layers merge +repage "$1-shadow.png"
|
||||
magick convert "$1" -trim \( +clone -background grey25 -shadow 80x40+5+30 \) +swap -background transparent -layers merge +repage "$1-shadow.png"
|
||||
|
@ -11,6 +11,7 @@
|
||||
# - https://trac.ffmpeg.org/wiki/Encode/AV1
|
||||
#
|
||||
# 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-04-05: update VMAF log parsing
|
||||
# 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
|
||||
fi
|
||||
|
||||
INPUT_FILE_BASENAME=$(basename "$1")
|
||||
INPUT_FILE_BASENAME=$(basename -- "$1")
|
||||
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
|
||||
# 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.
|
||||
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"
|
||||
else
|
||||
_benchmark_mode="true"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/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
|
||||
# their names, optimizing JPEGs with jpeg-archive, and stripping embedded MP4s
|
||||
@ -10,6 +10,7 @@
|
||||
|
||||
# Changes:
|
||||
#
|
||||
# v2024-04-28: support Pixel portrait images
|
||||
# v2022-08-01: fix minor syntax issue
|
||||
# v2022-01-15: support Pixel panorama images
|
||||
# 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)
|
||||
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)
|
||||
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
|
||||
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
|
||||
find . -name '*.jpg' | chrt -b 0 parallel --no-notice "jpeg-recompress -q high {} {}"
|
||||
|
||||
|
4
dotfiles/local/share/dark-mode.d/01-gtk-theme.sh
Executable file
4
dotfiles/local/share/dark-mode.d/01-gtk-theme.sh
Executable 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"
|
4
dotfiles/local/share/light-mode.d/01-gtk-theme.sh
Executable file
4
dotfiles/local/share/light-mode.d/01-gtk-theme.sh
Executable 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"
|
@ -1,3 +0,0 @@
|
||||
MOZ_ENABLE_WAYLAND=1
|
||||
QT_QPA_PLATFORM=wayland-egl
|
||||
XDG_CURRENT_DESKTOP=sway
|
1
dotfiles/ssh/config
Normal file
1
dotfiles/ssh/config
Normal file
@ -0,0 +1 @@
|
||||
AddKeysToAgent yes
|
@ -11,10 +11,17 @@ filetype on " enable file type detection
|
||||
filetype plugin on " enable file type plugins
|
||||
filetype indent on " enable file type indents
|
||||
|
||||
set background=dark
|
||||
" restrict vim to 16 ANSI colors in the palette instead of approximating 256
|
||||
set t_Co=16
|
||||
" You might have to force true color when using regular vim inside tmux as the
|
||||
" colorscheme can appear to be grayscale with "termguicolors" option enabled.
|
||||
" See: https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6
|
||||
if !has('gui_running') && &term =~ '^\%(screen\|tmux\)'
|
||||
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum" " set foreground color
|
||||
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum" " set background color
|
||||
endif
|
||||
|
||||
colorscheme selenized
|
||||
set termguicolors
|
||||
set background=dark
|
||||
|
||||
" for per-directory vimrc files
|
||||
" see: https://jezenthomas.com/how-i-write-invoices-in-vim/
|
||||
|
32
dotfiles/wezterm.lua
Normal file
32
dotfiles/wezterm.lua
Normal 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
|
@ -27,33 +27,41 @@ compinit
|
||||
if [[ "$OSTYPE" =~ ^linux.*$ ]]; then
|
||||
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" @@%}
|
||||
# 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
|
||||
# ~/.pam_environment was removed from pambase in Arch Linux recently.
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
# 2021-06-22: fix "Firefox is already running" message
|
||||
# See: https://mastransky.wordpress.com/2020/03/16/wayland-x11-how-to-run-firefox-in-mixed-environment/
|
||||
export MOZ_DBUS_REMOTE=1
|
||||
export QT_QPA_PLATFORM=wayland-egl
|
||||
export CLUTTER_BACKEND=wayland
|
||||
# 2020-02-10: https://github.com/swaywm/sway/wiki#issues-with-java-applications
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
export SDL_VIDEODRIVER=wayland
|
||||
# Signal to xdg-desktop-portal that we're on Sway
|
||||
export XDG_CURRENT_DESKTOP=sway
|
||||
|
||||
if [[ -n $WAYLAND_DISPLAY ]]; then
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
# 2021-06-22: fix "Firefox is already running" message
|
||||
# See: https://mastransky.wordpress.com/2020/03/16/wayland-x11-how-to-run-firefox-in-mixed-environment/
|
||||
export MOZ_DBUS_REMOTE=1
|
||||
export KITTY_ENABLE_WAYLAND=1
|
||||
export QT_QPA_PLATFORM=wayland-egl
|
||||
export CLUTTER_BACKEND=wayland
|
||||
# 2020-02-10: https://github.com/swaywm/sway/wiki#issues-with-java-applications
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
export SDL_VIDEODRIVER=wayland
|
||||
fi
|
||||
# 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.
|
||||
# See: https://github.com/python-poetry/poetry/issues/1917
|
||||
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
|
||||
|
||||
# For rsync breaking change in arg parsing since 2022
|
||||
# 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
|
||||
|
||||
{%@@ if profile == "balozi" @@%}
|
||||
# Enable asdf version manager zsh completions
|
||||
. /opt/asdf-vm/asdf.sh
|
||||
# Enable setting JAVA_HOME, requires the asdf-java plugin installed for this
|
||||
# user. Currently disabled because it adds a noticeable lag to the shell
|
||||
# See: https://github.com/halcyon/asdf-java
|
||||
#. ~/.asdf/plugins/java/set-java-home.zsh
|
||||
{%@@ endif @@%}
|
||||
# Enable zsh completions for mise version manager
|
||||
if [[ -f /usr/bin/mise ]]; then
|
||||
eval "$(/usr/bin/mise activate zsh)"
|
||||
fi
|
||||
|
||||
alias ls='ls -F --color=auto'
|
||||
alias less='less -R' # preserves colors in GNU coreutils' `less`
|
||||
@ -62,7 +70,6 @@ alias less='less -R' # preserves colors in GNU coreutils' `less`
|
||||
# see: https://github.com/jan-warchol/selenized/tree/master/other-apps/dircolors
|
||||
export LS_COLORS="$LS_COLORS:ow=1;7;34:st=30;44:su=30;41"
|
||||
|
||||
|
||||
# Environment
|
||||
export PS1='[%n@%m: %~]$ '
|
||||
export EDITOR=vim
|
||||
@ -91,10 +98,18 @@ jpegoptimize() {
|
||||
gm mogrify -filter Triangle -define filter:support=2 -unsharp 2x0.5+0.7+0 -dither -quality $QUALITY -define jpeg:fancy-upsampling=off -interlace Line -strip -output-directory $2 $1
|
||||
}
|
||||
|
||||
# generate random password 15 characters long
|
||||
# See: https://unix.stackexchange.com/questions/230673/how-to-generate-a-random-string
|
||||
# Generate a random hex password 20 characters long. The input from /dev/urandom
|
||||
# does not need to be any particular length due to SHA-2 256's design (for exam-
|
||||
# ple, the "avalanche" effect and the input padding), so I just read 1 byte with
|
||||
# dd. Some sites (see below) recommend using a minimum of 20 characters for hex
|
||||
# passwords.
|
||||
#
|
||||
# See: https://www.ssh.com/academy/ssh/passphrase-generator
|
||||
genpass() {
|
||||
</dev/urandom tr -dc 'A-Za-z0-9!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' | head -c 15 ; echo
|
||||
dd if=/dev/urandom bs=1 count=1 2>/dev/null | \
|
||||
sha256sum -b | \
|
||||
sed 's/ .*//' | \
|
||||
head -c 20; echo
|
||||
}
|
||||
|
||||
# set GPG TTY for pinentry-curses
|
||||
@ -103,6 +118,9 @@ export GPG_TTY=$(tty)
|
||||
# Refresh gpg-agent tty in case user switches into an X Session
|
||||
gpg-connect-agent updatestartuptty /bye >/dev/null
|
||||
|
||||
# Export location to SSH agent socket, see ssh-agent.service
|
||||
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
|
||||
|
||||
# Speed up JVM start for short-lived Java programs
|
||||
# See: https://zeroturnaround.com/rebellabs/your-maven-build-is-slow-speed-it-up/
|
||||
export MAVEN_OPTS="-XX:+TieredCompilation -XX:TieredStopAtLevel=1"
|
||||
|
Reference in New Issue
Block a user