parent
76f3d25f0c
commit
dceec84b00
@ -0,0 +1,7 @@ |
|||||||
|
unredir-if-possible = false; |
||||||
|
vsync = "opengl"; |
||||||
|
|
||||||
|
### Opacity |
||||||
|
menu-opacity = 0.90; |
||||||
|
frame-opacity = 0.90; # i.e. titlebars, borders |
||||||
|
inactive-opacity-override = false; |
@ -0,0 +1,9 @@ |
|||||||
|
{ config, lib, ... }: |
||||||
|
|
||||||
|
let cfg = config.libkookie.ui.i3; |
||||||
|
in |
||||||
|
lib.mkIf cfg.compton { |
||||||
|
text = '' |
||||||
|
${builtins.readFile ./compton.conf} |
||||||
|
''; |
||||||
|
} |
@ -0,0 +1,47 @@ |
|||||||
|
/** A utility script to lock the screen |
||||||
|
* |
||||||
|
* This tool relies on i3lock, ./lock.png, fortune, and imagemagic to |
||||||
|
* create a picture to fill all available screens |
||||||
|
*/ |
||||||
|
|
||||||
|
{ pkgs, ... }: |
||||||
|
with pkgs; |
||||||
|
let |
||||||
|
lockIcon = "${i3lock-fancy}/share/i3lock-fancy/icons/lock.png"; |
||||||
|
i3lock = "${i3lock}/bin/i3lock"; |
||||||
|
mktemp = "${coreutils}/bin/mktemp"; |
||||||
|
rm = "${coreutils}/bin/rm"; |
||||||
|
fortune = "${fortune}/bin/fortune"; |
||||||
|
xrandr = "${xrandr}/bin/xrandr"; |
||||||
|
convert = "${imagemagick}/bin/convert"; |
||||||
|
in |
||||||
|
writeShellScript "libkookie-i3locker" '' |
||||||
|
|
||||||
|
# Create a temp directory to work in |
||||||
|
TMPDIR=$(${mktemp} -d) |
||||||
|
BGIMAGE=$TMPDIR/lockbg.png |
||||||
|
FORTUNE=$(${fortune} | sed -e 's/\t/ /g') |
||||||
|
TMPRES=$(${xrandr} | grep \* | cut -d' ' -f4 | sed ':a;N;$!ba;s/\n/ /g') |
||||||
|
RESOLUTION=$(`echo $TMP_RES | sed 's/ /\n/g'`) |
||||||
|
|
||||||
|
# Create a base image |
||||||
|
${convert} -size 0x0 canvas:black $BGIMAGE |
||||||
|
|
||||||
|
for mon in "${RESOLUTION[@]}" |
||||||
|
do |
||||||
|
echo "Running for monitor $mon" |
||||||
|
TMPLOCK="$TMPDIR/tmplock.png" |
||||||
|
${convert} -size "$mon" canvas:black -font Inconsolata -pointsize 18 \ |
||||||
|
-fill white -gravity center -annotate +0+250 "$FORTUNE" \ |
||||||
|
"${lockIcon}" -gravity center -composite "$TMPLOCK" |
||||||
|
|
||||||
|
${convert} "$IMAGE" "$TMPLOCK" +append "$IMAGE" |
||||||
|
${rm} "TMPLOCK" |
||||||
|
done |
||||||
|
|
||||||
|
# Lock the screen |
||||||
|
${i3lock} -i "$IMAGE" |
||||||
|
|
||||||
|
# Remove all the temp images |
||||||
|
${rm} -rf $TMPDIR |
||||||
|
'' |
Loading…
Reference in new issue