Compare commits

..

3 Commits

3 changed files with 34 additions and 55 deletions

View File

@ -62,6 +62,8 @@ if status is-login
end
end
{% elif hostname == "buran" %}
set -x DEFMT_LOG info # default logging level for defmt
# start sway if logging in on tty 1
if status is-login
if test $XDG_SESSION_TYPE = "tty" -a $XDG_VTNR = "1"

View File

@ -305,11 +305,11 @@ bar {
# Window settings
# use `swaymsg -t get_tree | grep "app_id"` to list window ids. can also grep for "name"
for_window [app_id=".*"] border pixel 2
#for_window [title="^volume_indicator$"] border pixel 0; floating enable; move down 600; move right 600
for_window [app_id="^volume_indicator$"] border pixel 0; floating enable; resize set 300 80; position center
#for_window [title="^Volume$"] border pixel 0; floating enable; position center
#for_window [title="^Volume$"] floating enable; position center; resize set 300 80
for_window [app_id="zoom"] floating enable
#for_window [name="Firefox - Delningsindikator"] floating enable
for_window [app_id="com.nextcloud.desktopclient.nextcloud"] floating enable
include /etc/sway/config.d/*

View File

@ -1,60 +1,37 @@
#!/bin/sh
TMP_IMG="/tmp/lock.png"
{% if hostname == "sputnik" %}
# rendered for sputnik
LOCKPROG=i3lock
LOCKARGS="-nef --image=$TMP_IMG"
LOCKARGS_NOCOOL="-c 302f3b"
OPTIONAL_CMDS="scrot lockscreen-blur"
SCREENCAP="scrot -"
BLUR_FACTOR=20
{% elif hostname == "vostok" %}
# rendered for vostok
LOCKPROG=swaylock
LOCKARGS="--config $HOME/.config/sway/swaylock.config --image $TMP_IMG"
LOCKARGS_NOCOOL="--config $HOME/.config/sway/swaylock.config --color 302f3b"
OPTIONAL_CMDS="grim lockscreen-blur"
SCREENCAP="grim -t ppm -"
BLUR_FACTOR=40
{% elif hostname == "buran" %}
# rendered for buran
LOCKPROG=swaylock
LOCKARGS="--config $HOME/.config/sway/swaylock.config --image $TMP_IMG"
LOCKARGS_NOCOOL="--config $HOME/.config/sway/swaylock.config --color 302f3b"
OPTIONAL_CMDS="grim lockscreen-blur"
SCREENCAP="grim -t ppm -"
BLUR_FACTOR=40
{% else %}
echo "screenlock not configured for this system"
exit 1
{% end %}
#!/usr/bin/fish
# configured for wayland
set LOCKPROG swaylock
set OPTIONAL_CMDS grep sed grim lockscreen-blur
set CONFIG "$HOME/.config/sway/swaylock.config"
set FALLBACK_ARGS --config $CONFIG --color "302f3b"
set BLUR_FACTOR 40
# check if lock program is running
if ps -e | grep " $LOCKPROG$"; then
echo "$LOCKPROG is already running!"
if ps -e | grep " $LOCKPROG\$"
echo "$LOCKPROG is already running"
exit 1
fi
for CMD in $OPTIONAL_CMDS; do
if ! command -v "$CMD" &> /dev/null
then
echo "$CMD could not be found, falling back to basic mode."
$LOCKPROG $LOCKARGS_NOCOOL "$@"
end
for cmd in $OPTIONAL_CMDS
if not command -v $cmd &>/dev/null
echo "$cmd could not be found, falling back to basic mode."
$LOCKPROG $FALLBACK_ARGS
exit 0
fi
done
end
end
$SCREENCAP | lockscreen-blur -o $TMP_IMG -b $BLUR_FACTOR --stamp ~/.config/wallpapers/ferris-stamp.png
set outputs (swaymsg -t get_outputs -r | grep "name" | sed 's/^.*"name": "//' | sed 's/",$//')
# take one screenshot of each output
for output in $outputs
set img "/tmp/lock-$output.png"
grim -o $output -t ppm - | lockscreen-blur -o $img -b $BLUR_FACTOR --stamp ~/.config/wallpapers/ferris-stamp.png &
set -a images "--image"
set -a images "$output:$img"
end
wait
$LOCKPROG --config $HOME/.config/sway/swaylock.config $images
$LOCKPROG $LOCKARGS "$@"