rice

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 4180c4ea778470bcc3b6d796ad48f58de1b8ccee
parent f450c9f6014e925a5a37b2f0952b9557f6d595f1
Author: Mark Feller <mark.feller@member.fsf.org>
Date:   Thu, 26 Sep 2019 11:22:01 -0600

added more scripts

Diffstat:
Adots/.local/bin/aura | 27+++++++++++++++++++++++++++
Adots/.local/bin/power-status | 5+++++
Adots/.local/bin/wifi-conn | 24++++++++++++++++++++++++
3 files changed, 56 insertions(+), 0 deletions(-)

diff --git a/dots/.local/bin/aura b/dots/.local/bin/aura @@ -0,0 +1,27 @@ +#!/bin/sh + +gry="\e[30m" +red="\e[31m" +grn="\e[32m" +ylw="\e[33m" +blu="\e[34m" +prp="\e[35m" +cyn="\e[36m" +wht="\e[37m" +rst="\e[0m" + +# fetch some general info +source /etc/os-release +distro="$NAME $VERSION_ID" +kernel=`uname -r | sed 's/-.*//'` +pkgs=`dnf list --installed | wc -l` + +echo +echo -e " distro $distro" +echo -e " kernel $kernel" +echo -e " packages $pkgs" +echo -e " shell zsh" +echo -e " wm i3" +echo +echo -e " ${gry}▼ ${red}▲ ${grn}▼ ${ylw}▲ ${cyn}▼ ${blu}▲ ${prp}▼ ${wht}▲" +echo diff --git a/dots/.local/bin/power-status b/dots/.local/bin/power-status @@ -0,0 +1,5 @@ +#!/bin/sh + +status=`upower -i $(upower -e | grep BAT) | grep --color=never -E "state|to\ full|to\ empty|percentage" | sed "s/: */: /" | sed "s/^ *//"` + +notify-send "Power" "$status" diff --git a/dots/.local/bin/wifi-conn b/dots/.local/bin/wifi-conn @@ -0,0 +1,24 @@ +#!/bin/sh + +# chose a network +network=`nmcli -f SSID dev wifi list | tail -n +2 | sort -u | grep -v '\-\-' | sed 's/ *$//' | rofi -dmenu` +pass=`rofi -password -p 'Password' -dmenu -show window` + +# connect to network +msg=`nmcli device wifi connect $network password $pass 2>&1` + +# interpret the results +case "$msg" in + *failed*) + notify-send -u critical "WiFi" "Failed to connect to $network" + ;; + *No\ network\ with\ SSID*) + notify-send -u critical "WiFi" "Could not find network with SSID '$network'" + ;; + *missing*) + notify-send -u critical "WiFi" "Password not provided" + ;; + *) + notify-send "wifi" "Successfully connected to '$network'" + ;; +esac