~mark/.config/sway/
cd ..
cat config
# various sections of sway config
# ===== input =====
input * {
xkb_layout de
tap enabled
dwt disabled
dwtp disabled
natural_scroll disabled
drag_lock disabled
# accel_profile flat
# pointer_accel -0.6
# pointer_accel 0
}
# ===== keybinds =====
# Start a temp terminal
bindsym $mod+Shift+Return exec $term -e d26r temp bash
# screen-message
bindsym $mod+s exec sm -i -a 1 -f '#203' ' 🧌 '
# Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+f floating toggle
# default bind
bindsym $mod+Shift+space floating toggle
# ===== bar =====
bar {
position bottom
# [...]
}
cat swaylock_mark
#!/bin/sh
# mark this file as executable,
# then change your sway config (.config/sway/)
# by replacing swaystatus with this script:
#
# [...]
# bindsym $mod+Shift+s exec ~/.config/sway/swaylock_mark
# [...]
swayidle -w timeout 2 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' &
swaylock --color 000000
kill $(jobs -p)
cat swaystatus_mark
#!/bin/bash
# mark this file as executable,
# then change your sway config (.config/sway/):
#
# [...]
# bar {
# [...]
#
# # When the status_command prints a new line to stdout, swaybar updates.
# status_command ~/.config/sway/swaystatus_mark
#
# [...]
# }
# [...]
while true; do
BatteryStatus="$(upower -i /org/freedesktop/UPower/devices/battery_BAT0)"
echo "$BatteryStatus" >&2
Perc="$(echo "$BatteryStatus" | grep -i 'percentage' | grep -ioE '\-?[01-9,.]+%')"
Watt="$(echo "$BatteryStatus" | grep -i 'energy-rate' | grep -ioE '\-?[01-9,.]+ ?W' | grep -ioE '\-?[01-9]+' | head -n 1)"
Remaining="$(echo "$BatteryStatus" | grep -i 'time to empty' | grep -ioE '\-?[01-9,.]+.*')"
Time="$(date +'%H:%M:%S | %F')"
printf '%s, %sW → %s | %s \n' "$Perc" "$Watt" "$Remaining" "$Time"
snooze -H '*' -M '*' -S '/5' || sleep 5
done