diff --git a/bin/start_waybar.sh b/bin/start_waybar.sh deleted file mode 100755 index 2a73b6c..0000000 --- a/bin/start_waybar.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env sh - -CONFIG_DIR=$HOME/.config/sway/waybar.d -CONFIG=$CONFIG_DIR/config -CONFIG_HOST=$CONFIG_DIR/config_$(hostname) -if [ -f $CONFIG_HOST ]; then - CONFIG=$CONFIG_HOST -fi -STYLE=$CONFIG_DIR/style.css - -# Terminate already running bar instances -# pkill -SIGUSR2 -x waybar -pkill -x waybar -# execute new instance -waybar -c $CONFIG -s $STYLE - diff --git a/config b/config index 0db8164..ee1ac19 100644 --- a/config +++ b/config @@ -22,7 +22,6 @@ set $output_cmd $HOME/.local/bin/swayout set $volume_cmd $HOME/.config/sway/bin/sway_volume set $media_cmd /usr/bin/playerctl set $idle_cmd $HOME/.config/sway/bin/start_swayidle.sh -set $waybar_cmd $HOME/.config/sway/bin/start_waybar.sh set $sov_cmd $HOME/.config/sway/bin/start_sov.sh set $lock_cmd $HOME/.config/sway/bin/sway_lock lock set $move_cmd $HOME/.config/sway/bin/sway_move @@ -364,11 +363,6 @@ for_window [class="Chromium" instance="crx_cifhbcnohmdccbgoicgdjpfamggdegmo" win # matlab workaround no_focus [class="MATLAB R2021a" instance="sun-awt-X11-XDialogPeer"] -# -# Status Bar: -# -exec_always $waybar_cmd - # # Autostart # diff --git a/systemd/user/sway-session.target b/systemd/user/sway-session.target new file mode 100644 index 0000000..a6dadf9 --- /dev/null +++ b/systemd/user/sway-session.target @@ -0,0 +1,6 @@ +[Unit] +Description=Sway compositor session +Documentation=man:systemd.special +BindsTo=graphical-session.target +Wants=graphical-session-pre.target +After=graphical-session-pre.target diff --git a/systemd/user/waybar.service b/systemd/user/waybar.service new file mode 100644 index 0000000..ccaf6fa --- /dev/null +++ b/systemd/user/waybar.service @@ -0,0 +1,14 @@ +[Unit] +Description=Highly customizable Wayland bar for Sway and Wlroots based compositors. +Documentation=https://github.com/Alexays/Waybar/wiki/ +PartOf=graphical-session.target +After=graphical-session.target +Requisite=graphical-session.target + +[Service] +ExecStart=env LC_TIME=de_DE.UTF-8 /usr/bin/waybar +ExecReload=kill -SIGUSR2 $MAINPID +Restart=on-failure + +[Install] +WantedBy=graphical-session.target diff --git a/waybar.d/config b/waybar.d/config index df18a0b..f5a67ad 100644 --- a/waybar.d/config +++ b/waybar.d/config @@ -83,8 +83,30 @@ "exec": "$HOME/.config/sway/bin/waybar_mediaplayer.py 2> /dev/null" }, "clock": { - "format": "{: %H:%M, %b %d }", - // "on-click": "foot -T float khal interactive" + "format": "{:%H:%M, %b %d}", + "format-alt": "{:%A, %B %d, %Y (%R)}", + "tooltip-format": "\n{calendar}", + "calendar": { + "mode" : "year", + "mode-mon-col" : 3, + "weeks-pos" : "right", + "on-scroll" : 1, + "on-click-right": "mode", + "format": { + "months": "{}", + "days": "{}", + "weeks": "W{}", + "weekdays": "{}", + "today": "{}" + } + }, + "actions": { + "on-click-right": "mode", + "on-click-forward": "tz_up", + "on-click-backward": "tz_down", + "on-scroll-up": "shift_up", + "on-scroll-down": "shift_down" + } }, "cpu": { "format": "{usage:3}%",