wip
This commit is contained in:
parent
7d6d263d71
commit
f59171268c
6 changed files with 190 additions and 115 deletions
|
@ -1,4 +1,42 @@
|
|||
#!/bin/bash
|
||||
grim /tmp/shot.png
|
||||
magick /tmp/shot.png -blur 0x8 /tmp/shot_blurred.png
|
||||
wlogout --css $HOME/.config/wlogout/style.css
|
||||
#!/usr/bin/env bash
|
||||
# ─< Check if the given command exists silently >─────────────────────────────────────────
|
||||
command_exists() {
|
||||
command -v "$@" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
if ! command_exists wlogout; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Take a screenshot and blur it using ffmpeg
|
||||
take_and_blur_screenshot() {
|
||||
local blurred_path="$HOME/.config/wlogout/tmp.png"
|
||||
|
||||
# Take a screenshot and blur it
|
||||
grim -t ppm - | ffmpeg -f image2pipe -vcodec ppm -i - -vf "gblur=sigma=8" -vframes 1 "$blurred_path"
|
||||
# handle_error $? "grim and ffmpeg"
|
||||
}
|
||||
|
||||
# Main logic
|
||||
if ! command_exists wlogout; then
|
||||
# log_notify "critical" "Error" "wlogout not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if command_exists grim && command_exists ffmpeg; then
|
||||
take_and_blur_screenshot
|
||||
wlogout --css "$HOME/.config/wlogout/style_blur.css"
|
||||
else
|
||||
# log_notify "critical" "Error" "Required tools (grim, ffmpeg) not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# wlogout
|
||||
|
||||
# if command_exists grim && command_exists magick; then
|
||||
# grim /tmp/shot.png
|
||||
# magick /tmp/shot.png -blur 0x8 $HOME/.config/wlogout/tmp.png
|
||||
# wlogout --css $HOME/.config/wlogout/style_blur.css
|
||||
# else
|
||||
# wlogout
|
||||
# fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue