diff --git a/bin/start_swayidle.sh b/bin/start_swayidle.sh index abc4806..c3a5a65 100755 --- a/bin/start_swayidle.sh +++ b/bin/start_swayidle.sh @@ -11,7 +11,7 @@ SUS_CMD="$HOME/.config/sway/bin/sway_suspend" # 120 min suspend pkill -x swayidle swayidle -w \ - timeout 1500 "$TERM_CMD bash -c 'dunstify -r 125 -t 300 display\ will\ turn\ off\ soon'" \ + timeout 1500 "$TERM_CMD bash -c 'dunstify -r 123 -u critical -t 300 display\ will\ turn\ off\ soon'" \ resume "$LOCK_CMD on" \ timeout 1800 "$LOCK_CMD off" \ timeout 2700 "$LOCK_CMD lockonly" \ diff --git a/bin/sway_brightness b/bin/sway_brightness index eaeed36..fe7d5b4 100755 --- a/bin/sway_brightness +++ b/bin/sway_brightness @@ -3,30 +3,38 @@ source $HOME/.config/sway/bin/sway_helpers DEVICE=sysfs/backlight/intel_backlight NOTIFY_APP="dunstify -a brightness -h string:x-dunst-stack-tag:brightness" ICON=$HOME/.local/share/icons/Tela-circle-dark/16/panel/xfpm-brightness-lcd.svg -APP="/usr/bin/light -s $DEVICE" +APP="/usr/bin/brightnessctl" +APP_INC="$APP s 10%+" +APP_DEC="$APP s 10%-" PRG1="●" PRG2="◌" +function _get_br() { + $APP | grep -oE '[0-9]*%' | sed 's/%//g' +} + ## main _log BRIGHTNESS INFO args: $* _check_app $APP case $1 in d*) - $APP -U 10 - BR=$($APP) + $APP_DEC &> /dev/null + BR=$(_get_br) + echo $BR $NOTIFY_APP -i $ICON "$BR" "$(getProgressString 10 "$PRG1" "$PRG2" $BR)" ;; i*) - $APP -A 10 - BR=$($APP) + $APP_INC &> /dev/null + BR=$(_get_br) + echo $BR $NOTIFY_APP -i $ICON "$BR" "$(getProgressString 10 "$PRG1" "$PRG2" $BR)" ;; "-h"|"--help") echo "arguments: [decrease|increase]" ;; *) - BR=$($APP) + BR=$($APP_BR) $NOTIFY_APP -i $ICON "$BR" "$(getProgressString 10 "$PRG1" "$PRG2" $BR)" ;; esac diff --git a/bin/waybar_mediaplayer.py b/bin/waybar_mediaplayer.py index 91b03fe..377a8be 100755 --- a/bin/waybar_mediaplayer.py +++ b/bin/waybar_mediaplayer.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # dependencies -# apt install gir1.2-playerctl-2.0 +# - gir1.2-playerctl-2.0 import argparse import logging import sys diff --git a/config b/config index 4228a8d..dfe1458 100644 --- a/config +++ b/config @@ -24,6 +24,7 @@ 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 set $font Cascadia Code PL Regular 10 set $notify_cmd dunstify -r 123 @@ -217,6 +218,11 @@ bindsym $mod+Print exec grim -g "$(slurp)" \ # bindsym $mod+p exec "$term_cmd $output_cmd" +# +## Lock +# +bindsym $mod+Delete exec $lock_cmd + # # Gaps # @@ -332,6 +338,7 @@ bindsym $mod+o exec $notify_cmd "mode: move-workspace"; mode "move-workspace" # for_window [title="nmtui"] floating enable for_window [app_id="nm-connection-editor"] floating enable +for_window [app_id="evolution-alarm-notify"] floating enable for_window [title="float*"] floating enable for_window [app_id="pavucontrol"] floating enable for_window [app_id="com.nextcloud.desktopclient.nextcloud"] floating enable @@ -349,7 +356,7 @@ for_window [title="fzf"] floating enable for_window [class="Plexamp" window_type="normal"] mark s for_window [class="Ferdium" window_type="normal" window_role="browser-window"] mark z for_window [class="Signal" window_type="normal" window_role="browser-window"] mark x -for_window [class="Microsoft Teams - Preview" window_type="normal"] mark c +for_window [class="Chromium" instance="crx_cifhbcnohmdccbgoicgdjpfamggdegmo" window_type="normal"] mark c # matlab workaround no_focus [class="MATLAB R2021a" instance="sun-awt-X11-XDialogPeer"] @@ -357,12 +364,13 @@ no_focus [class="MATLAB R2021a" instance="sun-awt-X11-XDialogPeer"] # Status Bar: # exec_always $waybar_cmd -exec_always $sov_cmd -exec_always $idle_cmd # # Autostart # +exec_always $idle_cmd +exec_always $sov_cmd +exec_always systemctl --user start sway-session.target exec "bash -c 'sleep 10; nextcloud --background'" exec --no-startup-id dunst exec --no-startup-id nm-applet --indicator diff --git a/hosts.d/bslxkos01.conf b/hosts.d/bslxkos01.conf index 34a7a3e..3256a07 100644 --- a/hosts.d/bslxkos01.conf +++ b/hosts.d/bslxkos01.conf @@ -5,14 +5,15 @@ set $extern-34 "Dell Inc. DELL U3421WE 6YR9753" set $extern-24 "Dell Inc. DELL E2422HS H1VWFM3" set $extern-29 "Lenovo Group Limited L29w-30 UPV08NFA" set $extern-38 "Goldstar Company Ltd 38GN950 008NTLEFY912" -set $main DP-10 +# set $main DP-10 +set $main eDP-1 ### Output configuration output $intern mode 1920x1080 output $extern-34 mode 3440x1440 position 0 0 output $extern-24 mode 1920x1080 position 3440 0 -output $extern-29 mode 2560x1080 -output $extern-38 mode 3840x1600 +output $extern-29 mode 2560x1080 position 640 0 +output $extern-38 mode 3840x1600 position 0 1080 bindswitch --reload --locked lid:on output $intern disable diff --git a/waybar.d/config b/waybar.d/config index e415b75..04a8089 100644 --- a/waybar.d/config +++ b/waybar.d/config @@ -5,7 +5,7 @@ // green #b8bb26 { "layer": "top", - "height": 25, + "height": 26, "modules-left": [ "sway/workspaces", "custom/separator#left", @@ -26,7 +26,9 @@ "network#wl0", "custom/separator#center", "cpu", + "custom/separator#center", "memory", + "custom/separator#center", "temperature", "custom/separator#space", "custom/separator#center", @@ -42,7 +44,6 @@ "format": " " }, "custom/separator#center": { - // "format": "" "format": "|" }, "custom/separator#right": { @@ -83,7 +84,7 @@ }, "clock": { "format": "{: %b %d, %H:%M}", - "on-click": "foot -T float khal interactive" + // "on-click": "foot -T float khal interactive" }, "cpu": { "format": "{usage:3}%", diff --git a/waybar.d/style.css b/waybar.d/style.css index 73660ee..a6f0ac7 100644 --- a/waybar.d/style.css +++ b/waybar.d/style.css @@ -10,7 +10,7 @@ border: none; border-radius: 0; font-family: "Cascadia Code PL", "Material Icons"; - font-size: 13px; + font-size: 13.5px; min-height: 0; }