From 01ced0b7ce47d279789efb2dc70d1cd009ac56ad Mon Sep 17 00:00:00 2001 From: davidovski Date: Sat, 9 Oct 2021 22:20:41 +0100 Subject: initial commit --- scripts/.scripts/autoclick.sh | 9 + scripts/.scripts/bg.sh | 3 + scripts/.scripts/calculator | 2 + scripts/.scripts/centered | 17 ++ scripts/.scripts/cinema.sh | 3 + scripts/.scripts/compress-video | 4 + scripts/.scripts/ddc-switch-inputs | 19 ++ scripts/.scripts/dmenu-kb | 2 + scripts/.scripts/dmenuemoji | 23 ++ scripts/.scripts/dmenukaomoji | 24 +++ scripts/.scripts/emoji | 362 ++++++++++++++++++++++++++++++++ scripts/.scripts/gamma.sh | 10 + scripts/.scripts/kaomoji | 362 ++++++++++++++++++++++++++++++++ scripts/.scripts/lock | 2 + scripts/.scripts/looking-glass-start.sh | 3 + scripts/.scripts/max_input_volume.sh | 3 + scripts/.scripts/memeselector | 6 + scripts/.scripts/mpc_picker | 4 + scripts/.scripts/muted_input_volume.sh | 3 + scripts/.scripts/normal_input_volume.sh | 4 + scripts/.scripts/notepad | 3 + scripts/.scripts/powermenu | 2 + scripts/.scripts/reddit-scrape | 43 ++++ scripts/.scripts/revive-chrome-gpu | 16 ++ scripts/.scripts/screenrecord | 3 + scripts/.scripts/screenshot | 4 + scripts/.scripts/screenshot_floating | 9 + scripts/.scripts/screenshot_fs | 4 + scripts/.scripts/start-mpd | 3 + scripts/.scripts/sync-phone | 9 + scripts/.scripts/tablet | 61 ++++++ scripts/.scripts/toggle-gap.sh | 3 + scripts/.scripts/toggle-size-hints.sh | 3 + scripts/.scripts/vfetch | 288 +++++++++++++++++++++++++ scripts/.scripts/websearch | 14 ++ 35 files changed, 1330 insertions(+) create mode 100755 scripts/.scripts/autoclick.sh create mode 100755 scripts/.scripts/bg.sh create mode 100755 scripts/.scripts/calculator create mode 100755 scripts/.scripts/centered create mode 100755 scripts/.scripts/cinema.sh create mode 100755 scripts/.scripts/compress-video create mode 100755 scripts/.scripts/ddc-switch-inputs create mode 100755 scripts/.scripts/dmenu-kb create mode 100755 scripts/.scripts/dmenuemoji create mode 100755 scripts/.scripts/dmenukaomoji create mode 100644 scripts/.scripts/emoji create mode 100755 scripts/.scripts/gamma.sh create mode 100644 scripts/.scripts/kaomoji create mode 100755 scripts/.scripts/lock create mode 100755 scripts/.scripts/looking-glass-start.sh create mode 100755 scripts/.scripts/max_input_volume.sh create mode 100755 scripts/.scripts/memeselector create mode 100755 scripts/.scripts/mpc_picker create mode 100755 scripts/.scripts/muted_input_volume.sh create mode 100755 scripts/.scripts/normal_input_volume.sh create mode 100755 scripts/.scripts/notepad create mode 100755 scripts/.scripts/powermenu create mode 100755 scripts/.scripts/reddit-scrape create mode 100755 scripts/.scripts/revive-chrome-gpu create mode 100755 scripts/.scripts/screenrecord create mode 100755 scripts/.scripts/screenshot create mode 100755 scripts/.scripts/screenshot_floating create mode 100755 scripts/.scripts/screenshot_fs create mode 100755 scripts/.scripts/start-mpd create mode 100755 scripts/.scripts/sync-phone create mode 100755 scripts/.scripts/tablet create mode 100755 scripts/.scripts/toggle-gap.sh create mode 100755 scripts/.scripts/toggle-size-hints.sh create mode 100755 scripts/.scripts/vfetch create mode 100755 scripts/.scripts/websearch (limited to 'scripts/.scripts') diff --git a/scripts/.scripts/autoclick.sh b/scripts/.scripts/autoclick.sh new file mode 100755 index 0000000..8abb8d9 --- /dev/null +++ b/scripts/.scripts/autoclick.sh @@ -0,0 +1,9 @@ +#!/bin/sh +winid=$(xdotool search "Mine" | head -n1) +for i in {1..50}; + do + xdotool keydown "5" + xdotool keyup "5" + sleep 0.05 +done +exit 0 diff --git a/scripts/.scripts/bg.sh b/scripts/.scripts/bg.sh new file mode 100755 index 0000000..23bf6a3 --- /dev/null +++ b/scripts/.scripts/bg.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +feh --bg-fill ~/.config/bg diff --git a/scripts/.scripts/calculator b/scripts/.scripts/calculator new file mode 100755 index 0000000..f092fd8 --- /dev/null +++ b/scripts/.scripts/calculator @@ -0,0 +1,2 @@ +#!/bin/sh +bspc rule -a \* -o state=floating && $TERMINAL -e bc -liq diff --git a/scripts/.scripts/centered b/scripts/.scripts/centered new file mode 100755 index 0000000..a663336 --- /dev/null +++ b/scripts/.scripts/centered @@ -0,0 +1,17 @@ +#!/bin/sh +read title +clear +columns=$(tput cols) +rows=$(tput lines) +tput clear +y=$((($columns-$(echo -n $title | head -1 | wc -c))/2)) +x=$((($rows-$(echo $title | wc -l))/2)) + +while read p; do + tput cup $x $y + echo "$p" + x=$((x+1)) + +done <<< "$title"; + +tput cup $rows 0 diff --git a/scripts/.scripts/cinema.sh b/scripts/.scripts/cinema.sh new file mode 100755 index 0000000..c453260 --- /dev/null +++ b/scripts/.scripts/cinema.sh @@ -0,0 +1,3 @@ +#!/bin/sh +MAIN_DP=DP-2; +v=$(xrandr --current --verbose | grep "Brightness" | cut -f2 -d " " | tr '\n' '*' | rev | cut -c 2- | rev | sed -e "s/$/==1/" | bc -l | grep -q 0 && echo 1 || echo 0); xrandr | grep " connected" | cut -f1 -d " " | while read -r line; do echo $line | grep -q $MAIN_DP && : || xrandr --output $line --brightness $v; done diff --git a/scripts/.scripts/compress-video b/scripts/.scripts/compress-video new file mode 100755 index 0000000..983daec --- /dev/null +++ b/scripts/.scripts/compress-video @@ -0,0 +1,4 @@ +#!/bin/sh +size=8388608 +length=`ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 input.mp4` +ffmpeg -i $1 -b $(( $size / ${length%.*} )) $1.mp4 diff --git a/scripts/.scripts/ddc-switch-inputs b/scripts/.scripts/ddc-switch-inputs new file mode 100755 index 0000000..d85fed2 --- /dev/null +++ b/scripts/.scripts/ddc-switch-inputs @@ -0,0 +1,19 @@ +#!/bin/bash +# Usage: ddc-switch-inputs 1 +case $1 in + 1 ) + # Config 1: Main PC + OUT=("0x0f" "0x20") + ;; + 2 ) + # Config 2: Virtual machine + OUT=("0x11" "0x21") + ;; + * ) + echo "Unknown input '$1'" + exit 1 + ;; +esac + +ddcutil --bus=5 setvcp 60 ${OUT[0]} & +wait diff --git a/scripts/.scripts/dmenu-kb b/scripts/.scripts/dmenu-kb new file mode 100755 index 0000000..3e4b869 --- /dev/null +++ b/scripts/.scripts/dmenu-kb @@ -0,0 +1,2 @@ +#!/bin/sh +localectl list-x11-keymap-variants us | dmenu -p "kbd layout" | xargs setxkbmap -variant diff --git a/scripts/.scripts/dmenuemoji b/scripts/.scripts/dmenuemoji new file mode 100755 index 0000000..090e8e3 --- /dev/null +++ b/scripts/.scripts/dmenuemoji @@ -0,0 +1,23 @@ +#!/bin/bash + +chosen=$(dmenu -i -l 20 < ~/.local/share/emoji | sed "s/ .*//") + +[ "$chosen" != "" ] || exit + +# If you run this command with an argument, it will automatically insert the character. +echo "$chosen" | xclip -selection clipboard +if [ -n "$1" ]; then + WINDOW=$(xdotool getactivewindow getwindowname) + if [[ "$WINDOW" =~ .*"$SUB".* ]]; then + xdotool key "ctrl+v" + else + xdotool key Shift+Insert + fi +# xdotool type --delay 1 $chosen + +# VAR=$(xclip -o) + +# xdotool type $chosen +else + notify-send "'$chosen' copied to clipboard." & +fi diff --git a/scripts/.scripts/dmenukaomoji b/scripts/.scripts/dmenukaomoji new file mode 100755 index 0000000..8af99b3 --- /dev/null +++ b/scripts/.scripts/dmenukaomoji @@ -0,0 +1,24 @@ +#!/bin/bash + +chosen=$(dmenu -i -l 20 < ~/.local/share/kaomoji | sed "s/\t.*//") + +[ "$chosen" != "" ] || exit + +# If you run this command with an argument, it will automatically insert the character. +echo "$chosen" | xclip -selection clipboard +if [ -n "$1" ]; then + SUB="Minecraft" + WINDOW=$(xdotool getactivewindow getwindowname) + if [[ "$WINDOW" =~ .*"$SUB".* ]]; then + xdotool key "ctrl+v" + else + xdotool key Shift+Insert + fi +# xdotool type --delay 1 $chosen + +# VAR=$(xclip -o) + +# xdotool type $chosen +else + notify-send "'$chosen' copied to clipboard." & +fi diff --git a/scripts/.scripts/emoji b/scripts/.scripts/emoji new file mode 100644 index 0000000..87b1754 --- /dev/null +++ b/scripts/.scripts/emoji @@ -0,0 +1,362 @@ +^_^ Overjoyed (2) +(╯°□°)╯︵ ┻━┻ Flipping Table (3) +ლ(ಠ益ಠლ) But At What Cost +(//_^) Emo (5) +ʕ •ᴥ•ʔ Koala (3) +(っ^‿^)っ Kirby (5) +[¬º-°]¬ Zombie (2) +(●∈∋●) Bird (5) +ಠ_ಠ Disapproval +T.T Sad (2) +◤◡ᴥ◡◥  Dog (4) +(∩`-´)⊃━☆゚.*・。゚ Wizard +^-^ Happy (7) +ᕦ(ò_óˇ)ᕤ Flexing (3) +♪┏(・o・)┛♪ Dancing (8) +( ͡° ͜ʖ ͡°) Smiling (2) +/人◕ ‿‿ ◕人\ Kyubey +༼ ༎ຶ ෴ ༎ຶ༽ Distraught +ᒄ₍⁽ˆ⁰ˆ⁾₎ᒃ♪♬ Frosty the Snowman (2) +(╯°□°)╯︵ ┻━┻ Flipping table (2) +<(^oo^)> Pig (3) +¯\_(ツ)_/¯ Shrugging (2) +U=・ x ・=U Rabbit (2) +⊂((・▽・))⊃ Hug me (2) +V●ᴥ●V Doggy (2) +(=^_^=) Bunny (3) +<コ:彡 Squid (2) +-_-; Anime Sweat Drop (2) +(°̥̥̥̥̥̥̥̥ᴗ°̥̥̥̥̥̥̥̥) Happy crying +(=^・ェ・^=) Kitty (2) +(((༼•̫͡•༽))) Ghost (2) +(-‸ლ) Whoops +(=^ェ^=) Cat (4) +( ´-ω・)︻┻┳══━一 Sniper +⊆☉ᴥ☉⊇ Bear (7) +༼ つ ◕_◕ ༽つ Take my energy +(  ̄┏_┓ ̄) Mustache (2) +(;´Д`) Giving Up +( ͡° ʖ̯ ͡°) Disgruntled +✌(◕‿-)✌ Peace (3) +ಠ_ರೃ Monocle (2) +T^T Crying (5) +ᘛ⁐̤ᕐᐷ Chameleon +༼ つ ◕_◕ ༽つ Gimme +ლ(ಠ益ಠ)ლ Anger +(ง •̀_•́)ง Feisty +(っ⌒‿⌒)っ Hug (3) +ϵ( 'Θ' )϶ Fish (3) +(^▽^) Laughing (5) +¯\(°_o)/¯ Confused (4) +̿’̿’\̵͇̿̿\З=( ͠° ͟ʖ ͡°)=Ε/̵͇̿̿/’̿̿ ̿ ̿ ̿ ̿ ̿ Outlaw +o(^▽^)o Pumped (2) +.∵・(゚Д゚) Scared (2) +(*☉౪ ⊙。)ノ Imbecile (2) +d-(^.^)z Thumbs Up (2) +(>_<) Painful +(¬_¬") Annoyed (4) +(´╹〽╹`) Worried (4) +(o^-^o) Pikachu (2) +(▀̿Ĺ̯▀̿ ̿) Deal with it +(∩`-´)⊃━☆゚.*・。゚ Magic Attack +꒡ᘦ̲꒡ Sleeping (5) +(‾ʖ̫‾) Lethargic +^_^; Guilty +ヽ(`⌒´メ)ノ Angry (8) +^^ Blissful +^_^/ High Five (2) +ʕ•͡ᴥ•ʔ Polar bear +❆❅❉ Snowing +ヽ(★ω★)ノ Excited +U^ェ^U Puppy +⊂(^(工)^)⊃ Teddy bear +(≧∇≦)/ Joyful (2) +◦°˚\☺/˚°◦ Playing in the snow +(╯°□°)╯︵ ʞooqǝɔɐɟ Flipping Facebook +(;-_-)ノ Giving up +⊙▂⊙ Shocked +|∴め ϖ め∴| SpongeBob SquarePants +◔̯◔ Rolling Eyes +⊂(◜ᴥ◝)つ Teddy Bear +ε=(☉_☉) Accidental farting +(ಥ﹏ಥ) Devastated (2) +(•͡.•͡) Skeptical +ε=┏( >_<)┛ Running (5) +┬─┬︵/(.□.)╯ Table Flips You +〠_〠 Tired (3) +∊ಠ_ಠ∍ Distressed +V=(° °)=V Crab (2) +ᶘ ᵒᴥᵒᶅ Seal (2) +Ƹ̵̡Ӝ̵̨̄Ʒ Butterfly +(- o - ) zzZ ☽ Sleepy +◯0o。(ー。ー)y Smoking (4) +(。々°) Herp Derp +-_-* Frustrated (3) +(+[__]∙:∙) PlayStation Portable +(V) (°,,,,°) (V) Zoidberg +/|\( ;,; )/|\ Bat +◖㈠ ω ㈠◗ Panda +\m/d(^_^)b\m/ Rocking Out +ヽ(゚Д゚)ノ Freak Out (2) +(ノ゚0゚)ノ~ Yoo-Hoo +¤\( `⌂´ )/¤ Lifting weights +(ò_ó) Furious +( ˘ ³˘)♥ Kiss me +(^▽^) Cheerful (3) +(⌒ ͜ʖ⌒)b Attentive +ᕦ❍ᴗ❍ᕤ Muscular Person +(´>_●)メ(●_<`) Sword Fighting +:-Þ Teasing +=( ^o^)ノ___o Bowling +(#×_×) Dead (2) +(。・_・)ノ”【】 Painting +(/。\) Shy (5) +⎰≀.☮-☮≀⎰ John Lennon +─=≡Σ(([ ⊐•̀⌂•́]⊐ Superhero +(¬з¬)σ Pointing (2) +(・д・)} On The Phone (3) +㐈⦁ཽし⦁ཽ㐈  Larry David +⨌⨀_⨀⨌ Benjamin Franklin +(☄ฺ◣д◢)☄ฺ Scaring +ƪ(˘▽˘ƪ) Worshiping +[•.•ิ] Huh +(◐‿◑) Crazy +\(-_- ) Thank You +(_ε_) Kiss my butt +(⊃‿⊂) Anticipation +(* ̄m ̄) Dissatisfied +Q('.'Q) Put Em Up +\(^o)(^0^)(o^)/ Caroling +( ̄~ ̄) Unimpressed +༼ঢ_༽ঢ༽ Perplexed +(。♥‿♥。) Smitten +( ̄□ ̄;) Surprised +(^o^) Singing (3) +(:3 っ)っ Walrus +( `_)乂(_' ) Arm wrestle +(ง •̀ゝ•́)ง Fighting (2) +uwu Happy Anime Face +└(^o^ )X( ^o^)┘ Best buddies +d^_^b DJ +( --)/ ==卍 Ninja Star +C:。ミ Octopus +(´・ω・`) Snubbing (2) +♪(●′▽`)ノ Good Night +(#^.^#) Embarrassed (3) +ಥ_ಥ Bawling (3) +†_(゚ー゚*)β Exorcism +੯ू•́ू ໒꒱⁼³₌₃ Sonic the Hedgehog +(^‿◕) Winking (3) +(″・ิ_・ิ)っ Wait (3) +。◕‿◕。 Gleeful +ヽ( ★ω★)ノ Pumped up +_〆(。。) Writing (2) +(∿°○°)∿ ︵ ǝʌol Heartbroken +^;;^ Spider +(⓪益⓪) Staring (2) +( ̄┏∞┓ ̄) Fu Manchu Man +( • ∀•)っθΘʘ Hiding Easter eggs +_φ( °-°)/ Doing Homework +◖ර◞ʖ◟ර◗ Grandma +¬.¬ Whatever (3) +⫷ °⧭° ⫸ Clown +(♥_♥) In Love +>.< Upset (2) +( ◢д◣) Depressed (4) +ᕕ( ᐛ )ᕗ Celebrating +(¬‿¬) Cunning +└(^o^)┐ Grooving (3) +~゜・_・゜~ Raving +ᕦ◉▿◉ᕤ Owl (2) +\(^O^)/ Celebrate +(*’(OO)’*) Piggy (2) +˃ʍ˂ Enraged (2) +(ू˃̣̣̣̣̣̣︿˂̣̣̣̣̣̣ ू) Sobbing (3) +( ^^)人(^^ ) Best Buds +└@(・ェ・)@┐ Beefcake +(☉__☉”) Yikes +(╯˘ -˘ )╯ Praying (2) +ε=┌( ≧▽)┘ Elated +( •_•)O °Q(•_• ) Playing Ping Pong +∋(°O°)∈ Blowfish +(;一_一) Ashamed (4) +{♥‿♥} Lovestruck +๏-) Cyclops +(o ̄∇ ̄)=◯)`ν゜)・ Punching (6) +┬─┬ノ( º _ ºノ) Putting Table Back (2) +(~_(]=--Z(◡˘) Pie Fight +((((((^_^;) Evading +(/o^)/°⊥\(^o\) Volleyball +-{'''|'''|'''|''']=[] Syringe +[^._.^]ノ彡 Nyan Cat +---(o_ _)o Tripping (2) +┬┴┬┴┤(・_├┬┴┬┴ Snooper +(ㆆ_ㆆ) Unamused +(✿◠‿◠)  Hippie +ヾ(* ̄O ̄)ツ Yelling +(ɔ◔‿◔)ɔ ♥ Loving +(ノ-o-)ノ 中 Olympic Hammer Throw +(/ω・\) Peering +(´・ω・)っ由 Gift +[-_-]~ Ninja +(シ_ _)シ Apology (2) +∋∞(●゚v゚)∞∈ Pigtails +‎(>o<)ρミ┳┷┳゜ Table Tennis +(^̮^) Pleased (2) +♪~( ̄ε ̄;) Whistling +( ̄▼ ̄) Big Grin +⋟^≏^⋞ Kitty Cat +( ̄へ ̄) Discontent +(*・_・)ノ⌒* Throwing Away +(*@_*#) Beaten Up +(p_-) Thinking +(。_°)☆ Punched +♥‿♥ Enamored +ε-(´・`) フ Phew +༼ঢ_㇁ঢ༽ Bad hair day +(づ ̄ ³ ̄)づ Smooch (3) +O(<>'<>)O Aang +(_ _)..ooOO Dreaming +┳┻┳° Ping Pong table +^o^ Mog +(゚皿゚)r┏┳-* Shooting (2) +m( ゚皿゚)m★━━ Laser +٩◔̯◔۶ Eye Roll With Hands Up +ヽ(´Д`ヽミノ´Д`)ノ Frantic (2) +(-ε- ) Pucker up (3) +ヽ(⌐■_■)ノ♪♬ Boogie down +「(°ヘ°) Puzzled +d(^_^)b Listening to Music +( -_-)旦~ Drinking +<_< Looking (4) +(( _ _)☆ ≡〇 Header +^)_(^ Chubby +(๑´•.̫ • `๑) Blushing +(。▼皿▼) Darth Vader +(╬☉Д⊙ฺ) Cyborg +(ʘ‿ʘ) Smile +ε=ε=ε=┌(๑ʘ∀ʘ)┘ Sprinting +ƪ(˘⌣˘)ʃ Raise the roof +( ˘︹˘ ) Smug +(▰˘◡˘▰) Satisfied +(¬、¬) Shifty +¯(°_o)/¯ Confused shrug +✖‿✖ Dead person +(。_°☆\(- – ) Punch +(ɔˆ ³(ˆ⌣ˆc) Loving couple +(*▿▿* ƪ) Vampire +o(^^o)(o^^)o Hopeful +___ψ(‥ ) Studying +_φ(°-°=) Doing homework +@( o・ω・)@ Monkey +(╭ರ_•́) Inquisitive +੯ू‵ू ໒꒱ Poodle +(*^^)^*) Kiss (5) +(^~^) Meh +(/。\) Frightened +:þ Playful +(>^_^)><(^o^<) Hugging +(-_ゞ Groggy +(*^o^)人(^o^*) Buddies +(●´ノω`)コ Whispering (2) +o(´^`)o Reluctant +( つ Д `) Wiping Tears +(o´・Υ・)ノ・ Help (2) +(。・ˇдˇ・。) Pompous +(´∪`*) Friendly +ヘ(。□°)ヘ Psycho +(人’∀’) Precious +(っ˘ڡ˘ς) Yummy +┗(・ω・;)┛ How Should I Know +(о^ω^о) Giggling +(´ー`)┌フッ Golf Clap +\\(<.<|>.>)// Panicking +^(#`∀´)_Ψ Demon +(╯‵Д′)╯ Scary +:-{  -__-: Stinky +ಠᴗಠ Scheming +<(; ̄ ・ ̄) Scratching +\(^ ^)/ Glad +(╯_╰) Bummed out +┗( ●-﹏ `。)づ Hurt (2) +(-_-)# Girl +8(>_<)8 Jealous +(*°∀°)=3 Infatuated (3) +( ^_^)/ Waving +o(^_-)O Boxer +{{|└(>o< )┘|}} Up In Arms +(^^)// Applause (2) +( `_)?(_' ) Dueling +(´~`) Weary +v(^_^)v Victory (3) +(ノ_ _)ノ Surrender +<( ・ェ-)<} Bow and Arrow +( `o´)_θ☆ Kicking +(-□-)︵* Blowing a Kiss +|д・) Hiding (4) +(´Д゜)/゜⌒。 Discarding +ʕʔ Bread +(ɔ˘з˘)ɔ Romantic +ʕ •́؈•̀) Winnie the Pooh +(ó ì_í)=óò=(ì_í ò) Bro Pound +ヾ(`ε´)ノ Booing +|̲̅̅●̲̅̅|̲̅̅=̲̅̅|̲̅̅●̲̅̅| Stereo +ʘ‿ʘ Eager +:(¦) Frog +( ^)/占~~~ Banksy +(;´༎ຶД༎ຶ`) Weeping (2) +⊂ •͡˘∠•͡˘ ⊃ Suspicious +( ° ᴗ°)~ð  Proposal +(๑╹ڡ╹๑) Tasty +(¬_¬ ) Neglected +ʕु•̫͡•ʔु Bear cub (2) +┌|°з°|┘ Cutting a rug +(⊙_◎) Crazed +(✖╭╮✖) Deceased +←~(o `▽´ )oΨ Satan +˙ ͜ʟ˙ Content +( ˇ෴ˇ ) Hipster +♫.(◠౪◠).♫ Jamming to music +∊♡_ᴥ_♡∍ Puppy Love +L(´□`L) Oh No! (2) +(;´ρ`) Yawning +(╯ნ_㇁ნ)╯ Defeated +(.〜◍`皿′◍〜.) Livid (2) +ᡊ|◔じ◔|ᡊ  Woody Allen +✌(გ_㇁გ)✌ Ringo Starr +╹﹏╹ Cold +☉ϖ☉ Lobster +(๑≖ิิ益≖ิ๑) Evil Laugh +(((☎))) Phone +(○`д´)ノシ Σ(っ゚Д゚)っ Chasing +o(>< )o⌒* Mad (3) +ლ(´ڡ`ლ) Licking +⪿ ↂ ˒̫̮ ↂ ⫀ Elton John +(•ᴥ• )́`́'́`́'́⻍ Porcupine +且_(゚◇゚;)ノ゙ Waiter +◖⎚∠⎚◗ Geek +-ˆ ω ˆ- Kitten +•:_:• Nagato +ε=┌(^-^)┘ Skipping +(+.+)(-.-)(_ _) Falling Asleep +[ ± _ ± ] Sick +〜〜(/ ̄▽)/ 〜ф Chasing A Butterfly +\(`0´)/ Fed Up +¥[*.*]¥ Robot +(*・)σσ(*゜O゜) Poking +( ̄ー ̄(_ _( Nodding +▼o・_・o▼ Hello +(`_^) Wink +/( _0_) ̄θ☆≡≡○ Scissor Kick +ヽ(´ー`)┌ Mellow +(^ _ ^)/~~ Goodbye +(*・)「」「」 Magic Casting +( `皿´)。ミ/ Hitting +[]゛7(∀゜*) Dialing +(((((^_^) Teleporting +( ̄ー ̄)//”” Clapping +(。。;)\(-_-) Comforting +(*  ̄)( ̄ *)  Kissing +(;^_^)ッ☆( ゜o゜) Slapping +\(~O~)/ Good Morning +\_(´▽`)♪_/ Bathtub diff --git a/scripts/.scripts/gamma.sh b/scripts/.scripts/gamma.sh new file mode 100755 index 0000000..0117dd5 --- /dev/null +++ b/scripts/.scripts/gamma.sh @@ -0,0 +1,10 @@ +#!/bin/bash +MAIN_DP=DP-2; + +v=$1 + +if [ $# -ne 0 ]; then + xrandr --output $MAIN_DP --gamma $(paste -d" " <(xrandr | grep " connected" | cut -f1 -d " ") <(xrandr --current --verbose | grep "Gamma" | cut -f7 -d" " | cut -f1 -d":" | xargs -I % echo "1/%") | grep $MAIN_DP | cut -d" " -f2 | xargs -I % echo "%*$v" | bc -l) +else + xrandr --output $MAIN_DP --gamma 1.3 +fi diff --git a/scripts/.scripts/kaomoji b/scripts/.scripts/kaomoji new file mode 100644 index 0000000..87b1754 --- /dev/null +++ b/scripts/.scripts/kaomoji @@ -0,0 +1,362 @@ +^_^ Overjoyed (2) +(╯°□°)╯︵ ┻━┻ Flipping Table (3) +ლ(ಠ益ಠლ) But At What Cost +(//_^) Emo (5) +ʕ •ᴥ•ʔ Koala (3) +(っ^‿^)っ Kirby (5) +[¬º-°]¬ Zombie (2) +(●∈∋●) Bird (5) +ಠ_ಠ Disapproval +T.T Sad (2) +◤◡ᴥ◡◥  Dog (4) +(∩`-´)⊃━☆゚.*・。゚ Wizard +^-^ Happy (7) +ᕦ(ò_óˇ)ᕤ Flexing (3) +♪┏(・o・)┛♪ Dancing (8) +( ͡° ͜ʖ ͡°) Smiling (2) +/人◕ ‿‿ ◕人\ Kyubey +༼ ༎ຶ ෴ ༎ຶ༽ Distraught +ᒄ₍⁽ˆ⁰ˆ⁾₎ᒃ♪♬ Frosty the Snowman (2) +(╯°□°)╯︵ ┻━┻ Flipping table (2) +<(^oo^)> Pig (3) +¯\_(ツ)_/¯ Shrugging (2) +U=・ x ・=U Rabbit (2) +⊂((・▽・))⊃ Hug me (2) +V●ᴥ●V Doggy (2) +(=^_^=) Bunny (3) +<コ:彡 Squid (2) +-_-; Anime Sweat Drop (2) +(°̥̥̥̥̥̥̥̥ᴗ°̥̥̥̥̥̥̥̥) Happy crying +(=^・ェ・^=) Kitty (2) +(((༼•̫͡•༽))) Ghost (2) +(-‸ლ) Whoops +(=^ェ^=) Cat (4) +( ´-ω・)︻┻┳══━一 Sniper +⊆☉ᴥ☉⊇ Bear (7) +༼ つ ◕_◕ ༽つ Take my energy +(  ̄┏_┓ ̄) Mustache (2) +(;´Д`) Giving Up +( ͡° ʖ̯ ͡°) Disgruntled +✌(◕‿-)✌ Peace (3) +ಠ_ರೃ Monocle (2) +T^T Crying (5) +ᘛ⁐̤ᕐᐷ Chameleon +༼ つ ◕_◕ ༽つ Gimme +ლ(ಠ益ಠ)ლ Anger +(ง •̀_•́)ง Feisty +(っ⌒‿⌒)っ Hug (3) +ϵ( 'Θ' )϶ Fish (3) +(^▽^) Laughing (5) +¯\(°_o)/¯ Confused (4) +̿’̿’\̵͇̿̿\З=( ͠° ͟ʖ ͡°)=Ε/̵͇̿̿/’̿̿ ̿ ̿ ̿ ̿ ̿ Outlaw +o(^▽^)o Pumped (2) +.∵・(゚Д゚) Scared (2) +(*☉౪ ⊙。)ノ Imbecile (2) +d-(^.^)z Thumbs Up (2) +(>_<) Painful +(¬_¬") Annoyed (4) +(´╹〽╹`) Worried (4) +(o^-^o) Pikachu (2) +(▀̿Ĺ̯▀̿ ̿) Deal with it +(∩`-´)⊃━☆゚.*・。゚ Magic Attack +꒡ᘦ̲꒡ Sleeping (5) +(‾ʖ̫‾) Lethargic +^_^; Guilty +ヽ(`⌒´メ)ノ Angry (8) +^^ Blissful +^_^/ High Five (2) +ʕ•͡ᴥ•ʔ Polar bear +❆❅❉ Snowing +ヽ(★ω★)ノ Excited +U^ェ^U Puppy +⊂(^(工)^)⊃ Teddy bear +(≧∇≦)/ Joyful (2) +◦°˚\☺/˚°◦ Playing in the snow +(╯°□°)╯︵ ʞooqǝɔɐɟ Flipping Facebook +(;-_-)ノ Giving up +⊙▂⊙ Shocked +|∴め ϖ め∴| SpongeBob SquarePants +◔̯◔ Rolling Eyes +⊂(◜ᴥ◝)つ Teddy Bear +ε=(☉_☉) Accidental farting +(ಥ﹏ಥ) Devastated (2) +(•͡.•͡) Skeptical +ε=┏( >_<)┛ Running (5) +┬─┬︵/(.□.)╯ Table Flips You +〠_〠 Tired (3) +∊ಠ_ಠ∍ Distressed +V=(° °)=V Crab (2) +ᶘ ᵒᴥᵒᶅ Seal (2) +Ƹ̵̡Ӝ̵̨̄Ʒ Butterfly +(- o - ) zzZ ☽ Sleepy +◯0o。(ー。ー)y Smoking (4) +(。々°) Herp Derp +-_-* Frustrated (3) +(+[__]∙:∙) PlayStation Portable +(V) (°,,,,°) (V) Zoidberg +/|\( ;,; )/|\ Bat +◖㈠ ω ㈠◗ Panda +\m/d(^_^)b\m/ Rocking Out +ヽ(゚Д゚)ノ Freak Out (2) +(ノ゚0゚)ノ~ Yoo-Hoo +¤\( `⌂´ )/¤ Lifting weights +(ò_ó) Furious +( ˘ ³˘)♥ Kiss me +(^▽^) Cheerful (3) +(⌒ ͜ʖ⌒)b Attentive +ᕦ❍ᴗ❍ᕤ Muscular Person +(´>_●)メ(●_<`) Sword Fighting +:-Þ Teasing +=( ^o^)ノ___o Bowling +(#×_×) Dead (2) +(。・_・)ノ”【】 Painting +(/。\) Shy (5) +⎰≀.☮-☮≀⎰ John Lennon +─=≡Σ(([ ⊐•̀⌂•́]⊐ Superhero +(¬з¬)σ Pointing (2) +(・д・)} On The Phone (3) +㐈⦁ཽし⦁ཽ㐈  Larry David +⨌⨀_⨀⨌ Benjamin Franklin +(☄ฺ◣д◢)☄ฺ Scaring +ƪ(˘▽˘ƪ) Worshiping +[•.•ิ] Huh +(◐‿◑) Crazy +\(-_- ) Thank You +(_ε_) Kiss my butt +(⊃‿⊂) Anticipation +(* ̄m ̄) Dissatisfied +Q('.'Q) Put Em Up +\(^o)(^0^)(o^)/ Caroling +( ̄~ ̄) Unimpressed +༼ঢ_༽ঢ༽ Perplexed +(。♥‿♥。) Smitten +( ̄□ ̄;) Surprised +(^o^) Singing (3) +(:3 っ)っ Walrus +( `_)乂(_' ) Arm wrestle +(ง •̀ゝ•́)ง Fighting (2) +uwu Happy Anime Face +└(^o^ )X( ^o^)┘ Best buddies +d^_^b DJ +( --)/ ==卍 Ninja Star +C:。ミ Octopus +(´・ω・`) Snubbing (2) +♪(●′▽`)ノ Good Night +(#^.^#) Embarrassed (3) +ಥ_ಥ Bawling (3) +†_(゚ー゚*)β Exorcism +੯ू•́ू ໒꒱⁼³₌₃ Sonic the Hedgehog +(^‿◕) Winking (3) +(″・ิ_・ิ)っ Wait (3) +。◕‿◕。 Gleeful +ヽ( ★ω★)ノ Pumped up +_〆(。。) Writing (2) +(∿°○°)∿ ︵ ǝʌol Heartbroken +^;;^ Spider +(⓪益⓪) Staring (2) +( ̄┏∞┓ ̄) Fu Manchu Man +( • ∀•)っθΘʘ Hiding Easter eggs +_φ( °-°)/ Doing Homework +◖ර◞ʖ◟ර◗ Grandma +¬.¬ Whatever (3) +⫷ °⧭° ⫸ Clown +(♥_♥) In Love +>.< Upset (2) +( ◢д◣) Depressed (4) +ᕕ( ᐛ )ᕗ Celebrating +(¬‿¬) Cunning +└(^o^)┐ Grooving (3) +~゜・_・゜~ Raving +ᕦ◉▿◉ᕤ Owl (2) +\(^O^)/ Celebrate +(*’(OO)’*) Piggy (2) +˃ʍ˂ Enraged (2) +(ू˃̣̣̣̣̣̣︿˂̣̣̣̣̣̣ ू) Sobbing (3) +( ^^)人(^^ ) Best Buds +└@(・ェ・)@┐ Beefcake +(☉__☉”) Yikes +(╯˘ -˘ )╯ Praying (2) +ε=┌( ≧▽)┘ Elated +( •_•)O °Q(•_• ) Playing Ping Pong +∋(°O°)∈ Blowfish +(;一_一) Ashamed (4) +{♥‿♥} Lovestruck +๏-) Cyclops +(o ̄∇ ̄)=◯)`ν゜)・ Punching (6) +┬─┬ノ( º _ ºノ) Putting Table Back (2) +(~_(]=--Z(◡˘) Pie Fight +((((((^_^;) Evading +(/o^)/°⊥\(^o\) Volleyball +-{'''|'''|'''|''']=[] Syringe +[^._.^]ノ彡 Nyan Cat +---(o_ _)o Tripping (2) +┬┴┬┴┤(・_├┬┴┬┴ Snooper +(ㆆ_ㆆ) Unamused +(✿◠‿◠)  Hippie +ヾ(* ̄O ̄)ツ Yelling +(ɔ◔‿◔)ɔ ♥ Loving +(ノ-o-)ノ 中 Olympic Hammer Throw +(/ω・\) Peering +(´・ω・)っ由 Gift +[-_-]~ Ninja +(シ_ _)シ Apology (2) +∋∞(●゚v゚)∞∈ Pigtails +‎(>o<)ρミ┳┷┳゜ Table Tennis +(^̮^) Pleased (2) +♪~( ̄ε ̄;) Whistling +( ̄▼ ̄) Big Grin +⋟^≏^⋞ Kitty Cat +( ̄へ ̄) Discontent +(*・_・)ノ⌒* Throwing Away +(*@_*#) Beaten Up +(p_-) Thinking +(。_°)☆ Punched +♥‿♥ Enamored +ε-(´・`) フ Phew +༼ঢ_㇁ঢ༽ Bad hair day +(づ ̄ ³ ̄)づ Smooch (3) +O(<>'<>)O Aang +(_ _)..ooOO Dreaming +┳┻┳° Ping Pong table +^o^ Mog +(゚皿゚)r┏┳-* Shooting (2) +m( ゚皿゚)m★━━ Laser +٩◔̯◔۶ Eye Roll With Hands Up +ヽ(´Д`ヽミノ´Д`)ノ Frantic (2) +(-ε- ) Pucker up (3) +ヽ(⌐■_■)ノ♪♬ Boogie down +「(°ヘ°) Puzzled +d(^_^)b Listening to Music +( -_-)旦~ Drinking +<_< Looking (4) +(( _ _)☆ ≡〇 Header +^)_(^ Chubby +(๑´•.̫ • `๑) Blushing +(。▼皿▼) Darth Vader +(╬☉Д⊙ฺ) Cyborg +(ʘ‿ʘ) Smile +ε=ε=ε=┌(๑ʘ∀ʘ)┘ Sprinting +ƪ(˘⌣˘)ʃ Raise the roof +( ˘︹˘ ) Smug +(▰˘◡˘▰) Satisfied +(¬、¬) Shifty +¯(°_o)/¯ Confused shrug +✖‿✖ Dead person +(。_°☆\(- – ) Punch +(ɔˆ ³(ˆ⌣ˆc) Loving couple +(*▿▿* ƪ) Vampire +o(^^o)(o^^)o Hopeful +___ψ(‥ ) Studying +_φ(°-°=) Doing homework +@( o・ω・)@ Monkey +(╭ರ_•́) Inquisitive +੯ू‵ू ໒꒱ Poodle +(*^^)^*) Kiss (5) +(^~^) Meh +(/。\) Frightened +:þ Playful +(>^_^)><(^o^<) Hugging +(-_ゞ Groggy +(*^o^)人(^o^*) Buddies +(●´ノω`)コ Whispering (2) +o(´^`)o Reluctant +( つ Д `) Wiping Tears +(o´・Υ・)ノ・ Help (2) +(。・ˇдˇ・。) Pompous +(´∪`*) Friendly +ヘ(。□°)ヘ Psycho +(人’∀’) Precious +(っ˘ڡ˘ς) Yummy +┗(・ω・;)┛ How Should I Know +(о^ω^о) Giggling +(´ー`)┌フッ Golf Clap +\\(<.<|>.>)// Panicking +^(#`∀´)_Ψ Demon +(╯‵Д′)╯ Scary +:-{  -__-: Stinky +ಠᴗಠ Scheming +<(; ̄ ・ ̄) Scratching +\(^ ^)/ Glad +(╯_╰) Bummed out +┗( ●-﹏ `。)づ Hurt (2) +(-_-)# Girl +8(>_<)8 Jealous +(*°∀°)=3 Infatuated (3) +( ^_^)/ Waving +o(^_-)O Boxer +{{|└(>o< )┘|}} Up In Arms +(^^)// Applause (2) +( `_)?(_' ) Dueling +(´~`) Weary +v(^_^)v Victory (3) +(ノ_ _)ノ Surrender +<( ・ェ-)<} Bow and Arrow +( `o´)_θ☆ Kicking +(-□-)︵* Blowing a Kiss +|д・) Hiding (4) +(´Д゜)/゜⌒。 Discarding +ʕʔ Bread +(ɔ˘з˘)ɔ Romantic +ʕ •́؈•̀) Winnie the Pooh +(ó ì_í)=óò=(ì_í ò) Bro Pound +ヾ(`ε´)ノ Booing +|̲̅̅●̲̅̅|̲̅̅=̲̅̅|̲̅̅●̲̅̅| Stereo +ʘ‿ʘ Eager +:(¦) Frog +( ^)/占~~~ Banksy +(;´༎ຶД༎ຶ`) Weeping (2) +⊂ •͡˘∠•͡˘ ⊃ Suspicious +( ° ᴗ°)~ð  Proposal +(๑╹ڡ╹๑) Tasty +(¬_¬ ) Neglected +ʕु•̫͡•ʔु Bear cub (2) +┌|°з°|┘ Cutting a rug +(⊙_◎) Crazed +(✖╭╮✖) Deceased +←~(o `▽´ )oΨ Satan +˙ ͜ʟ˙ Content +( ˇ෴ˇ ) Hipster +♫.(◠౪◠).♫ Jamming to music +∊♡_ᴥ_♡∍ Puppy Love +L(´□`L) Oh No! (2) +(;´ρ`) Yawning +(╯ნ_㇁ნ)╯ Defeated +(.〜◍`皿′◍〜.) Livid (2) +ᡊ|◔じ◔|ᡊ  Woody Allen +✌(გ_㇁გ)✌ Ringo Starr +╹﹏╹ Cold +☉ϖ☉ Lobster +(๑≖ิิ益≖ิ๑) Evil Laugh +(((☎))) Phone +(○`д´)ノシ Σ(っ゚Д゚)っ Chasing +o(>< )o⌒* Mad (3) +ლ(´ڡ`ლ) Licking +⪿ ↂ ˒̫̮ ↂ ⫀ Elton John +(•ᴥ• )́`́'́`́'́⻍ Porcupine +且_(゚◇゚;)ノ゙ Waiter +◖⎚∠⎚◗ Geek +-ˆ ω ˆ- Kitten +•:_:• Nagato +ε=┌(^-^)┘ Skipping +(+.+)(-.-)(_ _) Falling Asleep +[ ± _ ± ] Sick +〜〜(/ ̄▽)/ 〜ф Chasing A Butterfly +\(`0´)/ Fed Up +¥[*.*]¥ Robot +(*・)σσ(*゜O゜) Poking +( ̄ー ̄(_ _( Nodding +▼o・_・o▼ Hello +(`_^) Wink +/( _0_) ̄θ☆≡≡○ Scissor Kick +ヽ(´ー`)┌ Mellow +(^ _ ^)/~~ Goodbye +(*・)「」「」 Magic Casting +( `皿´)。ミ/ Hitting +[]゛7(∀゜*) Dialing +(((((^_^) Teleporting +( ̄ー ̄)//”” Clapping +(。。;)\(-_-) Comforting +(*  ̄)( ̄ *)  Kissing +(;^_^)ッ☆( ゜o゜) Slapping +\(~O~)/ Good Morning +\_(´▽`)♪_/ Bathtub diff --git a/scripts/.scripts/lock b/scripts/.scripts/lock new file mode 100755 index 0000000..01820fb --- /dev/null +++ b/scripts/.scripts/lock @@ -0,0 +1,2 @@ +#!/bin/sh +i3lock-fancy -p -t '' diff --git a/scripts/.scripts/looking-glass-start.sh b/scripts/.scripts/looking-glass-start.sh new file mode 100755 index 0000000..7616fd1 --- /dev/null +++ b/scripts/.scripts/looking-glass-start.sh @@ -0,0 +1,3 @@ +scream -i virbr0 & +looking-glass-client -G input:rawMouse=yes input:autocapture=yes -j input:escapeKey=119 +pkill scream diff --git a/scripts/.scripts/max_input_volume.sh b/scripts/.scripts/max_input_volume.sh new file mode 100755 index 0000000..58c5b9a --- /dev/null +++ b/scripts/.scripts/max_input_volume.sh @@ -0,0 +1,3 @@ +#!/bin/sh +pacmd set-source-volume 2 300000 +#notify-send "You are on max input vol" diff --git a/scripts/.scripts/memeselector b/scripts/.scripts/memeselector new file mode 100755 index 0000000..d6121a1 --- /dev/null +++ b/scripts/.scripts/memeselector @@ -0,0 +1,6 @@ +#!/bin/sh + +FOLDER=/home/david/docs/proj/davidovski.xyz/f/meme +cd $FOLDER +xdotool type "https://davidovski.xyz/f/meme/$(ls -1 | dmenu)" + diff --git a/scripts/.scripts/mpc_picker b/scripts/.scripts/mpc_picker new file mode 100755 index 0000000..0e6fddc --- /dev/null +++ b/scripts/.scripts/mpc_picker @@ -0,0 +1,4 @@ +#!/bin/sh +chosen=$(mpc listall | dmenu -i -p mpd) +[ "$chosen" != "" ] || exit +mpc insert "$chosen" diff --git a/scripts/.scripts/muted_input_volume.sh b/scripts/.scripts/muted_input_volume.sh new file mode 100755 index 0000000..3cd1967 --- /dev/null +++ b/scripts/.scripts/muted_input_volume.sh @@ -0,0 +1,3 @@ +#!/bin/sh +pacmd set-source-volume 2 0 +#notify-send "You are muted" diff --git a/scripts/.scripts/normal_input_volume.sh b/scripts/.scripts/normal_input_volume.sh new file mode 100755 index 0000000..1409bb1 --- /dev/null +++ b/scripts/.scripts/normal_input_volume.sh @@ -0,0 +1,4 @@ +#!/bin/sh +pacmd set-source-volume 2 62000 +#notify-send "You are on normal input vol" + diff --git a/scripts/.scripts/notepad b/scripts/.scripts/notepad new file mode 100755 index 0000000..5fdcf27 --- /dev/null +++ b/scripts/.scripts/notepad @@ -0,0 +1,3 @@ +#!/bin/sh +F="$HOME/docs/proj/scratchpad.txt" +bspc rule -a \* -o state=floating && $TERMINAL -e vim $F diff --git a/scripts/.scripts/powermenu b/scripts/.scripts/powermenu new file mode 100755 index 0000000..49b8f3e --- /dev/null +++ b/scripts/.scripts/powermenu @@ -0,0 +1,2 @@ +#!/bin/sh +printf "suspend\nreboot\npoweroff\nhibernate" | rofi -dmenu -p "systemctl" | xargs -r systemctl diff --git a/scripts/.scripts/reddit-scrape b/scripts/.scripts/reddit-scrape new file mode 100755 index 0000000..6ea7f72 --- /dev/null +++ b/scripts/.scripts/reddit-scrape @@ -0,0 +1,43 @@ +#!/bin/sh + +#cfg +useragent="Love by u/gadelat" +timeout=60 + +subreddit=$1 +sort=$2 +top_time=$3 + +if [ -z $sort ]; then + sort="hot" +fi + +if [ -z $top_time ];then + top_time="" +fi + +url="https://www.reddit.com/r/$subreddit/$sort/.json?raw_json=1&t=$top_time" +content=`wget -T $timeout -U "$useragent" -q -O - $url` +mkdir -p $subreddit +while : ; do + urls=$(echo -n "$content"| jq -r '.data.children[]|select(.data.post_hint|test("image")?) | .data.preview.images[0].source.url') + names=$(echo -n "$content"| jq -r '.data.children[]|select(.data.post_hint|test("image")?) | .data.title') + ids=$(echo -n "$content"| jq -r '.data.children[]|select(.data.post_hint|test("image")?) | .data.id') + a=1 + wait # prevent spawning too many processes + for url in $urls; do + name=`echo -n "$names"|sed -n "$a"p` + id=`echo -n "$ids"|sed -n "$a"p` + ext=`echo -n "${url##*.}"|cut -d '?' -f 1` + newname=`echo $name | sed "s/^\///;s/\// /g"`_"$subreddit"_$id.$ext + echo $name + wget -T $timeout -U "$useragent" --no-check-certificate -nv -nc -P down -O "$subreddit/$newname" $url &>/dev/null & + a=$(($a+1)) + done + after=$(echo -n "$content"| jq -r '.data.after//empty') + if [ -z $after ]; then + break + fi + url="https://www.reddit.com/r/$subreddit/$sort/.json?count=200&after=$after&raw_json=1&t=$top_time" + content=`wget -T $timeout -U "$useragent" --no-check-certificate -q -O - $url` +done diff --git a/scripts/.scripts/revive-chrome-gpu b/scripts/.scripts/revive-chrome-gpu new file mode 100755 index 0000000..0bf16bc --- /dev/null +++ b/scripts/.scripts/revive-chrome-gpu @@ -0,0 +1,16 @@ +#!/bin/sh + +set -e + +if [ "$2" = "suspend" ] || [ "$2" = "hybrid-sleep" ] +then + case "$1" in + pre) + true + ;; + post) + sleep 1 + pkill -f 'brave \-\-type=gpu-process' + ;; + esac +fi diff --git a/scripts/.scripts/screenrecord b/scripts/.scripts/screenrecord new file mode 100755 index 0000000..23a4557 --- /dev/null +++ b/scripts/.scripts/screenrecord @@ -0,0 +1,3 @@ +#!/bin/bash +filename=$(date +"/home/david/screenrecord_%F_%T") +/usr/bin/obs --startrecording --minimize-to-tray --scene main diff --git a/scripts/.scripts/screenshot b/scripts/.scripts/screenshot new file mode 100755 index 0000000..3aa7f47 --- /dev/null +++ b/scripts/.scripts/screenshot @@ -0,0 +1,4 @@ +#!/bin/bash +#sleep 0.2 +#scrot -s '/home/david/pics/screenshot/%F_%T_$wx$h.png' -e 'xclip -selection clipboard -target image/png -i $f' +maim -su /dev/stdout | tee >(xclip -selection clipboard -t image/png) > $(date +"/home/david/pics/screenshot/%F_%T.png") diff --git a/scripts/.scripts/screenshot_floating b/scripts/.scripts/screenshot_floating new file mode 100755 index 0000000..29e8303 --- /dev/null +++ b/scripts/.scripts/screenshot_floating @@ -0,0 +1,9 @@ + #!/bin/sh +filename=$(date +"/home/david/pics/screenshot/%F_%T.png") +maim -su $filename && bspc rule -a \* -o state=floating && feh -Z $filename + + + + + + diff --git a/scripts/.scripts/screenshot_fs b/scripts/.scripts/screenshot_fs new file mode 100755 index 0000000..827eb9f --- /dev/null +++ b/scripts/.scripts/screenshot_fs @@ -0,0 +1,4 @@ +#!/bin/bash +#sleep 0.2 +#scrot -s '/home/david/pics/screenshot/%F_%T_$wx$h.png' -e 'xclip -selection clipboard -target image/png -i $f' +maim -u /dev/stdout | tee >(xclip -selection clipboard -t image/png) > $(date +"/home/david/pics/screenshot/%F_%T.png") diff --git a/scripts/.scripts/start-mpd b/scripts/.scripts/start-mpd new file mode 100755 index 0000000..29e2791 --- /dev/null +++ b/scripts/.scripts/start-mpd @@ -0,0 +1,3 @@ +#!/bin/sh +[ ! -s ~/.config/mpd/pid ] && mpd .config/mpd/mpd.conf +[ -s ~/.config/mpd/pid ] && mpd-rpc --no-idle --fork diff --git a/scripts/.scripts/sync-phone b/scripts/.scripts/sync-phone new file mode 100755 index 0000000..6347779 --- /dev/null +++ b/scripts/.scripts/sync-phone @@ -0,0 +1,9 @@ +#!/bin/sh +mkdir ~/phone +jmtpfs ~/phone +rsync -vr --ignore-existing ~/music/* ~/phone/SanDisk\ SD\ card/Music/ +echo "Synced files, Press enter to unmount" +read +umount ~/phone +rmdir ~/phone + diff --git a/scripts/.scripts/tablet b/scripts/.scripts/tablet new file mode 100755 index 0000000..6702ace --- /dev/null +++ b/scripts/.scripts/tablet @@ -0,0 +1,61 @@ +#!/usr/bin/python +import sys + +#Arguments +dev = sys.argv[1] +prop = sys.argv[2] +scale = float(sys.argv[3]) +tablet_ratio = (lambda s: float(s[0]) / float(s[1]))(sys.argv[4].split(":")) if len(sys.argv) > 4 else 16/9 + +#Layout of screens: (x, y, w, h) +screens = [ + (0,0, 1080, 1920), + (1080, 0, 2560, 1440), + (3640, 208, 1280, 1024), +] + +#TODO find this with xrandr + +target = screens[1] + +#Physical offset of the selected screen +offsetx = target[0] +offsety = target[1] + +#Size of the full screen areas +sh = 1920 +sw = 1280 + 2560 + 1080 +#TODO calculate using list of screens + +#Aspect ratio of the tablet, to avoid weird scaling problems + +#Size of the tablet +#Prioritize the with when scaling between aspect ratios +tw = target[2] +th = tw / tablet_ratio +print(tw, "x", th) + +#make a variable that will try to make the scale the same over diferent resoultions +f = target[3] / target[3] +print ("f value =", f) + +#calculate the new area size +aw = tw * scale * f +ah = th * scale * f + +ox = (target[2] - aw) / 2 + offsetx +oy = (target[3] - ah) / 2 + offsety +#ox = offsetx +#oy = offsety + + +c0 = aw / sw +c2 = ah / sh +c1 = ox / sw +c3 = oy / sh + +print(str(c0), "0", str(c1), "0", str(c2), str(c3), "0 0 1") + +import os +os.system(" ".join(["xinput set-prop", dev, prop, str(c0), "0", str(c1), "0", str(c2), str(c3), "0 0 1"])) +#alias tablet2="xinput set-prop 18 156 2.45 0 -0.725 0 2.45 -0.725 0 0 1" diff --git a/scripts/.scripts/toggle-gap.sh b/scripts/.scripts/toggle-gap.sh new file mode 100755 index 0000000..d1eef2d --- /dev/null +++ b/scripts/.scripts/toggle-gap.sh @@ -0,0 +1,3 @@ +#!/bin/sh +GAP=16; bspc config window_gap | grep -q $GAP && bspc config window_gap 0 || bspc config window_gap $GAP + diff --git a/scripts/.scripts/toggle-size-hints.sh b/scripts/.scripts/toggle-size-hints.sh new file mode 100755 index 0000000..b49f339 --- /dev/null +++ b/scripts/.scripts/toggle-size-hints.sh @@ -0,0 +1,3 @@ +#!/bin/sh +bspc config honor_size_hints | grep -q true && bspc config honor_size_hints false || bspc config honor_size_hints true + diff --git a/scripts/.scripts/vfetch b/scripts/.scripts/vfetch new file mode 100755 index 0000000..e0018e3 --- /dev/null +++ b/scripts/.scripts/vfetch @@ -0,0 +1,288 @@ +#!/usr/bin/env python3 + +from xdg.BaseDirectory import xdg_config_home +from enum import Enum +import subprocess +import platform +import distro +import json +import re +import os +import wmctrl + +colors = [ + # Regular colors. + "\u001b[30m", + "\u001b[31m", + "\u001b[32m", + "\u001b[33m", + "\u001b[34m", + "\u001b[35m", + "\u001b[36m", + "\u001b[37m", + + # Bright colors. + "\u001b[30;1m", + "\u001b[31;1m", + "\u001b[32;1m", + "\u001b[33;1m", + "\u001b[34;1m", + "\u001b[35;1m", + "\u001b[36;1m", + "\u001b[37;1m", + + # Reset. + "\u001b[0m" +] + +decorations = [ + "\u001b[1m", # Bold. + "\u001b[4m", # Underline. + "\u001b[7m" # Reversed. +] + +# Creates a copy of the specified string with color and decorations added. +def colored(string, colorIndex, decorationIndices=[]): + newString = colors[colorIndex] + for decorationIndex in decorationIndices: + newString += decorations[decorationIndex] + newString += string + colors[len(colors)-1] + return newString + +# Enum for the different data types. +class Type(str, Enum): + os = 'os' + kernel = 'kernel' + wm = 'wm' + packages = 'packages' + uptime = 'uptime' + +# Enum for the different align modes. +class AlignMode(str, Enum): + spaces = 'spaces' + center = 'center' + +# Loads the settings from the configuration file. +# First checks for a configuration file in ~/.config/vfetch/vfetch.conf, +# else it defaults to the configuration file in the same folder as the script. +def loadSettings(): + try: + file = open(xdg_config_home + '/vfetch/vfetch.conf', 'r') + except FileNotFoundError: + file = open(os.path.dirname(os.path.realpath(__file__)) + '/vfetch.conf', 'r') + content = file.read() + settings = json.loads(content) + file.close() + return settings + +# Prints string without ending with a new line. +def printn(string): + print(string, end="") + +# Prints string at a specified position. +def printAt(string, *position): + if len(position) == 1: + x = position[0][0] + y = position[0][1] + else: + x = position[0] + y = position[1] + printn("\x1b7\x1b[%d;%df%s\x1b8" % (y+1, x+1, string)) + +# Prints the data lines. +def printLines(lines, colorIndex, offsetX, offsetY, alignMode, alignSpace): + longestName = 0 + dataPosition = 0 + + if alignMode is AlignMode.spaces: + for line in lines: + position = len(line[0]) + alignSpace + if position > dataPosition: + dataPosition = position + else: + # Finds the length of the longest name. + longestName = len(max(lines, key = lambda data: len(data[0]))[0]) + + y = 0 + x = offsetX + # Prints the lines and formats them accordingly. + for line in lines: + if alignMode is AlignMode.spaces: + printAt(line[1], x + dataPosition, y+offsetY) + elif alignMode is AlignMode.center: + line[0] = ' ' * (longestName - len(line[0])) + line[0] + + printAt(colored(line[0], colorIndex, [0]), x, y+offsetY) + if alignMode is AlignMode.center: + printAt(' ~ ' + line[1], x+len(line[0]), y+offsetY) + y += 1 + +# Sets the cursor position. +def setCursorPosition(*position, newLine=False): + if len(position) == 1: + x = position[0][0] + y = position[0][1] + else: + x = position[0] + y = position[1] + string = '\033[%d;%dH' % (y, x) + if newLine: + print(string) + else: + printn(string) + +# Runs the specified terminal command. +def termRun(command, arguments): + output = subprocess.run([command, arguments], text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + return output.stdout + +# Prints ascii image. +def printAscii(position, asciiImage): + setCursorPosition(position) + lines = asciiImage.split('\n') + for line in lines: + print(line) + +# Gets the operating system. +def getOS(architecture=False, removeLinux=False): + os = distro.linux_distribution()[0] + if removeLinux: + os = re.sub('linux', '', os, flags=re.IGNORECASE) + os = os.rstrip() + if architecture: + os += ' ' + platform.machine() + return os + +# Gets the kernel. +def getKernel(fullName=True): + kernel = platform.release() + if not fullName: + kernel = kernel.split('-')[0] + return kernel + +# Gets the window manager. +def getWM(): + try: + return wmctrl.os.environ.get('DESKTOP_SESSION') + except: + pass + try: + return wmctrl.os.environ.get('XDG_SESSION_DESKTOP') + except: + return None + +# Gets the number of packages. +def getPackages(displayPackageManager=False): + try: + packages = termRun('pacman', '-Qq') + string = str(len(packages.split('\n'))) + if displayPackageManager: + string += ' (pacman)' + return string + except: + return None + +# Gets the machine uptime. +def getUptime(): + with open('/proc/uptime', 'r') as f: + uptime_seconds = float(f.readline().split()[0]) + hours = uptime_seconds / 3600 + minutes = (hours - int(hours)) * 60 + hours = int(hours) + minutes = int(minutes) + string = '' + if hours != 0: + string += str(hours) + 'h ' + if minutes != 0 or hours == 0: + string += str(minutes) + 'm' + return string + +# Gets the data for the specified data type. +def getData(type, settings): + data = { + Type.os: getOS(settings['displayArchitecture'], settings['removeLinux']), + Type.kernel: getKernel(settings['kernelFullName']), + Type.wm: getWM(), + Type.packages: getPackages(settings['displayPackageManager']), + Type.uptime: getUptime() + }.get(type, None) + + if data is None: + return None + + name = { + Type.os: [ 'OS', '' ], + Type.kernel: [ 'Kernel', '' ], + Type.wm: [ 'WM', '缾' ], + Type.packages: [ 'Packages', '' ], + Type.uptime: [ 'Uptime', '' ] + }.get(type, None)[int(settings['iconMode'])] + + if settings['lowercase']: + name = name.lower() + data = data.lower() + + return [name, data] + +# Gets the size of the specified ascii image. +def asciiSize(asciiImage): + x = 0 + split = asciiImage.split('\n') + for line in split: + if len(line) > x: + x = len(line) + return [x, len(split)] + +# Trims the specified ascii image of empty lines and trailing whitespaces. +def trimAscii(asciiImage): + lines = asciiImage.split('\n') + string = '' + for line in lines: + trimmedString = line.rstrip() + if len(trimmedString) != 0: + string += trimmedString + '\n' + string = string[:-1] # Removes last newline. + return string + +# Loads the ascii image at the specified path. +def loadAsciiImage(path): + file = open(path, 'r') + asciiImage = trimAscii(file.read()) + file.close() + return asciiImage + +settings = loadSettings() + +displayAscii = settings['displayAscii'] +offset = settings['offset'] + +# Loads the data lines. If the data is invalid (None) it does not get added. +lines = [] +for dataType in settings['data']: + data = getData(dataType, settings) + if data is not None: + lines.append(data) + +# Loads the ascii image if the option is set for it. +if displayAscii: + asciiImage = loadAsciiImage(settings['asciiImage']) + size = asciiSize(asciiImage) + offset[0] += size[0] + finalPosition = [0, size[1]] +else: + finalPosition = [0, len(lines)+offset[1]] + +# Makes the prompt after the script finishes have a blank line before it. +finalPosition[1] += 1 + +os.system('clear') + +if displayAscii: + printAscii([0,0], asciiImage) + +alignMode = AlignMode(settings['alignMode']) + +printLines(lines, settings['colorIndex'], offset[0], offset[1], alignMode, settings['alignSpace']) + +# Sets the final cursor position for the prompt to end up at. +setCursorPosition(finalPosition, newLine=True) diff --git a/scripts/.scripts/websearch b/scripts/.scripts/websearch new file mode 100755 index 0000000..996ddc3 --- /dev/null +++ b/scripts/.scripts/websearch @@ -0,0 +1,14 @@ +#!/bin/sh + + +SEARCH_ENGINE="https://search.brave.com/search?q=" +SEARCH_HISTORY=/tmp/.search_history + +SEARCH=$(cat $SEARCH_HISTORY | dmenu -p "search") + +touch $SEARCH_HISTORY + +cat <<< "$SEARCH +$(cat $SEARCH_HISTORY)" > $SEARCH_HISTORY + +brave "$SEARCH_ENGINE$SEARCH" -- cgit v1.2.1