diff options
author | Rasmus <rasmus.luha@gmail.com> | 2023-04-08 00:27:03 +0300 |
---|---|---|
committer | Rasmus <rasmus.luha@gmail.com> | 2023-04-08 00:27:03 +0300 |
commit | a16bdfe930d89e1a7fb354b78d16e8742118f76d (patch) | |
tree | f32aabd929a485ac24ea2b3fb1c9c9d041f27478 /local |
checkers
Diffstat (limited to 'local')
-rwxr-xr-x | local/.local/scripts/checkBat | 11 | ||||
-rwxr-xr-x | local/.local/scripts/classical | 4 | ||||
-rw-r--r-- | local/.local/scripts/data/bigBoiQuotes.dat | 142 | ||||
-rw-r--r-- | local/.local/scripts/data/lock.png | bin | 0 -> 2045714 bytes | |||
-rw-r--r-- | local/.local/scripts/data/wp.bak.jpg | bin | 0 -> 616316 bytes | |||
-rw-r--r-- | local/.local/scripts/data/wp.jpg | bin | 0 -> 2677183 bytes | |||
-rwxr-xr-x | local/.local/scripts/klapid | 5 | ||||
-rwxr-xr-x | local/.local/scripts/kolar | 5 | ||||
-rwxr-xr-x | local/.local/scripts/lockScreen | 3 | ||||
-rwxr-xr-x | local/.local/scripts/lockScreen.bak | 5 | ||||
-rwxr-xr-x | local/.local/scripts/monitorDos | 2 | ||||
-rwxr-xr-x | local/.local/scripts/monitorUno | 2 | ||||
-rwxr-xr-x | local/.local/scripts/opn | 3 | ||||
-rwxr-xr-x | local/.local/scripts/quotes | 7 | ||||
-rwxr-xr-x | local/.local/scripts/rmshit | 106 | ||||
-rwxr-xr-x | local/.local/scripts/setbg | 7 | ||||
-rwxr-xr-x | local/.local/scripts/todo | 13 | ||||
-rwxr-xr-x | local/.local/scripts/vimv | 44 | ||||
-rwxr-xr-x | local/.local/scripts/wificon | 5 |
19 files changed, 364 insertions, 0 deletions
diff --git a/local/.local/scripts/checkBat b/local/.local/scripts/checkBat new file mode 100755 index 0000000..a599409 --- /dev/null +++ b/local/.local/scripts/checkBat @@ -0,0 +1,11 @@ +#! /bin/sh + +PERCENT0=$(cat /sys/class/power_supply/BAT0/capacity) +PERCENT1=$(cat /sys/class/power_supply/BAT1/capacity) +PERCENT=$(( ($PERCENT0 + $PERCENT1) / 2)) + +CHARGING0=$(cat /sys/class/power_supply/BAT0/status) +CHARGING1=$(cat /sys/class/power_supply/BAT1/status) + +[[ "$CHARGING0" == "Charging" || "$CHARGING1" == "Charging" ]] && exit; +[ "$PERCENT" -le 15 ] && notify-send "Brrr" "<15% | Low Bat" diff --git a/local/.local/scripts/classical b/local/.local/scripts/classical new file mode 100755 index 0000000..57fc9ae --- /dev/null +++ b/local/.local/scripts/classical @@ -0,0 +1,4 @@ +#! /bin/bash + +url="https://live.musopen.org:8085/streamvbr0" +pkill -f $url || mpv --volume=75 $url diff --git a/local/.local/scripts/data/bigBoiQuotes.dat b/local/.local/scripts/data/bigBoiQuotes.dat new file mode 100644 index 0000000..8848d46 --- /dev/null +++ b/local/.local/scripts/data/bigBoiQuotes.dat @@ -0,0 +1,142 @@ +“The unexamined life is not worth living” – +Socrates +“Whereof one cannot speak, thereof one must be silent” – +Ludwig Wittgenstein +“Entities should not be multiplied unnecessarily” – +William of Ockham +“The life of man (in a state of nature) is solitary, poor, nasty, brutish, and short” – +Thomas Hobbes +“I think therefore I am” (“Cogito, ergo sum”) – +René Descartes +“He who thinks great thoughts, often makes great errors” – +Martin Heidegger +“We live in the best of all possible worlds” – +Gottfried Wilhelm Leibniz +“What is rational is actual and what is actual is rational” – +G. W. F. Hegel +“God is dead! He remains dead! And we have killed him.” – +Friedrich Nietzsche +“There is but one truly serious philosophical problem, and that is suicide” – +Albert Camus +“One cannot step twice in the same river” – +Heraclitus +“The greatest happiness of the greatest number is the foundation of morals and legislation” – +Jeremy Bentham +“To be is to be perceived” (“Esse est percipi”)– +Bishop George Berkeley +“Happiness is not an ideal of reason but of imagination” – +Immanuel Kant +“No man's knowledge here can go beyond his experience” – +John Locke +“God is not willing to do everything, and thus take away our free will and that share of glory which belongs to us” – +Niccolo Machiavelli +“Liberty consists in doing what one desires” – +John Stuart Mill +“It is undesirable to believe a proposition when there is no ground whatever for supposing it true” – +Bertrand Russell +“There is only one good, knowledge, and one evil, ignorance” – +Socrates +“If God did not exist, it would be necessary to invent Him” – +Voltaire +“This is patently absurd; but whoever wishes to become a philosopher must learn not to be frightened by absurdities” – +Bertrand Russell +“One cannot conceive anything so strange and so implausible that it has not already been said by one philosopher or another” – +René Descartes +“Leisure is the mother of philosophy” – +Thomas Hobbes +“Philosophy is a battle against the bewitchment of our intelligence by means of language” – +Ludwig Wittgenstein +“There is only one thing a philosopher can be relied upon to do, and that is to contradict other philosophers” – +William James +“We are what we repeatedly do. Excellence, then, is not an act, but a habit” – +Aristotle +“Only one man ever understood me, and he didn’t understand me” – +G. W. F. Hegel +“The mind is furnished with ideas by experience alone” – +John Locke +“Life must be understood backward. But it must be lived forward ” – +Søren Kierkegaard +“Science is what you know. Philosophy is what you don't know” – +Bertrand Russell +“Metaphysics is a dark ocean without shores or lighthouse, strewn with many a philosophic wreck” – +Immanuel Kant +“Philosophy is at once the most sublime and the most trivial of human pursuits” – +William James +“History is Philosophy teaching by examples” – +Thucydides +“He who is unable to live in society, or who has no need because he is sufficient for himself, must be either a beast or a god” – +Aristotle +“You can discover more about a person in an hour of play than in a year of conversation” – +Plato +“Things alter for the worse spontaneously, if they be not altered for the better designedly” – +Francis Bacon +“All that is necessary for the triumph of evil is that good men do nothing” – +mistakenly attributed to Edmund Burke +“Is man merely a mistake of God'n? Or God merely a mistake of man's?” – +Friedrich Nietzsche +“I would never die for my beliefs because I might be wrong” – +Bertrand Russell +“Religion is the sign of the oppressed ... it is the opium of the people” – +Karl Marx +“Happiness is the highest good” – +Aristotle +“If men were born free, they would, so long as they remained free, form no conception of good and evil” – +Baruch Spinoza +“The greater the difficulty, the more glory in surmounting it” – +Epicurus +“Whatever is reasonable is true, and whatever is true is reasonable” – +G. W. F. Hegel +“Morality is not the doctrine of how we may make ourselves happy, but of how we may make ourselves worthy of happiness” – +Immanuel Kant +“Man is condemned to be free” – +Jean-Paul Sartre +“It is one thing to show a man that he is in error, and another to put him in possession of truth” – +John Locke +“I don’t know why we are here, but I’m pretty sure it is not in order to enjoy ourselves” – +Ludwig Wittgenstein +“That man is wisest who, like Socrates, realizes that his wisdom is worthless” – +Plato +“The only thing I know is that I know nothing” – +Socrates +“All is for the best in the best of all possible worlds” – +Voltaire (in parody of Leibniz) +“The function of prayer is not to influence God, but rather to change the nature of the one who prays” – +Søren Kierkegaard +“Man is born free, but is everywhere in chains” – +Jean-Jacques Rousseau +“Man will never be free until the last king is strangled with the entrails of the last priest” – +Denis Diderot +“If you would be a real seeker after truth, it is necessary that at least once in your life you doubt, as far as possible, all things” – +René Descartes +“Happiness lies in virtuous activity, and perfect happiness lies in the best activity, which is contemplative” – +Aristotle +“I can control my passions and emotions if I can understand their nature” – +Spinoza +“Philosophers have hitherto only interpreted the world in various ways; the point, however, is to change it” – +Karl Marx +“It is wrong always, everywhere and for everyone, to believe anything upon insufficient evidence” – +W. K. Clifford +“Virtue is nothing else than right reason” – +Seneca the Younger +“Freedom is secured not by the fulfilling of one's desires, but by the removal of desire” – +Epictetus +“In everything, there is a share of everything” – +Anaxagoras +“A little philosophy inclineth man's mind to atheism; but depth in philosophy bringeth men’s minds about to religion” – +Sir Francis Bacon +“The brave man is he who overcomes not only his enemies but his pleasures” – +Democritus +“Good and evil, reward and punishment, are the only motives to a rational creature” – +John Locke +“To do as one would be done by, and to love one's neighbor as oneself, constitute the ideal perfection of utilitarian morality” – +John Stuart Mill +“Everything that exists is born for no reason, carries on living through weakness, and dies by accident” – +Jean-Paul Sartre +“Man is the measure of all things” – +Protagoras +“We are too weak to discover the truth by reason alone” – +St. Augustine +“The mind is furnished with ideas by experience alone” – +John Locke +"Luck is what happens, when preparation meets opurtunity" - +Seneca diff --git a/local/.local/scripts/data/lock.png b/local/.local/scripts/data/lock.png Binary files differnew file mode 100644 index 0000000..6f0855f --- /dev/null +++ b/local/.local/scripts/data/lock.png diff --git a/local/.local/scripts/data/wp.bak.jpg b/local/.local/scripts/data/wp.bak.jpg Binary files differnew file mode 100644 index 0000000..1353852 --- /dev/null +++ b/local/.local/scripts/data/wp.bak.jpg diff --git a/local/.local/scripts/data/wp.jpg b/local/.local/scripts/data/wp.jpg Binary files differnew file mode 100644 index 0000000..61ee98d --- /dev/null +++ b/local/.local/scripts/data/wp.jpg diff --git a/local/.local/scripts/klapid b/local/.local/scripts/klapid new file mode 100755 index 0000000..c53d61c --- /dev/null +++ b/local/.local/scripts/klapid @@ -0,0 +1,5 @@ +#! /bin/bash + +bluetoothctl power on 1> /dev/null +bluetoothctl discoverable on 1> /dev/null +bluetoothctl connect 04:52:C7:C7:B4:04 | tail -n 1 diff --git a/local/.local/scripts/kolar b/local/.local/scripts/kolar new file mode 100755 index 0000000..3e6a57b --- /dev/null +++ b/local/.local/scripts/kolar @@ -0,0 +1,5 @@ +#! /bin/bash + +bluetoothctl power on 1> /dev/null +bluetoothctl discoverable on 1> /dev/null +bluetoothctl connect 6C:47:60:09:2A:DF | tail -n 1 diff --git a/local/.local/scripts/lockScreen b/local/.local/scripts/lockScreen new file mode 100755 index 0000000..2213132 --- /dev/null +++ b/local/.local/scripts/lockScreen @@ -0,0 +1,3 @@ +#! /bin/bash + +i3lock -i ~/pix/screenLocks/tigerInYou.png diff --git a/local/.local/scripts/lockScreen.bak b/local/.local/scripts/lockScreen.bak new file mode 100755 index 0000000..1f67ac0 --- /dev/null +++ b/local/.local/scripts/lockScreen.bak @@ -0,0 +1,5 @@ +#! /bin/bash + +DIR=~/pix/screenLocks +IMG=$(shuf -n 1 -e $(ls $DIR)) +i3lock --verif-text="Üks hetk…" --wrong-text="Põmmpea!" --noinput-text="Gimme input" --ind-pos=150:525 --time-pos=150:650 --date-pos=150:675 -Fk -i $DIR/$IMG --ring-width 6 --ring-color=#BBD66CFF --keyhl-color=85FF00FF --insidever-color=FF7F0033 --ringver-color=FF7F00FF
\ No newline at end of file diff --git a/local/.local/scripts/monitorDos b/local/.local/scripts/monitorDos new file mode 100755 index 0000000..530b35f --- /dev/null +++ b/local/.local/scripts/monitorDos @@ -0,0 +1,2 @@ +#! /usr/bin/bash +xrandr --output "eDP-1" --mode 1920x1080 --output HDMI-2 --mode 1920x1080 --left-of eDP-1 diff --git a/local/.local/scripts/monitorUno b/local/.local/scripts/monitorUno new file mode 100755 index 0000000..3f53890 --- /dev/null +++ b/local/.local/scripts/monitorUno @@ -0,0 +1,2 @@ +#! /usr/bin/bash +xrandr --output HDMI-2 --off diff --git a/local/.local/scripts/opn b/local/.local/scripts/opn new file mode 100755 index 0000000..f1f3289 --- /dev/null +++ b/local/.local/scripts/opn @@ -0,0 +1,3 @@ +#! /bin/bash + +nvim "$(find ~ -type f | fzf)" diff --git a/local/.local/scripts/quotes b/local/.local/scripts/quotes new file mode 100755 index 0000000..2009c64 --- /dev/null +++ b/local/.local/scripts/quotes @@ -0,0 +1,7 @@ +#! /bin/bash + +SRC_FILE=~/.local/scripts/data/bigBoiQuotes.dat +RIDA=$(shuf -i 1-$[$(cat $SRC_FILE | wc -l)/4] | head -n1 ) +QUOTE=$(sed -n $[2*${RIDA}+1]p $SRC_FILE) +QUOTIST=$(sed -n $[2*${RIDA}+2]p $SRC_FILE) +echo $QUOTE $QUOTIST diff --git a/local/.local/scripts/rmshit b/local/.local/scripts/rmshit new file mode 100755 index 0000000..2e166a9 --- /dev/null +++ b/local/.local/scripts/rmshit @@ -0,0 +1,106 @@ +#! /usr/bin/env python3 + +# https://github.com/lahwaacz/Scripts/blob/master/rmshit.py + +import os +import sys +import shutil + + +shittyfiles = [ + '~/.adobe', # Flash crap + '~/.macromedia', # Flash crap + '~/.recently-used', + '~/.local/share/recently-used.xbel', + '~/Desktop', # Firefox creates this + '~/.thumbnails', + '~/.gconfd', + '~/.gconf', + '~/.local/share/gegl-0.2', + '~/.FRD/log/app.log', # FRD + '~/.FRD/links.txt', # FRD + '~/.objectdb', # FRD + '~/.gstreamer-0.10', + '~/.pulse', + '~/.esd_auth', + '~/.config/enchant', + '~/.spicec', # contains only log file; unconfigurable + '~/.dropbox-dist', + '~/.parallel', + '~/.dbus', + '~/ca2', # WTF? + '~/ca2~', # WTF? + '~/.distlib/', # contains another empty dir, don't know which software creates it + '~/.bazaar/', # bzr insists on creating files holding default values + '~/.bzr.log', + '~/.nv/', + '~/.viminfo', # configured to be moved to ~/.cache/vim/viminfo, but it is still sometimes created... + '~/.npm/', # npm cache + '~/.java/', + '~/.swt/', + '~/.oracle_jre_usage/', + '~/.jssc/', + '~/.tox/', # cache directory for tox + '~/.pylint.d/', + '~/.qute_test/', + '~/.QtWebEngineProcess/', + '~/.qutebrowser/', # created empty, only with webengine backend + '~/.asy/', + '~/.cmake/', + '~/.gnome/', + '~/unison.log', + '~/.texlive/', + '~/.w3m/', + '~/.subversion/', + '~/nvvp_workspace/', # created empty even when the path is set differently in nvvp + '~/.ansible/', + '~/.fltk/', + '~/.vnc/', + #'~/.mozilla/', gotta have for firefox, otherwise settings arent save, but + # You should go Brave or sth anyways my dude. +] + + +def yesno(question, default="n"): + """ Asks the user for YES or NO, always case insensitive. + Returns True for YES and False for NO. + """ + prompt = "%s (y/[n]) " % question + + ans = input(prompt).strip().lower() + + if not ans: + ans = default + + if ans == "y": + return True + return False + + +def rmshit(): + print("Found shittyfiles:") + found = [] + for f in shittyfiles: + absf = os.path.expanduser(f) + if os.path.exists(absf): + found.append(absf) + print(" %s" % f) + + if len(found) == 0: + print("No shitty files found :)") + return + + if yesno("Remove all?", default="n"): + for f in found: + if os.path.isfile(f): + os.remove(f) + else: + shutil.rmtree(f) + print("All cleaned") + else: + print("No file removed") + + +if __name__ == '__main__': + rmshit() + diff --git a/local/.local/scripts/setbg b/local/.local/scripts/setbg new file mode 100755 index 0000000..4b0db10 --- /dev/null +++ b/local/.local/scripts/setbg @@ -0,0 +1,7 @@ +#! /bin/bash + +xwallpaper --zoom $1 +wal -c +wal -i $1 >/dev/null +sed -i '/SchemeUrg/d' /home/rasmus/.cache/wal/colors-wal-dwm.h +(cd $HOME/.config/suckless.all/dwm && sudo make clean install > /dev/null) diff --git a/local/.local/scripts/todo b/local/.local/scripts/todo new file mode 100755 index 0000000..49066e1 --- /dev/null +++ b/local/.local/scripts/todo @@ -0,0 +1,13 @@ +#! /bin/bash + +FILE=~/dox/toDos/$(date '+%B-%d').txt + +if [ -f "$FILE" ]; then + st -T 'ToDo' -g +390+210 -e nvim $FILE +else + echo '|'$(date '+%B-%d')'||' > $FILE + echo ------------- >> $FILE + st -T 'ToDo' -g +390+210 -e nvim $FILE +fi + +#st -T 'ToDo' -g +390+210 -e vim ~/dox/toDos/$(date '+%B-%d').txt diff --git a/local/.local/scripts/vimv b/local/.local/scripts/vimv new file mode 100755 index 0000000..74844fc --- /dev/null +++ b/local/.local/scripts/vimv @@ -0,0 +1,44 @@ +#!/usr/bin/env bash +set -eu + +# Lists the current directory's files in Vim, so you can edit it and save to rename them +# USAGE: vimv [file1 file2] +# https://github.com/thameera/vimv + +declare -r FILENAMES_FILE=$(mktemp "${TMPDIR:-/tmp}/vimv.XXX") + +trap '{ rm -f "${FILENAMES_FILE}" ; }' EXIT + +if [ $# -ne 0 ]; then + src=( "$@" ) +else + IFS=$'\r\n' GLOBIGNORE='*' command eval 'src=($(ls))' +fi + +for ((i=0;i<${#src[@]};++i)); do + echo "${src[i]}" >> "${FILENAMES_FILE}" +done + +${EDITOR:-vi} "${FILENAMES_FILE}" + +IFS=$'\r\n' GLOBIGNORE='*' command eval 'dest=($(cat "${FILENAMES_FILE}"))' + +if (( ${#src[@]} != ${#dest[@]} )); then + echo "WARN: Number of files changed. Did you delete a line by accident? Aborting.." >&2 + exit 1 +fi + +declare -i count=0 +for ((i=0;i<${#src[@]};++i)); do + if [ "${src[i]}" != "${dest[i]}" ]; then + mkdir -p "$(dirname "${dest[i]}")" + if git ls-files --error-unmatch "${src[i]}" > /dev/null 2>&1; then + git mv "${src[i]}" "${dest[i]}" + else + mv "${src[i]}" "${dest[i]}" + fi + ((++count)) + fi +done + +echo "$count" files renamed. diff --git a/local/.local/scripts/wificon b/local/.local/scripts/wificon new file mode 100755 index 0000000..fc43c2c --- /dev/null +++ b/local/.local/scripts/wificon @@ -0,0 +1,5 @@ +#! /bin/bash + +wifinimi=$(nmcli device wifi list | sed -n '1!p' | cut -b 9- | dmenu -p "Select Wifi: " -l 20 | cut -d' ' -f1) +pass=$(echo "" | dmenu -p "Enter Password: ") +nmcli device wifi connect $wifinimi password $pass |