macbook m1 files for sway/wayland, initial commit

This commit is contained in:
markmental 2025-11-16 17:23:28 -05:00
commit 90f520f8e3
3 changed files with 29 additions and 4 deletions

View file

@ -35,7 +35,7 @@ exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
exec --no-startup-id nm-applet exec --no-startup-id nm-applet
# set wallpaper # 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. # Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status 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 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 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 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 # Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod floating_modifier $mod
@ -58,7 +63,7 @@ bindsym $mod+Return exec alacritty
bindsym $mod+Shift+q kill bindsym $mod+Shift+q kill
# start dmenu (a program launcher) # 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: # A more modern dmenu replacement is rofi:
# bindcode $mod+40 exec "rofi -modi drun,run -show drun" # bindcode $mod+40 exec "rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a # 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 $mod+r mode "resize"
bindsym Ctrl+Mod1+p exec grim \
~/Pictures/Screenshots/$(date +'%Y-%m-%dT%H:%M:%S').png
# ================================ # ================================
# Miku i3bar # Miku i3bar
# ================================ # ================================
bar { bar {
status_command i3status status_command i3status
position top
colors { colors {
background #000000 background #000000
statusline #00eaff statusline #00eaff
@ -214,5 +223,3 @@ bar {
} }

View file

@ -5,11 +5,21 @@ general {
# Order of modules in the bar # Order of modules in the bar
order += "read_file hostname" order += "read_file hostname"
order += "read_file battery"
order += "disk /" order += "disk /"
order += "memory" order += "memory"
order += "load" order += "load"
order += "tztime local" order += "tztime local"
# battery usage
read_file battery {
path = "/tmp/battery_percent"
format = "🔋 %content"
}
# Hostname shown as 🖥 debi3.lan # Hostname shown as 🖥 debi3.lan
read_file hostname { read_file hostname {
path = "/home/mrkmntal/.hostname_lan" path = "/home/mrkmntal/.hostname_lan"

8
i3status/update_battery.sh Executable file
View file

@ -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