scripts

various scripts and utils
git clone git://kh1b.org/scripts
Log | Files | Refs

commit 90aff83fb7a509e7a6665f61936b3df5ac419cfe
Author: bazizi khaled <contact@kh1b.org>
Date:   Sat, 14 Dec 2024 17:19:50 +0100

Initial commit

Diffstat:
Abattery | 24++++++++++++++++++++++++
Acpfile | 2++
Acpscreen | 2++
3 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/battery b/battery @@ -0,0 +1,23 @@ +#!/bin/sh +# +# + +status () { + cat /sys/class/power_supply/BAT?/status +} + +level () { + BAT=`cat /sys/class/power_supply/BAT?/capacity` + echo "${BAT}%" +} + +usage () { + echo "usage: $(basename $0) [-hs]" +} + + +case $1 in + -s) status ;; + -h) usage ;; + *) level ;; +esac +\ No newline at end of file diff --git a/cpfile b/cpfile @@ -0,0 +1,2 @@ +#!/bin/sh +cat $1 | xclip -selection clipboard diff --git a/cpscreen b/cpscreen @@ -0,0 +1,2 @@ +#!/bin/sh +xscreenshot | ff2png | xclip -selection clipboard -t image/png