From ff3d4fb592f01ff5707d750ecc50f4e3881ef696 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Mon, 15 Jul 2024 10:05:55 -0500 Subject: [PATCH] removing old non used scripts --- .config/ags/battery.js | 4 +- .config/ags/notifications.js | 2 +- home/home.nix | 5 +- scripts/autorun.sh | 12 -- scripts/bar.sh | 9 - scripts/batcurrent | 7 - scripts/batget | 4 - scripts/batinfo | 13 -- scripts/bleh | 0 scripts/disk | 5 - scripts/doppler | 206 -------------------- scripts/eww.sh | 27 --- scripts/fehbg | 2 - scripts/fileusage | 2 +- scripts/fm6000 | 345 --------------------------------- scripts/focus_window.sh | 14 -- scripts/getplayerstatus | 2 - scripts/kde-fflof | 2 - scripts/kde-list-windows.js | 4 - scripts/kde-list-windows.py | 37 ---- scripts/kdenlivelof | 36 ---- scripts/kderofi-rbw | 100 ---------- scripts/kdewindows | 18 -- scripts/laptopdet | 7 - scripts/latte-restart | 4 - scripts/libinput-gestures | 2 - scripts/lightget | 5 - scripts/linux-run | 6 - scripts/mpl | 27 --- scripts/muunread-plasma-diy.sh | 16 -- scripts/muunread-plasma.10m.sh | 6 - scripts/nyxtlof | 37 ---- 32 files changed, 8 insertions(+), 958 deletions(-) delete mode 100755 scripts/autorun.sh delete mode 100755 scripts/bar.sh delete mode 100755 scripts/batcurrent delete mode 100755 scripts/batget delete mode 100755 scripts/batinfo delete mode 100644 scripts/bleh delete mode 100755 scripts/disk delete mode 100755 scripts/doppler delete mode 100755 scripts/eww.sh delete mode 100755 scripts/fehbg delete mode 100755 scripts/fm6000 delete mode 100755 scripts/focus_window.sh delete mode 100755 scripts/getplayerstatus delete mode 100755 scripts/kde-fflof delete mode 100644 scripts/kde-list-windows.js delete mode 100755 scripts/kde-list-windows.py delete mode 100755 scripts/kdenlivelof delete mode 100755 scripts/kderofi-rbw delete mode 100755 scripts/kdewindows delete mode 100755 scripts/laptopdet delete mode 100755 scripts/latte-restart delete mode 100755 scripts/libinput-gestures delete mode 100755 scripts/lightget delete mode 100755 scripts/linux-run delete mode 100755 scripts/mpl delete mode 100755 scripts/muunread-plasma-diy.sh delete mode 100755 scripts/muunread-plasma.10m.sh delete mode 100755 scripts/nyxtlof diff --git a/.config/ags/battery.js b/.config/ags/battery.js index 53858d5..a003a20 100644 --- a/.config/ags/battery.js +++ b/.config/ags/battery.js @@ -4,14 +4,14 @@ const battery = await Service.import("battery"); const laptop = Utils.exec(`hostname`) === "syl"; export function BatteryPopup(monitor = laptop ? 0 : 2) { - const battery_state = battery.bind("percent"); + const battery_percent = battery.bind("percent"); return Widget.Window({ monitor, name: `battery${monitor}`, class_name: "battery-popup", anchor: [laptop ? "bottom" : "top"], css: "margin-right: 30px", - visible: battery_state.as(p => p < 25 ? true : false), + visible: battery_percent.as(p => p < 25 ? battery.bind("charging").as(c => c == true ? true : false) : false), child: Widget.Box({ // css: "padding: .8em", children: [ diff --git a/.config/ags/notifications.js b/.config/ags/notifications.js index 75cd3ca..c0a05fb 100644 --- a/.config/ags/notifications.js +++ b/.config/ags/notifications.js @@ -40,7 +40,7 @@ function Notification(n) { justification: "left", hexpand: true, max_width_chars: 24, - truncate: "end", + // truncate: "end", wrap: true, label: n.summary, use_markup: true, diff --git a/home/home.nix b/home/home.nix index 54bc0e8..59e0542 100644 --- a/home/home.nix +++ b/home/home.nix @@ -1068,7 +1068,7 @@ end padding.y = 10; dynamic_padding = true; }; - shell.program = "fish"; + shell.program = "nu"; font = { normal = { family = "VictorMono Nerd Font"; @@ -1134,6 +1134,9 @@ end ''; cmd_duration = { format = "๏ƒง $duration"; + min_time = 0; + show_notifications = true; + min_time_to_notify = 20000; }; time = { format = "| $time"; diff --git a/scripts/autorun.sh b/scripts/autorun.sh deleted file mode 100755 index 2068e03..0000000 --- a/scripts/autorun.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -# export QT_QPA_PLATFORMTHEME='qt5ct' - -function run { - if ! pgrep -f $1 ; - then - $@& - fi -} - -run jellyfin-mpv-shim diff --git a/scripts/bar.sh b/scripts/bar.sh deleted file mode 100755 index a4b144c..0000000 --- a/scripts/bar.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -wb=$(pgrep waybar) - -if [[ "$wb" -gt 1 ]]; then - kill $wb -else - exec waybar & -fi diff --git a/scripts/batcurrent b/scripts/batcurrent deleted file mode 100755 index e9374fe..0000000 --- a/scripts/batcurrent +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env sh - -echo - | awk "{printf \"%.1f\", \ -$(( \ - $(cat /sys/class/power_supply/BAT1/current_now) * \ - $(cat /sys/class/power_supply/BAT1/voltage_now) \ -)) / 1000000000000 }" ; echo " W " diff --git a/scripts/batget b/scripts/batget deleted file mode 100755 index 5f54c1b..0000000 --- a/scripts/batget +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -awesome-client "naughty.destroy_all_notifications()" -notify-send "$(batinfo)" --icon=battery diff --git a/scripts/batinfo b/scripts/batinfo deleted file mode 100755 index c5f277b..0000000 --- a/scripts/batinfo +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -awesome-client "naughty.destroy_all_notifications()" -capacity=$(cat /sys/class/power_supply/BAT1/capacity) -status=$(cat /sys/class/power_supply/BAT1/status) - -if [ $status = 'Charging' ]; then - icon='๏–…' -else - icon='๏•ธ' -fi - -echo $icon $capacity diff --git a/scripts/bleh b/scripts/bleh deleted file mode 100644 index e69de29..0000000 diff --git a/scripts/disk b/scripts/disk deleted file mode 100755 index cdd638a..0000000 --- a/scripts/disk +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -disk_usage=$(df -h | rg /dev/nvme0n1p2 | awk '{print $4}' | head -n 1) - -echo "$disk_usage " diff --git a/scripts/doppler b/scripts/doppler deleted file mode 100755 index 0e1edff..0000000 --- a/scripts/doppler +++ /dev/null @@ -1,206 +0,0 @@ -#!/bin/sh - -# Show a Doppler RADAR of an American user's preferred location. - -secs=600 # Download a new doppler radar if one hasn't been downloaded in $secs seconds. -radarloc="${XDG_CACHE_HOME:-$HOME/.cache}/radar" -doppler="${XDG_CACHE_HOME:-$HOME/.cache}/doppler.gif" - -pickloc() { chosen="$(echo "Northeast -Southeast -PacNorthWest -PacSouthWest -UpperMissVly -SouthMissVly -SouthPlains -NorthRockies -SouthRockies -Alaska -Carib -Hawaii -CentGrLakes -Conus-Large -KABR: Aberdeen, SD -KBIS: Bismarck, ND -KFTG: Denver/Boulder, CO -KDMX: Des Moines, IA -KDTX: Detroit, MI -KDDC: Dodge City, KS -KDLH: Duluth, MN -KCYS: Cheyenne, WY -KLOT: Chicago, IL -KGLD: Goodland, KS -KUEX: Hastings, NE -KGJX: Grand Junction, CO -KGRR: Grand Rapids, MI -KMVX: Fargo/Grand Forks, ND -KGRB: Green Bay, WI -KIND: Indianapolis, IN -KJKL: Jackson, KY -KARX: La Crosse, WI -KILX: Lincoln/Central Illinois, IL -KLVX: Louisville, KY -KMQT: Marquette -KMKX: Milwaukee, WI -KMPX: Minneapolis, MN -KAPX: Gaylord/Alpena, MI -KLNX: North Platte, NE -KIWX: N. Webster/Northern, IN -KOAX: Omaha, NE -KPAH: Paducah, KY -KEAX: Pleasant Hill, MO -KPUX: Pueblo, CO -KDVN: Quad Cities, IA -KUDX: Rapid City, SD -KRIW: Riverton, WY -KSGF: Springfield, MO -KLSX: St. LOUIS, MO -KFSD: Sioux Falls, IA -KTWX: Topeka, KS -KICT: Wichita, KS -KVWX: Paducah, KY -ICAO: Responsible Wfo -KLTX: WILMINGTON, NC -KCCX: State College/Central, PA -KLWX: Sterling, VA -KFCX: Blacksburg/Roanoke, VA -KRAX: Raleigh/Durham, NC -KGYX: Portland, ME -KDIX: Mt Holly/Philadelphia, PA -KPBZ: Pittsburgh, PA -KAKQ: Wakefield, VA -KMHX: Morehead City, NC -KGSP: Greer/Greenville/Sprtbg, SC -KILN: Wilmington/Cincinnati, OH -KCLE: Cleveland, OH -KCAE: Columbia, SC -KBGM: Binghamton, NY -KENX: Albany, NY -KBUF: Buffalo, NY -KCXX: Burlington, VT -KCBW: Caribou, ME -KBOX: Boston /Taunton, MA -KOKX: New York City, NY -KCLX: Charleston, SC -KRLX: Charleston, WV -ICAO: Responsible WFO -KBRO: Brownsville, TX -KABX: Albuquerque, NM -KAMA: Amarillo, TX -KFFC: Peachtree City/Atlanta, GA -KEWX: Austin/Sanantonio, TX -KBMX: Birmingham, AL -KCRP: Corpus Christi, TX -KFWS: Dallas / Ft. Worth, TX -KEPZ: El Paso, TX -KHGX: Houston/ Galveston, TX -KJAX: Jacksonville, FL -KBYX: Key West, FL -KMRX: Morristown/knoxville, TN -KLBB: Lubbock, TX -KLZK: Little Rock, AR -KLCH: Lake Charles, LA -KOHX: Nashville, TN -KMLB: Melbourne, FL -KNQA: Memphis, TN -KAMX: Miami, FL -KMAF: Midland/odessa, TX -KTLX: Norman, OK -KHTX: Huntsville, AL -KMOB: Mobile, AL -KTLH: Tallahassee, FL -KTBW: Tampa Bay Area, FL -KSJT: San Angelo, TX -KINX: Tulsa, OK -KSRX: Tulsa, OK -KLIX: New Orleans/slidell, LA -KDGX: Jackson, MS -KSHV: Shreveport, LA -ICAO: Responsible WFO -KLGX: Seattle / Tacoma, WA -KOTX: Spokane, WA -KEMX: Tucson, AZ -KYUX: Phoenix, AZ -KNKX: San Diego, CA -KMUX: Monterey/san Francisco, CA -KHNX: San Joaquin/hanford, CA -KSOX: San Diego, CA -KATX: Seattle / Tacoma, WA -KIWA: Phoenix, AZ -KRTX: Portland, OR -KSFX: Pocatello, ID -KRGX: Reno, NV -KDAX: Sacramento, CA -KMTX: Salt Lake City, UT -KPDT: Pendleton, OR -KMSX: Missoula, MT -KESX: Las Vegas, NV -KVTX: Los Angeles, CA -KMAX: Medford, OR -KFSX: Flagstaff, AZ -KGGW: Glasgow, MT -KLRX: Elko, NV -KBHX: Eureka, CA -KTFX: Great Falls, MT -KCBX: Boise, ID -KBLX: Billings, MT -KICX: Salt Lake City, UT -ICAO: Responsible Wfo W/ MSCF -PABC: Anchorage, AK -PAPD: Fairbanks, AK -PHKM: Honolulu, HI -PAHG: Anchorage, AK -PAKC: Anchorage, AK -PAIH: Anchorage, AK -PHMO: Honolulu, HI -PAEC: Fairbanks, AK -TJUA: San Juan, PR -PACG: Juneau, AK -PHKI: Honolulu, HI -PHWA: Honolulu, HI -ICAO: Responsible Wfo W/ MSCF -KFDR: Norman, OK -PGUA: Guam -KBBX: Sacramento, CA -KFDX: Albuquerque, NM -KGWX: Jackson, MS -KDOX: Wakefield, VA -KDYX: San Angelo, TX -KEYX: Las Vegas, NV -KEVX: Mobile, AL -KHPX: Paducah, KY -KTYX: Burlington, VT -KGRK: Dallas / Ft. Worth, TX -KPOE: Lake Charles, LA -KEOX: Tallahassee, FL -KHDX: El Paso, TX -KDFX: San Antonio, TX -KMXX: Birmingham, AL -KMBX: Bismarck, ND -KVAX: Jacksonville, FL -KJGX: Peachtree City/atlanta, GA -KVNX: Norman, OK -KVBX: Vandenberg Afb: Orcutt, CA" | dmenu -r -i -l 50 -p "Select a National Weather Service radar to use as default:" | sed "s/:.*//" | tr "[:lower:]" "[:upper:]")" - -# Sanity check of selection and ensure user did not escape. -echo "$chosen" | grep -q "^[A-Z]\+$" && echo "$chosen" > "$radarloc" ;} - -getdoppler() { - loc="$(cat "$radarloc")" - notify-send "๐ŸŒฆ๏ธ Doppler RADAR" "Pulling most recent Doppler RADAR for $loc." - curl -sL "https://radar.weather.gov/ridge/lite/${loc}_loop.gif" > "$doppler" ;} - -showdoppler() { setsid -f mpv --no-osc --loop=inf --no-terminal "$doppler" ;} - -case $BLOCK_BUTTON in - 1) [ ! -f "$radarloc" ] && pickloc && getdoppler - [ $(($(date '+%s') - $(stat -c %Y "$doppler"))) -gt "$secs" ] && getdoppler - showdoppler ;; - 2) pickloc && getdoppler && showdoppler ;; - 3) notify-send "๐Ÿ—บ๏ธ Doppler RADAR module" "\- Left click for local Doppler RADAR. -- Middle click to update change RADAR location. -After $secs seconds, new clicks will also automatically update the doppler RADAR." ;; - 6) "$TERMINAL" -e "$EDITOR" "$0" ;; -esac - -echo ๐Ÿ—บ๏ธ \ No newline at end of file diff --git a/scripts/eww.sh b/scripts/eww.sh deleted file mode 100755 index 2c71bcd..0000000 --- a/scripts/eww.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -string=$(eww windows) -windows=($string) -host=$(hostname) - - -for i in "${windows[@]}" -do - if [[ "$host" = kaladin ]]; then - if [[ $i = '*bar1' ]]; then - eww close bar1 - return - else - eww open bar1 - fi - else - if [[ $i = '*bar0' ]]; then - eww close bar0 - return - else - eww open bar0 - fi - fi -done - - diff --git a/scripts/fehbg b/scripts/fehbg deleted file mode 100755 index eba0373..0000000 --- a/scripts/fehbg +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -feh --no-fehbg --bg-fill '/home/chris/Pictures/wallpapers/RoyalKing.png' diff --git a/scripts/fileusage b/scripts/fileusage index ef96ac5..ad79a70 100755 --- a/scripts/fileusage +++ b/scripts/fileusage @@ -1,4 +1,4 @@ -#!/usr/bin/sh +#!/bin/sh exec 3>&2 diff --git a/scripts/fm6000 b/scripts/fm6000 deleted file mode 100755 index bec67c5..0000000 --- a/scripts/fm6000 +++ /dev/null @@ -1,345 +0,0 @@ -#!/usr/bin/env perl - -# Dilbert themed system info fetch tool -# https://github.com/anhsirk0/fetch-master-6000 - -use strict; -use Term::ANSIColor; -use Getopt::Long; - -my $length = 13; -my $gap = 3; -my $margin = 2; -my $color = 'yellow'; - -my $wally; -my $dogbert; -my $alice; -my $phb; -my $asok; -my $help; -my $not_de; -my $random; - -my @colors = ( - 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', - 'bright_red', 'bright_green', 'bright_yellow', - 'bright_blue', 'bright_magenta', 'bright_cyan', 'bright_white' -); - -sub get_os { - my $os = `lsb_release -sd`; - # for BSD - unless ($os) { $os = `uname -s`; } - for($os){ - s/"//; - s/ .*//; - s/"//; - chomp; - } - return $os; -} - -sub get_de { - my $de = $ENV{XDG_CURRENT_DESKTOP}; - unless ($de) { $de = $ENV{XDG_SESSION_DESKTOP} }; - unless ($de) { $de = $ENV{DESKTOP_SESSION} }; - # return $de; - return "awesome"; -} - -sub shell { - # return (split '/', $ENV{SHELL})[-1]; - return "fish"; -} - -sub kernel { - my $ke = `uname -r`; - $ke =~ s/-.*//; - chomp $ke; - return $ke -} - -sub packages { - # for arch based - my $pacs = `pacman -Q`; - # for debian based - unless ($pacs) { $pacs = `dpkg-query -f '\n' -W`; } - # for fedora - unless ($pacs) { $pacs = `yum list installed`; } - # for BSD - unless ($pacs) { $pacs = `pkg info`; } - - my $count = $pacs =~ tr/\n//; - return $count; -} - -sub uptime { - my $time = `uptime`; - for($time) { - s/.*up\s+//; - s/,\s+[0-9]+ user.*//; - s/ //g; - s/,/:/g; - s/[a-z]+//g; - chomp - } - - my @time = reverse(split ":", $time); - if (scalar @time == 2) { - $time[0] =~ s/^0//; # remove starting '0' (01 -> 1) - $time = $time[1]. "h, " . $time[0] . "m"; - } elsif (scalar @time == 3) { - $time[0] =~ s/^0//; # remove starting '0' (01 -> 1) - $time = $time[2]. "d, " . $time[1]. "h, " . $time[0] . "m"; - } else { - $time .= "m"; - } - return $time; -} - -# today's internet usage via vnstat -sub usage { - my $data = `vnstat`; - my $today; - foreach my $line (split '\n', $data) { - if ($line =~ /today/) { - $today = (split '\|', $line)[2]; - $today =~ s/^ *//; - } - } - return $today; -} - -sub format_info { - my %info = %{(shift)}; - # format => "MARGIN PLACEHOLDER GAP NAME" - my $text = ' ' x $margin . colored($info{'placeholder'}, $info{'color'}); - $text .= ' ' x (7 + $gap - length $info{'placeholder'}); - $text .= $info{'name'} . ' ' x ($length - length $info{'name'}); - return $text; -} - -sub get_info { - my $os = get_os(); - my $ke = kernel(); - my $de = get_de(); - my $sh = shell(); - my $up = uptime(); - my $pac = packages(); - my $de_placeholder = 'DE'; - my $vnstat = '-1'; - my $usg; - - GetOptions ( - "help" => \$help, - "os=s" => \$os, - "kernel=s" => \$ke, - "de=s" => \$de, - "shell=s" => \$sh, - "uptime=s" => \$up, - "packages=i" => \$pac, - "margin=i" => \$margin, - "length=i" => \$length, - "gap=i" => \$gap, - "color=s" => \$color, - "not_de" => \$not_de, - "vnstat:s" => \$vnstat, - "wally" => \$wally, - "dogbert" => \$dogbert, - "alice" => \$alice, - "phb" => \$phb, - "asok" => \$asok, - "random" => \$random, - ); - - if ($help) { - print_help(); - exit; - } - - if ($not_de) { - $de_placeholder = 'WM'; - } - - if ($vnstat eq '') { - $vnstat = usage(); - } - - if ($color eq "random") { - $color = @colors[int(rand scalar @colors)]; - } - - my %usg = ( - 'placeholder' => 'VNSTAT', - 'color' => 'magenta', - 'name' => $vnstat - ); - - my %os = ( - 'placeholder' => 'OS', - 'color' => 'bright_green', - 'name' => $os, - ); - - my %ke = ( - 'placeholder' => 'KERNEL', - 'color' => 'blue', - 'name' => $ke, - ); - - my %de = ( - 'placeholder' => $de_placeholder, - 'color' => 'bright_red', - 'name' => $de, - ); - - my %sh = ( - 'placeholder' => 'SHELL', - 'color' => 'yellow', - 'name' => $sh, - ); - - my %up = ( - 'placeholder' => 'UPTIME', - 'color' => 'bright_magenta', - 'name' => $up, - ); - - my %pac = ( - 'placeholder' => 'PACKAGE', - 'color' => 'cyan', - 'name' => $pac, - ); - - $os = format_info(\%os); - $ke = format_info(\%ke); - $de = format_info(\%de); - $sh = format_info(\%sh); - $up = format_info(\%up); - $pac = format_info(\%pac); - $usg = format_info(\%usg); - - my $i = 0; - my @info; - $info[$i++] = ' ' x ($length + $gap + 7 + $margin); - $info[$i++] = $os; - if ($vnstat eq '-1' ) { $info[$i++] = $ke; } - $info[$i++] = $de; - $info[$i++] = $sh; - $info[$i++] = $up; - $info[$i++] = $pac; - unless ($vnstat eq '-1' ) { $info[$i++] = $usg; } - $info[$i++] = ' ' x ($length + $gap + 7 + $margin); - - return @info; -} - -sub main { - my @info = get_info(); - if ($random) { - my @arr = map { 0 } (1..6); - $arr[int rand(6)] = 1; - ($wally, $dogbert, $alice, $phb, $asok) = splice @arr, 0, 4; - } - - my $text = "\n"; - if ($wally) { - $text .= colored(q{ โ•ญ} . 'โ”€' x ($length + $margin + $gap + 7) . 'โ•ฎ', $color) . "\n"; - $text .= colored(q{ .-'''-. โ”‚}, $color) . $info[0] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ | | โ”‚}, $color) . $info[1] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ โชœ|---_---|โช› โ•ญโ”‚}, $color) . $info[2] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ ฯพ|__(_)__|ฯฟ โ”‚โ”‚}, $color) . $info[3] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ | _ | โ”‚โ”‚}, $color) . $info[4] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ | | โ•ฏโ”‚}, $color) . $info[5] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ ห====โ—‹====หŽ โ”‚}, $color) . $info[6] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ / \ โ”‚}, $color) . $info[7] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ โ•ฐ} . 'โ”€' x ($length + $margin + $gap + 7) . 'โ•ฏ', $color) . "\n"; - } elsif ($dogbert) { - $text .= colored(q{ โ•ญ} . 'โ”€' x ($length + $margin + $gap + 7) . 'โ•ฎ', $color) . "\n"; - $text .= colored(q{ โ”‚}, $color) . $info[0] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ .-----. โ”‚}, $color) . $info[1] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ .` `. โ•ญโ”‚}, $color) . $info[2] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ / /-() ()-\ \ โ”‚โ”‚}, $color) . $info[3] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ \_| โ—‹ |_/ โ”‚โ”‚}, $color) . $info[4] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ '. .' โ•ฏโ”‚}, $color) . $info[5] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ `-._.-' โ”‚}, $color) . $info[6] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ โ”‚}, $color) . $info[7] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ โ•ฐ} . 'โ”€' x ($length + $margin + $gap + 7) . 'โ•ฏ', $color) . "\n"; - } elsif ($alice) { - $text .= colored(q{ ..-.. โ•ญ} . 'โ”€' x ($length + $margin + $gap + 7) . 'โ•ฎ', $color) . "\n"; - $text .= colored(q{ (~ ~) โ”‚}, $color) . $info[0] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ ( ) โ”‚}, $color) . $info[1] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ ( ~~~~~~~ ) โ•ญโ”‚}, $color) . $info[2] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ ( | . . | ) โ”‚โ”‚}, $color) . $info[3] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ ( | (_) | ) โ”‚โ”‚}, $color) . $info[4] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ ( | | ) โ•ฏโ”‚}, $color) . $info[5] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ (.,.,.| === |.,.,.) โ”‚}, $color) . $info[6] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ '.___.' โ”‚}, $color) . $info[7] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ / \ โ•ฐ} . 'โ”€' x ($length + $margin + $gap + 7) . 'โ•ฏ', $color) . "\n"; - } elsif ($phb) { - $text .= colored(q{ @ @ โ•ญ} . 'โ”€' x ($length + $margin + $gap + 7) . 'โ•ฎ', $color) . "\n"; - $text .= colored(q{ @@ ..-.. @@ โ”‚}, $color) . $info[0] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ @@@' _ _ '@@@ โ”‚}, $color) . $info[1] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ @( . . )@ โ•ญโ”‚}, $color) . $info[2] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ | (_) | โ”‚โ”‚}, $color) . $info[3] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ | _ | โ”‚โ”‚}, $color) . $info[4] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ |_ _| โ•ฏโ”‚}, $color) . $info[5] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ /|_'---'_|\ โ”‚}, $color) . $info[6] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ / | '\_/' | \ โ”‚}, $color) . $info[7] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{/ | | | | \ โ•ฐ} . 'โ”€' x ($length + $margin + $gap + 7) . 'โ•ฏ', $color) . "\n"; - } elsif ($asok) { - $text .= colored(q{ โ•ญ} . 'โ”€' x ($length + $margin + $gap + 7) . 'โ•ฎ', $color) . "\n"; - $text .= colored(q{ @@@@@@@@@ โ”‚}, $color) . $info[0] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ | | โ”‚}, $color) . $info[1] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ | _ _ | โ•ญโ”‚}, $color) . $info[2] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ ฯพ| โ—‹ โ—‹ |ฯฟ โ”‚โ”‚}, $color) . $info[3] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ | u | โ”‚โ”‚}, $color) . $info[4] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ | --- | โ•ฏโ”‚}, $color) . $info[5] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ / `-._.-ยด \ โ”‚}, $color) . $info[6] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ | โ”‚}, $color) . $info[7] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ โ•ฐ} . 'โ”€' x ($length + $margin + $gap + 7) . 'โ•ฏ', $color) . "\n"; - } else { - $text .= colored(q{ โ•ญ} . 'โ”€' x ($length + $margin + $gap + 7) . 'โ•ฎ', $color) . "\n"; - $text .= colored(q{ แƒ“แƒแƒแƒแƒแƒแƒ“ โ”‚}, $color) . $info[0] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ | | โ”‚}, $color) . $info[1] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ | | โ•ญโ”‚}, $color) . $info[2] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ |-แฑ› แฑ›-| โ”‚โ”‚}, $color) . $info[3] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ ฯพ โˆช ฯฟ โ”‚โ”‚}, $color) . $info[4] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ | | โ•ฏโ”‚}, $color) . $info[5] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ ห`-.ล.-ยดหŽ โ”‚}, $color) . $info[6] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ @ โ”‚}, $color) . $info[7] . colored('โ”‚', $color) . "\n"; - $text .= colored(q{ @ โ•ฐ} . 'โ”€' x ($length + $margin + $gap + 7) . 'โ•ฏ', $color) . "\n"; - } - - $text .= "\n"; - print $text; -} - -sub print_help { - print "usage: fm6000 [options]\n\n"; - print "-c, --color=STR Base color\n"; - print "-w, --wally Display Wally \n"; - print "-dog, --dogbert Display Dogbert \n"; - print "-al, --alice Display Alice \n"; - print "-phb, --phb Display Pointy haired Boss \n"; - print "-as, --asok Display Asok \n"; - print "-r, --random Display Random Art \n"; - print "-n, --not_de To use 'WM' instead of 'DE'\n"; - print "-o, --os=STR OS name\n"; - print "-k or --kernel=STR Kernel version\n"; - print "-de or --de=STR Desktop environment name\n"; - print "-s or --shell=STR Shell name\n"; - print "-u or --uptime=STR Uptime\n"; - print "-pa or --package=INT Number of packages\n"; - print "-v or --vnstat=STR Use vnstat instead of kernel\n"; - print "-m or --margin=INT Spaces on the left side of info\n"; - print "-g or --gap=INT Spaces between info and info_value\n"; - print "-l or --length=INT Length of the board ( > 14)\n\n"; - print "available colors: \n"; - print join(", ", splice(@colors, 0, 7)) . ", random\n"; - print join(", ", @colors) . "\n"; -} - -main(); - diff --git a/scripts/focus_window.sh b/scripts/focus_window.sh deleted file mode 100755 index 886f7ec..0000000 --- a/scripts/focus_window.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -eval $(xdotool getmouselocation --shell) - -if [ "$1" -eq "1" ]; then - xdotool mousemove 900 $Y -elif [ "$1" -eq "2" ]; then - xdotool mousemove 2560 $Y -elif [ "$1" -eq "3" ]; then - if [ $Y -gt 700 ]; then - Y=700 - fi - xdotool mousemove 4000 $Y -fi diff --git a/scripts/getplayerstatus b/scripts/getplayerstatus deleted file mode 100755 index 6a04721..0000000 --- a/scripts/getplayerstatus +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -notify-send "$(playerctl metadata xesam:title)" diff --git a/scripts/kde-fflof b/scripts/kde-fflof deleted file mode 100755 index f3289a2..0000000 --- a/scripts/kde-fflof +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env bash -ww -fa firefox -c firefox diff --git a/scripts/kde-list-windows.js b/scripts/kde-list-windows.js deleted file mode 100644 index cd59656..0000000 --- a/scripts/kde-list-windows.js +++ /dev/null @@ -1,4 +0,0 @@ -const clients = workspace.clientList(); -for (var i = 0; i < clients.length; i++) { - print(clients[i].caption); -}; diff --git a/scripts/kde-list-windows.py b/scripts/kde-list-windows.py deleted file mode 100755 index 8c3744c..0000000 --- a/scripts/kde-list-windows.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python - -# Author: Andrew Shark - -# This script lists windows in kwin on wayland. It is useful, because wmctrl does not work on wayland. -# I read journalctl because printing in kwin script is currently broken. See https://bugs.kde.org/show_bug.cgi?id=445058 -# https://unix.stackexchange.com/questions/706477/is-there-a-way-to-get-list-of-windows-on-kde-wayland - described this script here. - -import subprocess -from datetime import datetime - - -def get_list_of_windows(): - datetime_now = datetime.now() - - script = "/home/chris/.dotfiles/scripts/kde-list-windows.js" - - reg_script_number = subprocess.run("dbus-send --print-reply --dest=org.kde.KWin \ - /Scripting org.kde.kwin.Scripting.loadScript \ - string:" + script + " | awk 'END {print $2}'", - capture_output=True, shell=True).stdout.decode().split("\n")[0] - - subprocess.run("dbus-send --print-reply --dest=org.kde.KWin /" + reg_script_number + " org.kde.kwin.Script.run", - shell=True, stdout=subprocess.DEVNULL) - subprocess.run("dbus-send --print-reply --dest=org.kde.KWin /" + reg_script_number + " org.kde.kwin.Script.stop", - shell=True, stdout=subprocess.DEVNULL) # unregister number - - since = str(datetime_now) - - msg = subprocess.run("journalctl _COMM=kwin_wayland -o cat --since \"" + since + "\"", - capture_output=True, shell=True).stdout.decode().rstrip().split("\n") - msg = [el.lstrip("js: ") for el in msg] - - return msg - - -print('\n'.join(get_list_of_windows())) diff --git a/scripts/kdenlivelof b/scripts/kdenlivelof deleted file mode 100755 index 376a743..0000000 --- a/scripts/kdenlivelof +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - -# Check to see if an kdenlive is running -if [ $(pgrep -c kdenlive) -gt 0 ]; then - - if [ "$XDG_SESSION_TYPE" = "x11" ]; then - #X11 - kdenliverg=$(wmctrl -lx | rg kdenlive.kdenlive | rg -v org-agenda | awk '{print $1}') - # echo $kdenliverg - - if [ -z $kdenliverg ]; then - exec kdenlive & - exit - else - exec wmctrl -ia $kdenliverg - exit - fi - else - if [ "$KDE_FULL_SESSION" = "true" ]; then - exec /home/chris/bin/ww -fa Kdenlive -c kdenlive - exit - else - # WAYLAND - # kdenliverg=$(wlrctl window list | rg -v 'kdenlive:\sorg-agenda' | rg 'kdenlive:') - - # kdenlivewin=$(echo $kdenliverg | sed 's/.*\: //') - # echo $kdenlivewin - - exec hyprctl dispatch focuswindow kdenlive - exit - fi - fi - -else - exec kdenlive & -fi diff --git a/scripts/kderofi-rbw b/scripts/kderofi-rbw deleted file mode 100755 index 3c03710..0000000 --- a/scripts/kderofi-rbw +++ /dev/null @@ -1,100 +0,0 @@ -#!/usr/bin/env bash -# Very basic interface for rbw using rofi -if [ $(hostname) = "syl" ]; then - if [ $XDG_SESSION_TYPE = "x11" ]; then - style="laptop-rbw" - echo "this is x11" - else - style="laptop-wayland" - echo "this is wayland" - fi -else - style="desktop-rbw" - #echo "this is not hidpi" -fi - -export YDOTOOL_SOCKET=/tmp/ydotools - -# Get all password files and create an array -root=~/.password-store -CACHE=~/.local/tmp/pass_wofi -seat=seat0 - -rbw sync - -list_passwords() { - rbw list -} - -passwords=$list_passwords - -prompt='BW' -if [ $XDG_SESSION_TYPE = "x11" ]; then - SECRET=$(list_passwords | wofi -i --prompt="${prompt}" --dmenu --cache-file ${CACHE} - # $@ & - # c=0 - # while ! xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $(xdotool search -class 'rofi') ; do - # sleep .1 - # c=$((c+1)) - # [[ c = 50 ]] && exit; # stop script window didn't appear after 5 seconds - # done - ) -else - SECRET=$(list_passwords | wofi -i --prompt="${prompt}" --dmenu --cache-file ${CACHE}) -fi - -# Ask whether pass, user or both are required -options=("Password" \ - "User" \ - "User and password" \ - "QR-Code" \ - "OTP") - -if [ $XDG_SESSION_TYPE = "x11" ]; then - option=$(printf '%s\n' "${options[@]%}" | wofi -i --dmenu --width 400 --prompt="..." --cache-file /dev/null - # $@ & - # c=0 - # while ! xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $(xdotool search -class 'rofi') ; do - # sleep .1 - # c=$((c+1)) - # [[ c = 50 ]] && exit; # stop script window didn't appear after 5 seconds - # done - ) -else - option=$(printf '%s\n' "${options[@]%}" | wofi -i --dmenu --width 400 --lines 8 --prompt="..." --cache-file /dev/null) -fi - -# echo $option - -case ${option} in - Password ) - echo "${SECRET}" - ydotool type --key-delay 0ms $(rbw get "${SECRET}") - ;; - User ) - echo "$(rbw get --full "${SECRET}" | rg Username: | awk '{print $2}')" - ydotool type --key-delay 0ms "$(rbw get --full "${SECRET}" | rg Username: | awk '{print $2}')" - ;; - "User and password" ) - ydotool type --key-delay 0ms $(rbw get --full "${SECRET}" | rg Username: | awk '{print $2}') - ydotool key 15:1 15:0 - ydotool type --key-delay 0ms $(rbw get "${SECRET}") - ;; - "QR-Code" ) - if [[ $SECRET =~ wifi$ ]]; then - # Produce a valid wifi QR-code - WIFISSID=$(pass get_user "${SECRET}") - WIFIPASS=$(pass get_pass "${SECRET}") - WIFIQR="WIFI:T:WPA;S:${WIFISSID};P:${WIFIPASS};;" - qrencode -s 8 -o - $WIFIQR | feh --title "pass: QR-WIFI" - - else - # Only password - pass show -q1 ${SECRET} - fi - ;; - OTP ) - ydotool type --key-delay 0ms $(rbw code "${SECRET}") - ;; -esac - -# wl-copy -o -s ${seat} ${PASSWD_PASS} diff --git a/scripts/kdewindows b/scripts/kdewindows deleted file mode 100755 index f2b2440..0000000 --- a/scripts/kdewindows +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash - -script="/home/chris/.dotfiles/scripts/kde-list-windows.js" - -num=$(dbus-send --print-reply --dest=org.kde.KWin \ - /Scripting org.kde.kwin.Scripting.loadScript \ - string:"$script" | awk 'END {print $2}' ) - -echo $num - -wins=$(dbus-send --print-reply --dest=org.kde.KWin /$num \ - org.kde.kwin.Script.run | sed 's/p/p/') - -echo $wins -# I'm not sure if some delay is in order here to let your script complete? -sleep 1 -dbus-send --print-reply --dest=org.kde.KWin /$num \ - org.kde.kwin.Script.stop diff --git a/scripts/laptopdet b/scripts/laptopdet deleted file mode 100755 index a7237c9..0000000 --- a/scripts/laptopdet +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/fish -#detect whether running on laptop or not -if hostname = "syl" - echo true - else - echo false - diff --git a/scripts/latte-restart b/scripts/latte-restart deleted file mode 100755 index 7a8f384..0000000 --- a/scripts/latte-restart +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -killall mako -killall latte-dock -latte-dock & diff --git a/scripts/libinput-gestures b/scripts/libinput-gestures deleted file mode 100755 index 9807f9a..0000000 --- a/scripts/libinput-gestures +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -libinput-gestures & diff --git a/scripts/lightget b/scripts/lightget deleted file mode 100755 index 0ecbdef..0000000 --- a/scripts/lightget +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -awesome-client "naughty.destroy_all_notifications()" - -notify-send "$(light -G)" --icon=display-brightness diff --git a/scripts/linux-run b/scripts/linux-run deleted file mode 100755 index cf9f4fe..0000000 --- a/scripts/linux-run +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -export LD_LIBRARY_PATH=$LIBRARY_PATH -RUNNER=$(find ~/.guix-profile/lib/ -name 'ld-linux-*.so*') - -$RUNNER "$@" diff --git a/scripts/mpl b/scripts/mpl deleted file mode 100755 index 251739d..0000000 --- a/scripts/mpl +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env -S sbcl --script -(require "uiop") -(load "/home/chris/.sbclrc") -(ql:quickload :serapeum) - -(defvar *url* (car (uiop:command-line-arguments))) - -;; (uiop:println *url*) -;; (uiop:println (type-of *url*)) - -(defun main () - (if (serapeum:string-contains-p "inv.cochrun.xyz" *url*) - (run-program "mpv" - `("--ontop" - "--keepaspect-window" - ,(serapeum:string-replace-all - "inv.cochrun.xyz" *url* "youtube.com")) - :search "/run/current-system/sw/bin/" - :output t) - (run-program "mpv" - `("--ontop" - "--keepaspect-window" - ,(string *url*)) - :search "/run/current-system/sw/bin/" - :output t))) - - (main) diff --git a/scripts/muunread-plasma-diy.sh b/scripts/muunread-plasma-diy.sh deleted file mode 100755 index 46d8001..0000000 --- a/scripts/muunread-plasma-diy.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -ID=$1 - -while true -do - COMMAND="emacsclient -c -e (mu4e)" - - muunread="$(mu find flag:unread AND NOT flag:trashed AND NOT maildir:\"/outlook/Junk\" AND NOT maildir:\"/office/Junk Email\" AND NOT maildir:\"/outlook/Deleted\" AND NOT maildir:\"/office/Deleted Items\" | wc -l)" - - DATA="| A | ๏›ญ $muunread | |$COMMAND |" - qdbus org.kde.plasma.doityourselfbar /id_$ID \ - org.kde.plasma.doityourselfbar.pass "$DATA" - - sleep 60s -done diff --git a/scripts/muunread-plasma.10m.sh b/scripts/muunread-plasma.10m.sh deleted file mode 100755 index 0876a51..0000000 --- a/scripts/muunread-plasma.10m.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env sh -muunread="$(mu find flag:unread AND NOT flag:trashed AND NOT maildir:\"/outlook/Junk\" AND NOT maildir:\"/office/Junk Email\" AND NOT maildir:\"/outlook/Deleted\" AND NOT maildir:\"/office/Deleted Items\" AND NOT maildir:\"/office/Archive\" AND NOT maildir:\"/outlook/Archive\" AND NOT maildir:\"/cochrun/Archive\" | wc -l)" - -# echo "๏›ญ $muunread " -echo "๏›ญ $muunread | color=#f3f99d font='VictorMono Nerd Font' size=11 iconname=mail-message" -# echo "๏›ญ $muunread | color=#AF8700 font='VictorMono Nerd Font' size=11" diff --git a/scripts/nyxtlof b/scripts/nyxtlof deleted file mode 100755 index 79fd84c..0000000 --- a/scripts/nyxtlof +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash - -# Check to see if nyxt is running -if [ $(pgrep -c nyxt) -gt 0 ]; then - echo "ff running" - - if [ "$XDG_SESSION_TYPE" = "x11" ]; then - #X11 - ffrg=$(wmctrl -lx | rg nyxt | awk '{print $1}') - # echo $emacsrg - - if [ -z $ffrg ]; then - exec nyxt - exit - else - exec wmctrl -ia $ffrg - exit - fi - else - if [ "$KDE_FULL_SESSION" = "true" ]; then - echo "KDE" - exec /home/chris/bin/ww -fa nyxt -c nyxt - exit - else - # WAYLAND - ffrg=$(hyprctl clients | rg nyxt) - - ffwin=$(echo $ffrg | sed 's/.*\: //') - # echo $ffwin - - exec hyprctl dispatch focuswindow nyxt - exit - fi - fi -else - exec nyxt -fi