From cf6f9027a8800944edb8e1fd520925a5e31de6ce Mon Sep 17 00:00:00 2001 From: "flyingscorpio@arch-desktop" Date: Sat, 6 Mar 2021 22:56:48 +0100 Subject: [PATCH] Try making a text wallpaper that changes at every startup, using clitip --- dotfiles/i3/config | 5 +++-- dotfiles/text_to_wallpaper.sh | 12 ++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100755 dotfiles/text_to_wallpaper.sh diff --git a/dotfiles/i3/config b/dotfiles/i3/config index fd90877..11ac705 100644 --- a/dotfiles/i3/config +++ b/dotfiles/i3/config @@ -9,10 +9,11 @@ font pango: Noto Sans 9 floating_modifier $super #autostart -exec --no-startup-id hsetroot -cover ~/.wallpaper -root +exec --no-startup-id ~/setup-cockpit/dotfiles/text_to_wallpaper.sh +exec --no-startup-id hsetroot -cover ~/.wallpaper.png -root exec --no-startup-id xsettingsd & exec --no-startup-id picom -b --config ~/.config/picom.conf -exec --no-startup-id thunar --daemon +#exec --no-startup-id thunar --daemon # program launcher bindsym $super+d exec i3-dmenu-desktop --dmenu="dmenu -i -fn 'Noto Sans:size=8'" diff --git a/dotfiles/text_to_wallpaper.sh b/dotfiles/text_to_wallpaper.sh new file mode 100755 index 0000000..683115c --- /dev/null +++ b/dotfiles/text_to_wallpaper.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +clitip() { + curl -s https://raw.githubusercontent.com/jlevy/the-art-of-command-line/master/README.md | + sed '/cowsay[.]png/d' | + pandoc -f markdown -t html | + xmlstarlet fo --html --dropdtd | + xmlstarlet sel -t -v "(html/body/ul/li[count(p)>0])[$RANDOM mod last()+1]" | + xmlstarlet unesc | fmt -80 | iconv -t US +} + +clitip | convert -background "#222222" -fill "#237856" -size 3840x1200 -pointsize 30 -gravity west -font JetBrains-Mono-Regular label:@- ~/wallpaper.png