From b30de47c0d2f374d6e24ef313fb407140fee4895 Mon Sep 17 00:00:00 2001 From: Ahurac Date: Wed, 17 Apr 2024 12:03:25 +0200 Subject: [PATCH] Supperssion : scripts shel inutiles --- bin/batstat | 11 ---------- bin/find-impostors | 2 -- bin/wolf | 53 ---------------------------------------------- 3 files changed, 66 deletions(-) delete mode 100755 bin/batstat delete mode 100755 bin/find-impostors delete mode 100755 bin/wolf diff --git a/bin/batstat b/bin/batstat deleted file mode 100755 index 09b6d5c..0000000 --- a/bin/batstat +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env sh -set -e - -battery_capacity=$(cat "/sys/class/power_supply/${1}/capacity") - -if [ "$battery_capacity" -lt 25 ]; then echo critical -elif [ "$battery_capacity" -lt 50 ]; then echo low -elif [ "$battery_capacity" -lt 75 ]; then echo medium -elif [ "$battery_capacity" -lt 100 ]; then echo high -else echo full -fi diff --git a/bin/find-impostors b/bin/find-impostors deleted file mode 100755 index df51eeb..0000000 --- a/bin/find-impostors +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec hyprctl clients -j | jq '.[] | select(.xwayland == true) | .class' diff --git a/bin/wolf b/bin/wolf deleted file mode 100755 index 1cea48e..0000000 --- a/bin/wolf +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash - -# Arguments -hostname="$1"; shift - -# Variables -declare mac -declare -a wol_com options -name="$(basename "$0")" -wolf_d="${HOME}/.wolf" -wolf_host="${wolf_d}/${hostname}" - -# Functions -# Throw an error -function error { - >&2 echo -e "${name}: \033[1;31mERROR:\033[0m ${1:-No further details}"; shift - exit "${1:-1}" -} - -# Parse variable in options file -function getvar { - grep '^'"$1"' ' "$wolf_host" | cut -d ' ' -f 2 -} - -# Parsing -[[ -f $wolf_host ]] || error "\"${hostname}\": No such host" - -# Assign the options -mac="$(getvar Mac)" -ip="$(getvar IP)" -port="$(getvar Port)" - -# Add options if necessary -[[ -n $ip ]] && options+=(-i "$ip" ) -[[ -n $port ]] && options+=(-p "$port") - -# Commands building -# wol -wol_com=( - wol - "$@" - "${options[@]}" - "$mac" -) - -# Debug -#echo "${wol_com[@]}" -#exit 0 - -# Execution -set -xe -"${wol_com[@]}" -