diff --git a/i3/config b/i3/config index 7c70b18..466039d 100644 --- a/i3/config +++ b/i3/config @@ -35,7 +35,7 @@ exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork exec --no-startup-id nm-applet # set wallpaper -exec --no-startup-id feh --bg-tile ~/Pictures/mikugooba.jpg +exec_always --no-startup-id swaybg -i ~/Pictures/mikugooba.jpg -m tile # Use pactl to adjust volume in PulseAudio. set $refresh_i3status killall -SIGUSR1 i3status @@ -43,6 +43,11 @@ bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status +# Increase brightness +bindsym XF86MonBrightnessUp exec brightnessctl set +10% +# Decrease brightness +bindsym XF86MonBrightnessDown exec brightnessctl set 10%- + # Use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod @@ -58,7 +63,7 @@ bindsym $mod+Return exec alacritty bindsym $mod+Shift+q kill # start dmenu (a program launcher) -bindsym $mod+d exec --no-startup-id dmenu_run +bindsym $mod+d exec --no-startup-id wmenu-run # A more modern dmenu replacement is rofi: # bindcode $mod+40 exec "rofi -modi drun,run -show drun" # There also is i3-dmenu-desktop which only displays applications shipping a @@ -197,11 +202,15 @@ client.urgent #ff55ff #000000 #ffffff #ff55ff #ff55ff bindsym $mod+r mode "resize" +bindsym Ctrl+Mod1+p exec grim \ + ~/Pictures/Screenshots/$(date +'%Y-%m-%dT%H:%M:%S').png + # ================================ # Miku i3bar # ================================ bar { status_command i3status + position top colors { background #000000 statusline #00eaff @@ -214,5 +223,3 @@ bar { } - - diff --git a/i3status/config b/i3status/config index bac4ccf..5397c81 100644 --- a/i3status/config +++ b/i3status/config @@ -5,11 +5,21 @@ general { # Order of modules in the bar order += "read_file hostname" +order += "read_file battery" order += "disk /" order += "memory" order += "load" order += "tztime local" + +# battery usage + +read_file battery { + path = "/tmp/battery_percent" + format = "🔋 %content" +} + + # Hostname shown as 🖥 debi3.lan read_file hostname { path = "/home/mrkmntal/.hostname_lan" diff --git a/i3status/update_battery.sh b/i3status/update_battery.sh new file mode 100755 index 0000000..8f0c25f --- /dev/null +++ b/i3status/update_battery.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +PERCENT=$(upower -i /org/freedesktop/UPower/devices/battery_macsmc_battery \ + | awk -F: '/percentage/ {gsub(/ /,"",$2); print $2}') + +# fallback so i3status never crashes +echo "${PERCENT:-N/A}" > /tmp/battery_percent +