From 49fff5a029e08f31941c75c19a72d7e7eb1ed172 Mon Sep 17 00:00:00 2001 From: davidovski Date: Sat, 9 Oct 2021 22:58:10 +0100 Subject: fixed scripts --- deploy.sh | 2 +- 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/fzf-bash-completion.sh | 470 -------------------------------- 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 - 37 files changed, 1 insertion(+), 1801 deletions(-) delete mode 100755 scripts/.scripts/autoclick.sh delete mode 100755 scripts/.scripts/bg.sh delete mode 100755 scripts/.scripts/calculator delete mode 100755 scripts/.scripts/centered delete mode 100755 scripts/.scripts/cinema.sh delete mode 100755 scripts/.scripts/compress-video delete mode 100755 scripts/.scripts/ddc-switch-inputs delete mode 100755 scripts/.scripts/dmenu-kb delete mode 100755 scripts/.scripts/dmenuemoji delete mode 100755 scripts/.scripts/dmenukaomoji delete mode 100644 scripts/.scripts/emoji delete mode 100644 scripts/.scripts/fzf-bash-completion.sh delete mode 100755 scripts/.scripts/gamma.sh delete mode 100644 scripts/.scripts/kaomoji delete mode 100755 scripts/.scripts/lock delete mode 100755 scripts/.scripts/looking-glass-start.sh delete mode 100755 scripts/.scripts/max_input_volume.sh delete mode 100755 scripts/.scripts/memeselector delete mode 100755 scripts/.scripts/mpc_picker delete mode 100755 scripts/.scripts/muted_input_volume.sh delete mode 100755 scripts/.scripts/normal_input_volume.sh delete mode 100755 scripts/.scripts/notepad delete mode 100755 scripts/.scripts/powermenu delete mode 100755 scripts/.scripts/reddit-scrape delete mode 100755 scripts/.scripts/revive-chrome-gpu delete mode 100755 scripts/.scripts/screenrecord delete mode 100755 scripts/.scripts/screenshot delete mode 100755 scripts/.scripts/screenshot_floating delete mode 100755 scripts/.scripts/screenshot_fs delete mode 100755 scripts/.scripts/start-mpd delete mode 100755 scripts/.scripts/sync-phone delete mode 100755 scripts/.scripts/tablet delete mode 100755 scripts/.scripts/toggle-gap.sh delete mode 100755 scripts/.scripts/toggle-size-hints.sh delete mode 100755 scripts/.scripts/vfetch delete mode 100755 scripts/.scripts/websearch diff --git a/deploy.sh b/deploy.sh index 43c6cfa..981a3b8 100755 --- a/deploy.sh +++ b/deploy.sh @@ -5,11 +5,11 @@ configurations=( iocane bg bspwm cava neofetch mpd mpv ncmpcpp vim sxhkd polybar save () { mkdir config - mkdir scripts for i in "${configurations[@]}"; do cp -r "$HOME/.config/$i" config/ done + rm -r scripts cp -r "$HOME/.scripts" scripts cp $HOME/.profile profile diff --git a/scripts/.scripts/autoclick.sh b/scripts/.scripts/autoclick.sh deleted file mode 100755 index 8abb8d9..0000000 --- a/scripts/.scripts/autoclick.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/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 deleted file mode 100755 index 23bf6a3..0000000 --- a/scripts/.scripts/bg.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -feh --bg-fill ~/.config/bg diff --git a/scripts/.scripts/calculator b/scripts/.scripts/calculator deleted file mode 100755 index f092fd8..0000000 --- a/scripts/.scripts/calculator +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -bspc rule -a \* -o state=floating && $TERMINAL -e bc -liq diff --git a/scripts/.scripts/centered b/scripts/.scripts/centered deleted file mode 100755 index a663336..0000000 --- a/scripts/.scripts/centered +++ /dev/null @@ -1,17 +0,0 @@ -#!/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 deleted file mode 100755 index c453260..0000000 --- a/scripts/.scripts/cinema.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/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 deleted file mode 100755 index 983daec..0000000 --- a/scripts/.scripts/compress-video +++ /dev/null @@ -1,4 +0,0 @@ -#!/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 deleted file mode 100755 index d85fed2..0000000 --- a/scripts/.scripts/ddc-switch-inputs +++ /dev/null @@ -1,19 +0,0 @@ -#!/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 deleted file mode 100755 index 3e4b869..0000000 --- a/scripts/.scripts/dmenu-kb +++ /dev/null @@ -1,2 +0,0 @@ -#!/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 deleted file mode 100755 index 090e8e3..0000000 --- a/scripts/.scripts/dmenuemoji +++ /dev/null @@ -1,23 +0,0 @@ -#!/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 deleted file mode 100755 index 8af99b3..0000000 --- a/scripts/.scripts/dmenukaomoji +++ /dev/null @@ -1,24 +0,0 @@ -#!/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 deleted file mode 100644 index 87b1754..0000000 --- a/scripts/.scripts/emoji +++ /dev/null @@ -1,362 +0,0 @@ -^_^ 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/fzf-bash-completion.sh b/scripts/.scripts/fzf-bash-completion.sh deleted file mode 100644 index 9a63e15..0000000 --- a/scripts/.scripts/fzf-bash-completion.sh +++ /dev/null @@ -1,470 +0,0 @@ -_FZF_COMPLETION_SEP=$'\x01' - -# shell parsing stuff -_fzf_bash_completion_egrep="$( { which rg || echo egrep; } 2>/dev/null)" -_fzf_bash_completion_awk="$( { which gawk || echo awk; } 2>/dev/null)" -_fzf_bash_completion_sed="$( { which gsed || echo sed; } 2>/dev/null)" - -_fzf_bash_completion_awk_escape() { - "$_fzf_bash_completion_sed" 's/\\/\\\\\\\\/g; s/[[*^$.]/\\\\&/g' <<<"$1" -} - -_fzf_bash_completion_shell_split() { - "$_fzf_bash_completion_egrep" -o \ - -e '[;(){}&\|:]' \ - -e '\|+|&+' \ - -e "(\\\\.|[^\"'[:space:];:(){}&\\|])+" \ - -e "\\\$'(\\\\.|[^'])*('|$)" \ - -e "'[^']*('|$)" \ - -e '"(\\.|\$($|[^(])|[^"$])*("|$)' \ - -e '".*' -e . -} - -_fzf_bash_completion_unbuffered_awk() { - # need to get awk to be unbuffered either by using -W interactive or system("") - "$_fzf_bash_completion_awk" -W interactive "${@:3}" "$1 { $2; print \$0; system(\"\") }" 2>/dev/null -} - -_fzf_bash_completion_flatten_subshells() { - ( - local count=0 buffer= - while IFS= read -r line; do - case "$line" in - \(|\{) (( count -- )) ;; - \)|\}) (( count ++ )) ;; - esac - - if (( count < 0 )); then - return - elif (( count > 0 )); then - buffer="$line$buffer" - else - printf '%s\n' "$line$buffer" - buffer= - fi - done < <(tac) - printf '%s\n' "$buffer" - ) | tac -} - -_fzf_bash_completion_find_matching_bracket() { - local count=0 - while IFS=: read num bracket; do - if [ "$bracket" = "$1" ]; then - (( count++ )) - if (( count > 0 )); then - printf '%s\n' "$num" - return 0 - fi - else - (( count -- )) - fi - done < <(fgrep $'(\n)' -n) - return 1 -} - -_fzf_bash_completion_parse_dq() { - local words="$(cat)" - local last="$(<<<"$words" tail -n1)" - - if [[ "$last" == \"* ]]; then - local shell="${last:1}" _shell joined - local word= - while true; do - # we are in a double quoted string - _shell="$(<<<"$shell" "$_fzf_bash_completion_sed" -r 's/^(\\.|[^"$])*\$\(//')" - - if [ "$shell" = "$_shell" ]; then - # no subshells - break - fi - - word+="${shell:0:-${#_shell}-2}" - shell="$_shell" - - # found a subshell - split="$(<<<"$shell" _fzf_bash_completion_shell_split)" - if ! split="$(_fzf_bash_completion_parse_dq <<<"$split")"; then - # bubble up - printf '%s\n' "$split" - return 1 - fi - if ! num="$(_fzf_bash_completion_find_matching_bracket ')' <<<"$split")"; then - # subshell not closed, this is it - printf '%s\n' "$split" - return 1 - fi - # subshell closed - joined="$(<<<"$split" head -n "$num" | tr -d \\n)" - word+=$'\n'"\$($joined"$'\n' - shell="${shell:${#joined}}" - done - fi - printf '%s\n' "$words" -} - -_fzf_bash_completion_parse_line() { - _fzf_bash_completion_shell_split \ - | _fzf_bash_completion_parse_dq \ - | _fzf_bash_completion_flatten_subshells \ - | tr \\n \\0 \ - | "$_fzf_bash_completion_sed" -r "$(cat <<'EOF' -s/\x00\s*\x00/\n/g; -s/\x00(\s*)$/\n\1/; -s/([^&\n\x00])&([^&\n\x00])/\1\n\&\n\2/g; -s/([\n\x00\z])([<>]+)([^\n\x00])/\1\2\n\3/g; -s/([<>][\n\x00])$/\1\n/; -s/^(.*[\x00\n])?(\[\[|case|do|done|elif|else|esac|fi|for|function|if|in|select|then|time|until|while|&|;|&&|\|[|&]?)[\x00\n]//; -s/^(\s*[\n\x00]|\w+=[^\n\x00]*[\n\x00])*// -EOF -)" \ - | tr \\0 \\n -} - -_fzf_bash_completion_compspec() { - complete -p -- "$1" || complete -p '' || printf '%s\n' 'complete -o filenames -F _fzf_bash_completion_fallback_completer' -} - -_fzf_bash_completion_fallback_completer() { - # fallback completion in case no compspecs loaded - if [[ "$1" == \~* && "$1" != */* ]]; then - # complete ~user directories - readarray -t COMPREPLY < <(compgen -P '~' -u -- "${1#\~}") - else - # complete files - readarray -t COMPREPLY < <(compgen -f -- "$1") - fi -} - -_fzf_bash_completion_loading_msg() { - echo 'Loading matches ...' -} - -fzf_bash_completion() { - printf '\r' - command tput sc 2>/dev/null || echo -ne "\0337" - printf '%s' "$(_fzf_bash_completion_loading_msg)" - command tput rc 2>/dev/null || echo -ne "\0338" - - local COMP_WORDS COMP_CWORD COMP_POINT COMP_LINE - local line="${READLINE_LINE:0:READLINE_POINT}" - readarray -t COMP_WORDS < <(_fzf_bash_completion_parse_line <<<"$line") - - if [[ "${#COMP_WORDS[@]}" = 0 || "$line" =~ .*[[:space:]]$ ]]; then - COMP_WORDS+=( '' ) - fi - COMP_CWORD="${#COMP_WORDS[@]}" - (( COMP_CWORD-- )) - - if [[ ${#COMP_WORDS[@]} -gt 1 ]]; then - _fzf_bash_completion_expand_alias "${COMP_WORDS[0]}" - fi - COMP_LINE="${COMP_WORDS[*]}" - COMP_POINT="${#COMP_LINE}" - - local cmd="${COMP_WORDS[0]}" - local prev - if [ "$COMP_CWORD" = 0 ]; then - prev= - else - prev="${COMP_WORDS[COMP_CWORD-1]}" - fi - local cur="${COMP_WORDS[COMP_CWORD]}" - - local COMPREPLY= - fzf_bash_completer "$cmd" "$cur" "$prev" - if [ -n "$COMPREPLY" ]; then - if [ -n "$cur" ]; then - line="${line::-${#cur}}" - fi - READLINE_LINE="${line}${COMPREPLY}${READLINE_LINE:$READLINE_POINT}" - (( READLINE_POINT+=${#COMPREPLY} - ${#cur} )) - fi - - printf '\r' - command tput el 2>/dev/null || echo -ne "\033[K" -} - -_fzf_bash_completion_selector() { - FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse $FZF_DEFAULT_OPTS $FZF_COMPLETION_OPTS" \ - $(__fzfcmd 2>/dev/null || echo fzf) -1 -0 --prompt "> $line" --nth 2 -d "$_FZF_COMPLETION_SEP" \ - | tr -d "$_FZF_COMPLETION_SEP" -} - -_fzf_bash_completion_expand_alias() { - if alias "$1" &>/dev/null; then - value=( ${BASH_ALIASES[$1]} ) - if [ -n "${value[*]}" -a "${value[0]}" != "$1" ]; then - COMP_WORDS=( "${value[@]}" "${COMP_WORDS[@]:1}" ) - COMP_CWORD="$(( COMP_CWORD + ${#value[@]} - 1 ))" - fi - fi -} - -_fzf_bash_completion_get_results() { - local trigger="${FZF_COMPLETION_TRIGGER-**}" - if [[ "$2" =~ .*\$(\{?)([A-Za-z0-9_]*)$ ]]; then - # environment variables - local brace="${BASH_REMATCH[1]}" - local filter="${BASH_REMATCH[2]}" - if [ -n "$filter" ]; then - local prefix="${2:: -${#filter}}" - else - local prefix="$2" - fi - compgen -v -P "$prefix" -S "${brace:+\}}" -- "$filter" - elif [ "$COMP_CWORD" == 0 ]; then - # commands - printf '%s\n' compl_filenames=1 >&"${__evaled}" - compgen -abc -- "$2" | _fzf_bash_completion_dir_marker - elif [[ "$2" == *"$trigger" ]]; then - # replicate fzf ** trigger completion - local suffix="${2##*/}" - local prefix="${2::${#2}-${#suffix}}" - suffix="${suffix::${#suffix}-${#trigger}}" - - local flags=() - if [[ "$1" =~ cd|pushd|rmdir ]]; then - flags=( -type d ) - fi - - if [[ ! "$prefix" =~ (.?/).* ]]; then - prefix="./$prefix" - elif [ "${prefix::2}" = '~/' ]; then - prefix="${HOME}/${prefix:2}" - fi - - # smart case - if [ "${suffix,,}" = "${suffix}" ]; then - flags+=( -ipath "$prefix$suffix*" ) - else - flags+=( -path "$prefix$suffix*" ) - fi - - printf '%s\n' compl_filenames=1 >&"${__evaled}" - find -L "$prefix" -mindepth 1 "${flags[@]}" \( -type d -printf "%p/\n" , -type f -print \) 2>/dev/null | "$_fzf_bash_completion_sed" 's,^\./,,' - else - _fzf_bash_completion_complete "$@" - fi -} - -fzf_bash_completer() { - local value code - local compl_bashdefault compl_default compl_dirnames compl_filenames compl_noquote compl_nosort compl_nospace compl_plusdirs - - # preload completions in top shell - { complete -p -- "$1" || __load_completion "$1"; } &>/dev/null - - eval "$( - set -o pipefail - - # hack: hijack compopt - compopt() { _fzf_bash_completion_compopt "$@"; } - - local __unquoted="${2#[\"\']}" - exec {__evaled}>&1 - coproc ( - ( - _fzf_bash_completion_get_results "$@" - while (( $? == 124 )); do - _fzf_bash_completion_get_results "$@" - done - ) | _fzf_bash_completion_unbuffered_awk '$0!="" && !x[$0]++' '$0 = substr($0, 1, len) sep substr($0, len+1)' -vlen="${#__unquoted}" -vsep="$_FZF_COMPLETION_SEP" - ) - value="$(_fzf_bash_completion_selector "$1" "$__unquoted" "$3" <&"${COPROC[0]}")" - code="$?" - - printf 'COMPREPLY=%q\n' "$value" - printf 'code=%q\n' "$code" - kill 0 - )" - - if [ "$code" = 0 ]; then - readarray -t COMPREPLY < <( - if [ "$compl_noquote" != 1 -a "$compl_filenames" = 1 ]; then - while IFS= read -r line; do - if [ "$line" = "$2" ]; then - printf '%s\n' "$line" - # never quote the prefix - elif [ "${line::${#2}}" = "$2" ]; then - printf '%s%q\n' "$2" "${line:${#2}}" - elif [ "${line::1}" = '~' ]; then - printf '~%q\n' "${line:1}" - else - printf '%q\n' "$line" - fi - done - else - cat - fi <<<"$COMPREPLY" - ) - COMPREPLY="${COMPREPLY[*]}" - [ "$compl_nospace" != 1 ] && COMPREPLY="$COMPREPLY " - [[ "$compl_filenames" == *1* ]] && COMPREPLY="${COMPREPLY/%\/ //}" - fi -} - -_fzf_bash_completion_complete() { - local compgen_actions=() - local compspec="$(_fzf_bash_completion_compspec "$1" 2>/dev/null)" - - eval "compspec=( $compspec )" - set -- "${compspec[@]}" "$@" - shift - while [ "$#" -gt 4 ]; do - case "$1" in - -F) - local compl_function="$2" - shift ;; - -C) - local compl_command="$2" - shift ;; - -G) - local compl_globpat="$2" - shift ;; - -W) - local compl_wordlist="$2" - shift ;; - -X) - local compl_xfilter="$2" - shift ;; - -o) - _fzf_bash_completion_compopt -o "$2" - shift ;; - -A) - local compgen_opts+=( "$1" "$2" ) - shift ;; - -P) - local compl_prefix="$(_fzf_bash_completion_awk_escape "$2")" - shift ;; - -S) - local compl_suffix="$(_fzf_bash_completion_awk_escape "$2")" - shift ;; - -[a-z]) - compgen_actions+=( "$1" ) - ;; - esac - shift - done - shift - - COMPREPLY=() - if [ -n "$compl_function" ]; then - "$compl_function" "$@" >/dev/null - if [ "$?" = 124 ]; then - local newcompspec="$(_fzf_bash_completion_compspec "$1" 2>/dev/null)" - if [ "$newcompspec" != "$compspec" ]; then - return 124 - fi - "$compl_function" "$@" >/dev/null - fi - fi - - compl_filenames="${compl_filenames}${compl_plusdirs}${compl_dirnames}" - if [[ "$compl_filenames" == *1* ]]; then - local dir_marker=_fzf_bash_completion_dir_marker - else - local dir_marker=cat - fi - - printf 'compl_filenames=%q\n' "$compl_filenames" >&"${__evaled}" - printf 'compl_noquote=%q\n' "$compl_noquote" >&"${__evaled}" - printf 'compl_nospace=%q\n' "$compl_nospace" >&"${__evaled}" - - ( - ( - if [ -n "${compgen_actions[*]}" ]; then - compgen "${compgen_opts[@]}" -- "$2" - fi - - if [ -n "$compl_globpat" ]; then - printf %s\\n "$compl_globpat" - fi - - if [ -n "$compl_wordlist" ]; then - eval "printf '%s\\n' $compl_wordlist" - fi - - if [ -n "${COMPREPLY[*]}" ]; then - printf %s\\n "${COMPREPLY[@]}" - fi - - if [ -n "$compl_command" ]; then - ( - unset COMP_WORDS COMP_CWORD - export COMP_LINE="$COMP_LINE" COMP_POINT="$COMP_POINT" COMP_KEY="$COMP_KEY" COMP_TYPE="$COMP_TYPE" - eval "$compl_command" - ) - fi - - printf '%s\n' - ) | _fzf_bash_completion_apply_xfilter "$compl_xfilter" \ - | _fzf_bash_completion_unbuffered_awk '$0!=""' 'sub(find, replace)' -vfind='.*' -vreplace="$(printf %s "$compl_prefix" | "$_fzf_bash_completion_sed" 's/[&\]/\\&/g')&$(printf %s "$compl_suffix" | "$_fzf_bash_completion_sed" 's/[&\]/\\&/g')" \ - | if IFS= read -r line; then - printf '%s\n' "$line"; cat - else - local compgen_opts=() - [ "$compl_bashdefault" = 1 ] && compgen_opts+=( -o bashdefault ) - [ "$compl_default" = 1 ] && compgen_opts+=( -o default ) - [ "$compl_dirnames" = 1 ] && compgen_opts+=( -o dirnames ) - if [ -n "${compgen_opts[*]}" ]; then - compgen "${compgen_opts[@]}" -- "$2" - fi - fi - - if [ "$compl_plusdirs" = 1 ]; then - compgen -o dirnames -- "$2" - fi - ) \ - | _fzf_bash_completion_unbuffered_awk '' 'sub(find, replace)' -vfind="^$(_fzf_bash_completion_awk_escape "$2")" -vreplace="$("$_fzf_bash_completion_sed" -r 's/\\(.)/\1/g; s/[&\]/\\&/g' <<<"$2")" \ - | "$dir_marker" -} - -_fzf_bash_completion_apply_xfilter() { - if [ -z "$1" ]; then - cat - return - fi - - local pattern line word="$cur" - word="${word//\//\\/}" - word="${word//&/\\&}" - # replace any unescaped & with the word being completed - pattern="$("$_fzf_bash_completion_sed" 's/\(\(^\|[^\]\)\(\\\\\)*\)&/\1'"$word"'/g' <<<"${1:1}")" - - if [ "${1::1}" = ! ]; then - while IFS= read -r line; do [[ "$line" == $pattern ]] && printf '%s\n' "$line"; done - elif [ -n "$1" ]; then - while IFS= read -r line; do [[ "$line" != $pattern ]] && printf '%s\n' "$line"; done - fi -} - -_fzf_bash_completion_dir_marker() { - local line - while IFS= read -r line; do - # adapted from __expand_tilde_by_ref - if [[ "$line" == \~* ]]; then - eval "$(printf expanded=~%q "${line:1}")" - fi - [ -d "${expanded-"$line"}" ] && line="$line/" - printf '%s\n' "$line" - done -} - -_fzf_bash_completion_compopt() { - while [ "$#" -gt 0 ]; do - local val - if [ "$1" = -o ]; then - val=1 - elif [ "$1" = +o ]; then - val=0 - else - break - fi - - if [[ "$2" =~ bashdefault|default|dirnames|filenames|noquote|nosort|nospace|plusdirs ]]; then - eval "compl_$2=$val" - fi - shift 2 - done -} diff --git a/scripts/.scripts/gamma.sh b/scripts/.scripts/gamma.sh deleted file mode 100755 index 0117dd5..0000000 --- a/scripts/.scripts/gamma.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/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 deleted file mode 100644 index 87b1754..0000000 --- a/scripts/.scripts/kaomoji +++ /dev/null @@ -1,362 +0,0 @@ -^_^ 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 deleted file mode 100755 index 01820fb..0000000 --- a/scripts/.scripts/lock +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -i3lock-fancy -p -t '' diff --git a/scripts/.scripts/looking-glass-start.sh b/scripts/.scripts/looking-glass-start.sh deleted file mode 100755 index 7616fd1..0000000 --- a/scripts/.scripts/looking-glass-start.sh +++ /dev/null @@ -1,3 +0,0 @@ -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 deleted file mode 100755 index 58c5b9a..0000000 --- a/scripts/.scripts/max_input_volume.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/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 deleted file mode 100755 index d6121a1..0000000 --- a/scripts/.scripts/memeselector +++ /dev/null @@ -1,6 +0,0 @@ -#!/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 deleted file mode 100755 index 0e6fddc..0000000 --- a/scripts/.scripts/mpc_picker +++ /dev/null @@ -1,4 +0,0 @@ -#!/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 deleted file mode 100755 index 3cd1967..0000000 --- a/scripts/.scripts/muted_input_volume.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/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 deleted file mode 100755 index 1409bb1..0000000 --- a/scripts/.scripts/normal_input_volume.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/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 deleted file mode 100755 index 5fdcf27..0000000 --- a/scripts/.scripts/notepad +++ /dev/null @@ -1,3 +0,0 @@ -#!/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 deleted file mode 100755 index 49b8f3e..0000000 --- a/scripts/.scripts/powermenu +++ /dev/null @@ -1,2 +0,0 @@ -#!/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 deleted file mode 100755 index 6ea7f72..0000000 --- a/scripts/.scripts/reddit-scrape +++ /dev/null @@ -1,43 +0,0 @@ -#!/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 deleted file mode 100755 index 0bf16bc..0000000 --- a/scripts/.scripts/revive-chrome-gpu +++ /dev/null @@ -1,16 +0,0 @@ -#!/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 deleted file mode 100755 index 23a4557..0000000 --- a/scripts/.scripts/screenrecord +++ /dev/null @@ -1,3 +0,0 @@ -#!/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 deleted file mode 100755 index 3aa7f47..0000000 --- a/scripts/.scripts/screenshot +++ /dev/null @@ -1,4 +0,0 @@ -#!/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 deleted file mode 100755 index 29e8303..0000000 --- a/scripts/.scripts/screenshot_floating +++ /dev/null @@ -1,9 +0,0 @@ - #!/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 deleted file mode 100755 index 827eb9f..0000000 --- a/scripts/.scripts/screenshot_fs +++ /dev/null @@ -1,4 +0,0 @@ -#!/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 deleted file mode 100755 index 29e2791..0000000 --- a/scripts/.scripts/start-mpd +++ /dev/null @@ -1,3 +0,0 @@ -#!/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 deleted file mode 100755 index 6347779..0000000 --- a/scripts/.scripts/sync-phone +++ /dev/null @@ -1,9 +0,0 @@ -#!/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 deleted file mode 100755 index 6702ace..0000000 --- a/scripts/.scripts/tablet +++ /dev/null @@ -1,61 +0,0 @@ -#!/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 deleted file mode 100755 index d1eef2d..0000000 --- a/scripts/.scripts/toggle-gap.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/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 deleted file mode 100755 index b49f339..0000000 --- a/scripts/.scripts/toggle-size-hints.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/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 deleted file mode 100755 index e0018e3..0000000 --- a/scripts/.scripts/vfetch +++ /dev/null @@ -1,288 +0,0 @@ -#!/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 deleted file mode 100755 index 996ddc3..0000000 --- a/scripts/.scripts/websearch +++ /dev/null @@ -1,14 +0,0 @@ -#!/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