add swaybar for minimalist battery + clock status
This commit is contained in:
parent
a191893dc6
commit
f39e227eb8
3 changed files with 40 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
|
||||
input "2:7:SynPS/2_Synaptics_TouchPad" {
|
||||
input "1739:30383:DELL08AF:00_06CB:76AF_Touchpad" {
|
||||
tap enabled
|
||||
natural_scroll enabled
|
||||
pointer_accel 0.5
|
||||
|
@ -41,7 +41,7 @@ bindsym Mod4+Shift+c kill
|
|||
bindsym Mod4+Shift+q exit
|
||||
bindsym Mod4+Return exec alacritty
|
||||
bindsym Mod4+p exec rofi -font "Roboto Mono 10" -show run
|
||||
bindsym Mod4+l exec swaylock -c 000000 -i /home/dln/i3lock.png
|
||||
bindsym Mod4+l exec swaylock -s center -c 000000 -i /home/dln/.config/sway/lock.png
|
||||
bindsym Mod4+space exec makoctl dismiss -a
|
||||
bindsym Mod4+print exec grim -g "$(slurp)" - | wl-copy
|
||||
|
||||
|
@ -53,6 +53,23 @@ hide_edge_borders both
|
|||
smart_borders on
|
||||
default_border pixel
|
||||
|
||||
tiling_drag enable
|
||||
|
||||
bar {
|
||||
position bottom
|
||||
status_command /home/dln/bin/sway-status
|
||||
workspace_buttons no
|
||||
mode overlay
|
||||
font "IBM Plex Sans Condensed 23"
|
||||
separator_symbol |
|
||||
gaps 0 2 2 3490
|
||||
height 50
|
||||
colors {
|
||||
statusline #000000dd
|
||||
background #eeeeee
|
||||
}
|
||||
}
|
||||
|
||||
seat seat0 xcursor_theme Bibata_Oil 48
|
||||
|
||||
output "eDP-1" scale 1
|
||||
|
|
BIN
.config/sway/lock.png
Normal file
BIN
.config/sway/lock.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 41 KiB |
21
bin/sway-status
Executable file
21
bin/sway-status
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
# Date and time
|
||||
date_fmt=$(date "+%b %d")
|
||||
current_time=$(date "+%H:%M")
|
||||
|
||||
#############
|
||||
# Commands
|
||||
#############
|
||||
|
||||
battery_charge=$(upower --show-info $(upower --enumerate | grep 'BAT') | egrep "percentage" | awk '{print $2}')
|
||||
battery_status=$(upower --show-info $(upower --enumerate | grep 'BAT') | egrep "state" | awk '{print $2}')
|
||||
|
||||
if [ "$battery_status" = "discharging" ]; then
|
||||
battery_pluggedin='⚠'
|
||||
else
|
||||
battery_pluggedin='⚡'
|
||||
fi
|
||||
|
||||
echo "$battery_pluggedin$battery_charge | $date_fmt | $current_time "
|
||||
sleep 5
|
||||
exec $0
|
Loading…
Reference in a new issue