laptop sway

This commit is contained in:
Michael Chalupiak 2025-01-22 00:58:36 -05:00
parent 0771ce0401
commit 68e1f978ca
3 changed files with 108 additions and 527 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,10 +1,10 @@
#!/usr/bin/env bash
DATE=$(date +'%Y-%m-%d %I:%M:%S %p')
# BAT=$(cat /sys/class/power_supply/BAT1/capacity)
BAT=$(cat /sys/class/power_supply/BAT1/capacity)
VOL=$(pactl get-sink-volume @DEFAULT_SINK@ | tr "," "\n" | grep \% | sed s/Volume\:// | sed 's/\%.*$//' | sed 's/^.*\///' | head -n1 | sed s/\ *//)
VOL="${VOL}%"
MUTED=$(pactl get-sink-mute @DEFAULT_SINK@ | cut -d\ -f2)
# BRIGHT=$(brightnessctl | tr "\n" " " | cut -d\ -f9 | tr -d "()%")
BRIGHT=$(brightnessctl | tr "\n" " " | cut -d\ -f9 | tr -d "()%")
MEM=$(free -h | sed 's/[ ]\+/:/g' | cut -d\: -f4 | tr "\n" ":" | cut -d\: -f2)
USER=$(id -u -n)
HOST=$(cat /proc/sys/kernel/hostname)
@ -17,5 +17,4 @@ then
VOL='muted'
fi
# echo ${MEM} \| ${USER}\@${HOST} \| KB\: ${LAYOUT} \| ${NETWORK_NAME}\@${IP} \| Vol: ${VOL} \| ${BRIGHT}% Backlight \| ${BAT}\% Bat \| ${DATE}
echo ${MEM} \| ${USER}\@${HOST} \| KB\: ${LAYOUT} \| ${NETWORK_NAME}\@${IP} \| Vol: ${VOL} \| ${DATE}
echo ${MEM} \| ${USER}\@${HOST} \| KB\: ${LAYOUT} \| ${NETWORK_NAME}\@${IP} \| Vol: ${VOL} \| ${BRIGHT}% Backlight \| ${BAT}\% Bat \| ${DATE}

View File

@ -37,7 +37,7 @@ output * bg $HOME/Pictures/wallpapers/wallpaper fill
#
# Example configuration:
#
# output eDP-1 scale 1.5
output eDP-1 scale 1.5
#
# You can get the names of your outputs by running: swaymsg -t get_outputs
@ -45,11 +45,11 @@ output * bg $HOME/Pictures/wallpapers/wallpaper fill
#
# Example configuration:
#
# exec swayidle -w \
# # timeout 15 'swaylock -f -c 000000' \
# timeout 360 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
# timeout 600 'systemctl suspend-then-hibernate' \
# before-sleep 'swaylock -f -c 000000'
exec swayidle -w \
# timeout 15 'swaylock -f -c 000000' \
timeout 360 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
timeout 600 'systemctl suspend-then-hibernate' \
before-sleep 'swaylock -f -c 000000'
# set $lock 'swaylock -f'
#
@ -250,9 +250,9 @@ input "type:keyboard" {
bindsym Mod1+Shift+space input "type:keyboard" xkb_switch_layout 0
bindsym Mod1+space input "type:keyboard" xkb_switch_layout 1
# bindsym $mod+u output eDP-1 scale 1
# bindsym $mod+i output eDP-1 scale 1.5
# bindsym $mod+o output eDP-1 scale 2
bindsym $mod+u output eDP-1 scale 1
bindsym $mod+i output eDP-1 scale 1.5
bindsym $mod+o output eDP-1 scale 2
# Multimedia
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +2% && pactl get-sink-volume @DEFAULT_SINK@ | head -n 1| awk '{print substr($5, 1, length($5)-1)}' > $WOBSOCK