diff options
| author | krolxon <krolyxon@tutanota.com> | 2025-08-03 21:29:53 +0530 |
|---|---|---|
| committer | krolxon <krolyxon@tutanota.com> | 2025-08-03 21:29:53 +0530 |
| commit | 3718ac5eb3aae770e0b50e44b514c276376f1bcf (patch) | |
| tree | 9db1e5af4964e6b1e03f0ecf79f18a8d9de87491 /.local | |
| parent | 216cf47a22e69ec42ba26118dc92154d5ef95862 (diff) | |
move to hyprland
Diffstat (limited to '.local')
| -rwxr-xr-x | .local/bin/colorpicker | bin | 23168 -> 0 bytes | |||
| -rwxr-xr-x | .local/bin/dmenurecord | 123 | ||||
| -rwxr-xr-x | .local/bin/jrun | 14 | ||||
| -rwxr-xr-x | .local/bin/maimshot | 13 | ||||
| -rwxr-xr-x | .local/bin/pirokit | 68 | ||||
| -rwxr-xr-x | .local/bin/run_alacritty | 8 | ||||
| -rwxr-xr-x | .local/bin/statusbar/sb-battery | 37 | ||||
| -rwxr-xr-x | .local/bin/statusbar/sb-clock | 3 | ||||
| -rwxr-xr-x | .local/bin/statusbar/sb-memory | 4 | ||||
| -rwxr-xr-x | .local/bin/statusbar/sb-mpdup | 8 | ||||
| -rwxr-xr-x | .local/bin/statusbar/sb-music | 11 | ||||
| -rwxr-xr-x | .local/bin/statusbar/sb-updates | 3 | ||||
| -rwxr-xr-x | .local/bin/statusbar/sb-volume | 2 |
13 files changed, 0 insertions, 294 deletions
diff --git a/.local/bin/colorpicker b/.local/bin/colorpicker Binary files differdeleted file mode 100755 index ab19d07..0000000 --- a/.local/bin/colorpicker +++ /dev/null diff --git a/.local/bin/dmenurecord b/.local/bin/dmenurecord deleted file mode 100755 index ca6b011..0000000 --- a/.local/bin/dmenurecord +++ /dev/null @@ -1,123 +0,0 @@ -#!/bin/sh - -# Usage: -# `$0`: Ask for recording type via dmenu -# `$0 screencast`: Record both audio and screen -# `$0 video`: Record only screen -# `$0 audio`: Record only audio -# `$0 kill`: Kill existing recording -# -# If there is already a running instance, user will be prompted to end it. - -getdim() { xrandr | grep -oP '(?<=current ).*(?=,)' | tr -d ' ' ;} - -updateicon() { \ - echo "$1" > /tmp/recordingicon - pkill -RTMIN+9 "${STATUSBAR:-dwmblocks}" - } - -killrecording() { - recpid="$(cat /tmp/recordingpid)" - kill -15 "$recpid" - rm -f /tmp/recordingpid - updateicon "" - pkill -RTMIN+9 "${STATUSBAR:-dwmblocks}" - } - -screencast() { \ - ffmpeg -y \ - -f x11grab \ - -framerate 30 \ - -s "$(getdim)" \ - -i "$DISPLAY" \ - -r 24 \ - -use_wallclock_as_timestamps 1 \ - -f alsa -thread_queue_size 1024 -i default \ - -c:v h264 \ - -crf 0 -preset ultrafast -c:a aac \ - "$HOME/screencast-$(date '+%y%m%d-%H%M-%S').mp4" & - echo $! > /tmp/recordingpid - updateicon "βΊοΈποΈ" - } - -video() { ffmpeg \ - -f x11grab \ - -framerate 30 \ - -s "$(getdim)" \ - -i "$DISPLAY" \ - -c:v libx264 -qp 0 -r 30 \ - "$HOME/video-$(date '+%y%m%d-%H%M-%S').mkv" & - echo $! > /tmp/recordingpid - updateicon "βΊοΈ" - } - -webcamhidef() { ffmpeg \ - -f v4l2 \ - -i /dev/video0 \ - -video_size 1920x1080 \ - "$HOME/webcam-$(date '+%y%m%d-%H%M-%S').mkv" & - echo $! > /tmp/recordingpid - updateicon "π₯" - } - -webcam() { ffmpeg \ - -f v4l2 \ - -i /dev/video0 \ - -video_size 640x480 \ - "$HOME/webcam-$(date '+%y%m%d-%H%M-%S').mkv" & - echo $! > /tmp/recordingpid - updateicon "π₯" - } - - -audio() { \ - ffmpeg \ - -f alsa -i default \ - -c:a flac \ - "$HOME/audio-$(date '+%y%m%d-%H%M-%S').flac" & - echo $! > /tmp/recordingpid - updateicon "ποΈ" - } - -askrecording() { \ - choice=$(printf "screencast\\nvideo\\nvideo selected\\naudio\\nwebcam\\nwebcam (hi-def)" | dmenu -i -p "Select recording style:") - case "$choice" in - screencast) screencast;; - audio) audio;; - video) video;; - *selected) videoselected;; - webcam) webcam;; - "webcam (hi-def)") webcamhidef;; - esac - } - -asktoend() { \ - response=$(printf "No\\nYes" | dmenu -i -p "Recording still active. End recording?") && - [ "$response" = "Yes" ] && killrecording - } - -videoselected() -{ - slop -f "%x %y %w %h" > /tmp/slop - read -r X Y W H < /tmp/slop - rm /tmp/slop - - ffmpeg \ - -f x11grab \ - -framerate 30 \ - -video_size "$W"x"$H" \ - -i :0.0+"$X,$Y" \ - -c:v libx264 -qp 0 -r 30 \ - "$HOME/box-$(date '+%y%m%d-%H%M-%S').mkv" & - echo $! > /tmp/recordingpid - updateicon "βΊοΈ" -} - -case "$1" in - screencast) screencast;; - audio) audio;; - video) video;; - *selected) videoselected;; - kill) killrecording;; - *) ([ -f /tmp/recordingpid ] && asktoend && exit) || askrecording;; -esac diff --git a/.local/bin/jrun b/.local/bin/jrun deleted file mode 100755 index 8445dd3..0000000 --- a/.local/bin/jrun +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/env bash - -# Script to run simple .java files. -# because its annoying to have .class files clutter your working directory; - -if [ -z $* ]; then - echo "usage: jrun <filename>" -else - filename="${1%.*}" - \cp -f "$1" /tmp/"$1" - javac -d /tmp "$1" - java -cp /tmp "$filename" -fi - diff --git a/.local/bin/maimshot b/.local/bin/maimshot deleted file mode 100755 index db4780c..0000000 --- a/.local/bin/maimshot +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -ocr_cmd="xclip -sel clip" - -case "$(printf "a selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)\\na selected area\\ncurrent window\\nfull screen\\na selected area (OCR)" | dmenu -l 7 -i -p "Screenshot which area?")" in - "a selected area (copy)") maim -u -s | xclip -selection clipboard -t image/png ;; - "current window (copy)") maim -i "$(xdotool getactivewindow)" | xclip -selection clipboard -t image/png ;; - "full screen (copy)") sleep 0.2 ; maim | xclip -selection clipboard -t image/png ;; - "a selected area") maim -u -s ~/pix/ss/pic-selected-$(uuidgen | awk -F- '{printf $2}')-"$(date '+%y-%m-%d').png" ;; - "current window") maim -i "$(xdotool getactivewindow)" ~/pix/ss/pic-window-"$(uuidgen | awk -F- '{printf $2}')-$(date '+%y-%m-%d').png" ;; - "full screen") sleep 0.2 ; maim ~/pix/ss/pic-full-"$(uuidgen | awk -F- '{printf $2}')-$(date '+%y-%m-%d').png" ;; - "a selected area (OCR)") tmpfile=$(mktemp /tmp/ocr-XXXXXX.png) && maim -u -s > "$tmpfile" && tesseract "$tmpfile" - -l eng | ${ocr_cmd} && rm "$tmpfile" ;; -esac diff --git a/.local/bin/pirokit b/.local/bin/pirokit deleted file mode 100755 index 6986780..0000000 --- a/.local/bin/pirokit +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/bash - -mkdir -p $HOME/.cache/pirokit - -if [ -z $1 ]; then - query=$(echo "" | dmenu -p "Search Torrent: ") -else - query=$1 -fi - -baseurl="https://1337x.to" -cachedir="$HOME/.cache/pirokit" -query="$(sed 's/ /+/g' <<<$query)" - -#curl -s https://1337x.to/category-search/$query/Movies/1/ > $cachedir/tmp.html -curl -s https://1337x.to/search/$query/1/ > $cachedir/tmp.html - -# Get Titles -grep -o '<a href="/torrent/.*</a>' $cachedir/tmp.html | - sed 's/<[^>]*>//g' > $cachedir/titles.bw - -result_count=$(wc -l $cachedir/titles.bw | awk '{print $1}') -if [ "$result_count" -lt 1 ]; then - notify-send "π No Result found. Try again π΄" - exit 0 -fi - - -# Seeders and Leechers -grep -o '<td class="coll-2 seeds.*</td>\|<td class="coll-3 leeches.*</td>' $cachedir/tmp.html | - sed 's/<[^>]*>//g' | sed 'N;s/\n/ /' > $cachedir/seedleech.bw - -# Size -grep -o '<td class="coll-4 size.*</td>' $cachedir/tmp.html | - sed 's/<span class="seeds">.*<\/span>//g' | - sed -e 's/<[^>]*>//g' > $cachedir/size.bw - -# Links -grep -E '/torrent/' $cachedir/tmp.html | - sed -E 's#.*(/torrent/.*)/">.*/#\1#' | - sed 's/td>//g' > $cachedir/links.bw - - - -# Clearning up some data to display -sed 's/\./ /g; s/\-/ /g' $cachedir/titles.bw | - sed 's/[^A-Za-z0-9 ]//g' | tr -s " " > $cachedir/tmp && mv $cachedir/tmp $cachedir/titles.bw - -awk '{print NR " - ["$0"]"}' $cachedir/size.bw > $cachedir/tmp && mv $cachedir/tmp $cachedir/size.bw -awk '{print "[S:"$1 ", L:"$2"]" }' $cachedir/seedleech.bw > $cachedir/tmp && mv $cachedir/tmp $cachedir/seedleech.bw - -# Getting the line number -LINE=$(paste -d\ $cachedir/size.bw $cachedir/seedleech.bw $cachedir/titles.bw | - dmenu -i -l 25 | - cut -d\- -f1 | - awk '{$1=$1; print}') - -url=$(head -n $LINE $cachedir/links.bw | tail -n +$LINE) -fullURL="${baseurl}${url}/" - -# Requesting page for magnet link -curl -s $fullURL > $cachedir/tmp.html -magnet=$(grep -Po "magnet:\?xt=urn:btih:[a-zA-Z0-9]*" $cachedir/tmp.html | head -n 1) - -transadd "$magnet" - -# Simple notification -notify-send "β¬οΈ Start downloading File π" diff --git a/.local/bin/run_alacritty b/.local/bin/run_alacritty deleted file mode 100755 index af0ecc2..0000000 --- a/.local/bin/run_alacritty +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/env bash - -mode=$(autorandr --current) -if [[ $mode = 'hybridnew' ]]; then - alacritty --config-file "$XDG_CONFIG_HOME/alacritty/docked.toml" $* -else - alacritty --config-file "$XDG_CONFIG_HOME/alacritty/normal.toml" $* -fi diff --git a/.local/bin/statusbar/sb-battery b/.local/bin/statusbar/sb-battery deleted file mode 100755 index 513cb1e..0000000 --- a/.local/bin/statusbar/sb-battery +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -# Prints all batteries, their percentage remaining and an emoji corresponding -# to charge status (π for plugged up, π for discharging on battery, etc.). - -case $BLOCK_BUTTON in - 3) notify-send "π Battery module" "π: discharging -π: not charging -β»: stagnant charge -π: charging -β‘: charged -β: battery very low! -- Scroll to change adjust xbacklight." ;; - 4) xbacklight -inc 10 ;; - 5) xbacklight -dec 10 ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; -esac - -# Loop through all attached batteries and format the info -for battery in /sys/class/power_supply/BAT?*; do - # If non-first battery, print a space separator. - [ -n "${capacity+x}" ] && printf " " - # Sets up the status and capacity - case "$(cat "$battery/status" 2>&1)" in - "Full") status="β‘" ;; - "Discharging") status="π" ;; - "Charging") status="π" ;; - "Not charging") status="π" ;; - "Unknown") status="β»οΈ" ;; - *) exit 1 ;; - esac - capacity="$(cat "$battery/capacity" 2>&1)" - # Will make a warn variable if discharging and low - [ "$status" = "π" ] && [ "$capacity" -le 25 ] && warn="β" - # Prints the info - printf "[ %s %s%d%% ]" "$status" "$warn" "$capacity"; unset warn -done && printf "\\n" diff --git a/.local/bin/statusbar/sb-clock b/.local/bin/statusbar/sb-clock deleted file mode 100755 index 3a1b2ee..0000000 --- a/.local/bin/statusbar/sb-clock +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -# date "+[ ο³ %a %d %b %Y] [ ο %I:%M %P ]" -date "+[ ο³ %a %d %b %Y] [ ο %R ]" diff --git a/.local/bin/statusbar/sb-memory b/.local/bin/statusbar/sb-memory deleted file mode 100755 index b894ca1..0000000 --- a/.local/bin/statusbar/sb-memory +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -# echo "[ ο $(free --mebi | sed -n '2{p;q}' | awk '{printf ("%2.2fGiB", ( $3 / 1024), ($2 / 1024))}') $(sensors | awk '/Core 0/ {print "ο " $3}') ]" - -echo "[ ο $(free -h --si | sed -n "2s/\([^ ]* *\)\{2\}\([^ ]*\).*/\2/p") ο $(grep -o "^[^ ]*" /proc/loadavg ) ]" diff --git a/.local/bin/statusbar/sb-mpdup b/.local/bin/statusbar/sb-mpdup deleted file mode 100755 index 770d44d..0000000 --- a/.local/bin/statusbar/sb-mpdup +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -# This loop will update the mpd statusbar module whenever a command changes the -# music player's status. mpd must be running on X's start for this to work. - -while : ; do - mpc idle >/dev/null && kill -45 $(pidof dwmblocks) || break -done diff --git a/.local/bin/statusbar/sb-music b/.local/bin/statusbar/sb-music deleted file mode 100755 index 0a8e0ca..0000000 --- a/.local/bin/statusbar/sb-music +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -filter() { mpc | sed "/^volume:/d;s/\\&/&/g;s/\\[paused\\].*/βΈ/g;/\\[playing\\].*/d;/^ERROR/Q" | paste -sd ' ' -;} - -pidof -x sb-mpdup >/dev/null 2>&1 || sb-mpdup >/dev/null 2>&1 & - -if [ -z "$(filter)" ]; then - echo "" -else - echo "[ $(filter) ]" -fi diff --git a/.local/bin/statusbar/sb-updates b/.local/bin/statusbar/sb-updates deleted file mode 100755 index e7683aa..0000000 --- a/.local/bin/statusbar/sb-updates +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -echo "[ σ° $(checkupdates | wc -l) ]" diff --git a/.local/bin/statusbar/sb-volume b/.local/bin/statusbar/sb-volume deleted file mode 100755 index eefed94..0000000 --- a/.local/bin/statusbar/sb-volume +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -echo [ "$([ "$(pamixer --get-mute)" = "false" ] && printf 'ο¨ ' || printf 'ο¦ ')$(pamixer --get-volume)%" ] |
