All kinds of idk changes with idk stuff!

This commit is contained in:
Chris Cochrun 2022-02-01 09:25:01 -06:00
parent 9e5f0ad759
commit 131bb57ac3
25 changed files with 245 additions and 68 deletions

View file

@ -4,4 +4,4 @@
# echo 100 - $(mpstat | rg all | cut -d \ -f43) | bc
cpu="$(mpstat 1 1 | rg Average | awk '{print $3+$4+$5}' | sed 's/\(.*\)/\1%/g')"
echo "$cpu | color=#5af78e font='VictorMono Nerd Font' size=11"
echo "$cpu | color=#ff9f43 font='VictorMono Nerd Font' size=11"

View file

@ -28,7 +28,14 @@ list_passwords() {
passwords=$(rbw list)
prompt='search for passwords...'
SECRET=$(list_passwords | rofi -i -p="${prompt}" -dmenu -theme ~/.config/rofi/launchers-git/$style.rasi)
SECRET=$(list_passwords | rofi -i -p="${prompt}" -dmenu -theme ~/.config/rofi/launchers-git/$style.rasi $@ &
c=0
while ! xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $(xdotool search -class 'rofi') ; do
sleep .1
c=$((c+1))
[[ c = 50 ]] && exit; # stop script window didn't appear after 5 seconds
done
)
# Ask whether pass, user or both are required
options=("Password" \
@ -37,7 +44,14 @@ options=("Password" \
"QR-Code" \
"OTP")
option=$(printf '%s\n' "${options[@]%}" | rofi -i -dmenu -p="..." -theme ~/.config/rofi/launchers-git/$style.rasi)
option=$(printf '%s\n' "${options[@]%}" | rofi -i -dmenu -p="..." -theme ~/.config/rofi/launchers-git/$style.rasi $@ &
c=0
while ! xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $(xdotool search -class 'rofi') ; do
sleep .1
c=$((c+1))
[[ c = 50 ]] && exit; # stop script window didn't appear after 5 seconds
done
)
# echo $option

35
scripts/mediashout-to-openlp.el Executable file
View file

@ -0,0 +1,35 @@
#!/usr/bin/emacs --script
;;; mediashout-to-openlp.el --- convert ms text to openlp text -*- lexical-binding: t; -*-
;;;###autoload
(defun bar ()
"Print foo bar."
(interactive)
(message "Foo Bar!"))
;;;; CLI
(defun running-as-script-p ()
"Return truthy if running as Elisp script."
(member "-scriptload" command-line-args))
(defun main ()
"Entrypoint"
(print command-line-args-left)
(find-file (car command-line-args-left))
(with-current-buffer
(goto-char (point-min))
(search-forward "Title: ")
(delete-char 7 t)
)
(search-forward "Copyright: ")
(message "Do stuff here"))
(when (running-as-script-p)
(main))
(provide 'mediashout-to-openlp)

View file

@ -7,4 +7,4 @@ percent=$(bc -l <<< "100 * $total / $used")
mem=$(awk -v u=$used -v t=$total -v p=$percent 'BEGIN {printf "%sMi/%sMi %.1f% ", t, u, p}'| awk '{printf $2}')
echo "$mem | color=#ff9f43 font='VictorMono Nerd Font' size=11"
echo "$mem | color=#9aedfe font='VictorMono Nerd Font' size=11"

78
scripts/mshout.txt Normal file
View file

@ -0,0 +1,78 @@
Title: A Christmas Hymn
Author: Frances Johnston
Copyright: Public Domain
CCLI: 517860
Song ID: MS-0001
Hymnal:
Notes:
Groups: Public Domain
PlayOrder: Verse1, Verse2, Verse3
Verse 1:
When Jesus our Savior
In Bethlehem lowly
Was born of a virgin
And cradled in hay;Angels sent from heaven
With glad song announced Him
And guided the shepherds
To the place where He lay.
Verse 2:
Dear Savior, we bring Thee
Our heart's adoration
And bow in Thy presence,
Our wonderful King!
All heaven re-echoes
The song of the angels
And our hearts are joining
In the carols they sing.
Verse 3:
This same lowly Jesus
Who lay in the manger
Now reigns in the glory,
And prays for me there;
And one day He's coming,
His lov'd ones to gather
To join Him forever
All His riches to share!
Title: A Heart like Thine
Author: Judson Van DeVenter
Copyright: Public Domain
CCLI: 125544
Song ID: MS-0002
Hymnal:
Notes:
Groups: Public Domain
PlayOrder: Verse1, Verse2, Verse3, Verse4, Chorus1
Verse 1:
Give me a love that knows no ill.
Give me the grace to do Thy will.
Pardon and cleanse this soul of mine.
Give me a heart like Thine.
Verse 2:
Only a joy, a few brief years,
Only a dream, a vale of tears;
Vain is this world, I now resign.
Give me a heart like Thine.
Verse 3:
Open mine eyes that I may see.
Show me the cross of Calvary.
There may I go and not repine.
Give me a heart like Thine.
Verse 4:
Pillow my head upon Thy breast.
Shelter my soul and give me rest.
Fill me with love as I recline.
Give me a heart like Thine.
Chorus 1:
Come to my soul, blessed Jesus.
Hear me, O Savior divine.
Open the fountain and cleanse me.
Give me a heart a heart like Thine.

View file

@ -10,6 +10,7 @@ if pgrep -x nyxt > /dev/null; then
# echo $emacsrg
if [ -z $nyxtrg ]; then
echo regnyxt
nyxt
exit
else
@ -34,5 +35,10 @@ if pgrep -x nyxt > /dev/null; then
fi
else
echo not running
nyxt
machine=$(hostname)
if [ $machine = "syl" ]; then
env GDK_DPI_SCALE=0.5 GDK_SCALE=2 nyxt
else
nyxt
fi
fi

View file

@ -1,5 +1,7 @@
#!/bin/sh
export MOZ_ENABLE_WAYLAND=1
exec ydotoold &
exec systemctl enable --user --now libinput-gestures &

View file

@ -6,9 +6,13 @@ facebookstreamkey=$(kdialog --password "What is the stream key for Facebook?")
echo $peertubestreamkey
echo $facebookstreamkey
ssh chris@40.122.147.124 sudo sed -i -e "s#luctorcrc.org.*#luctorcrc.org/live/$peertubestreamkey\;#" nginx-restream/data/nginx.conf
ssh chris@40.122.147.124 sudo sed -i -e "s#/rtmp/.*#/rtmp/$facebookstreamkey\;#" /etc/nginx/nginx.conf
ssh chris@40.122.147.124 sudo sed -i -e "s#40.122.147.124.*#40.122.147.124:1936/rtmp/$facebookstreamkey\;#" nginx-restream/data/nginx.conf
# ssh chris@40.122.147.124 'sudo systemctl restart nginx'
ssh chris@40.122.147.124 sudo docker-compose down && sudo docker-compose up -d
ssh chris@40.122.147.124 "cd /home/chris/nginx-restream && sudo docker-compose down && sudo docker-compose up -d"
if [ $? = 0 ]; then
kdialog --title "Success!" --msgbox "All set! Now you can start the stream!"
else
kdialog --error "Sorry there was an error! Find Chris!"
fi

4
scripts/wttr-plasma.60s.sh Executable file
View file

@ -0,0 +1,4 @@
#!/bin/sh
weather=$(curl 'wttr.in/long_island,ks?format=%c%t++%h++%p')
echo "$weather | color=#57c7ff font='VictorMono Nerd Font' size=11"