diff --git a/.config/sway/config b/.config/sway/config index 2ed2267..48a22b8 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -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 diff --git a/.config/sway/lock.png b/.config/sway/lock.png new file mode 100644 index 0000000..2df308e Binary files /dev/null and b/.config/sway/lock.png differ diff --git a/bin/sway-status b/bin/sway-status new file mode 100755 index 0000000..cd0a360 --- /dev/null +++ b/bin/sway-status @@ -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