diff options
| author | 2021-10-19 13:52:44 +0000 | |
|---|---|---|
| committer | 2021-10-19 13:52:44 +0000 | |
| commit | 47caa0929b2bf1a109f4bd27031bb08e2286b907 (patch) | |
| tree | 75dbace98cd46b4e22083dc4f0e2c5da8bc98501 | |
| parent | 90a406f6aaab40f43ffd84ff6e70e7b74103ba3c (diff) | |
Removidos scripts obsoletos/inúteis, alterado nome do mic_check e alterado alias xkb
| -rw-r--r-- | .gitignore | 1 | ||||
| -rwxr-xr-x | bin/battery_check | 20 | ||||
| -rwxr-xr-x | bin/bspHide | 13 | ||||
| -rwxr-xr-x | bin/bspswallow | 53 | ||||
| -rwxr-xr-x | bin/connect_wlan | 13 | ||||
| -rwxr-xr-x | bin/frame_spawn | 18 | ||||
| -rwxr-xr-x | bin/mic_toggle (renamed from bin/mic_check) | 0 | ||||
| -rwxr-xr-x | bin/mpd_scroll | 12 | ||||
| -rwxr-xr-x | bin/pkgs | 10 | ||||
| -rwxr-xr-x | bin/pomodoro | 10 | ||||
| -rwxr-xr-x | bin/print_tags | 29 | ||||
| -rwxr-xr-x | bin/sound_check | 13 | ||||
| -rwxr-xr-x | bin/temp | 2 |
13 files changed, 2 insertions, 192 deletions
@@ -2,3 +2,4 @@ bin/Digital bin/discord bin/chromium bin/sptf +bin/librewolf diff --git a/bin/battery_check b/bin/battery_check deleted file mode 100755 index 5e27913..0000000 --- a/bin/battery_check +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -# Simple script to monitor the battery's status and level - -critical_level=7 - -batt="$1" -state="$2" - -if [[ $batt -ge 99 ]]; then - notify-send -u normal"Bateria" "Completamente carregada! (100%)"; pkill -RTMIN+20 dwmblocks -elif [[ $batt -eq 20 ]] ; then - notify-send -u normal "Bateria descarregando" "Nível de bateria alcançou 20%"; pkill -RTMIN+20 dwmblocks -elif [[ $batt -eq 10 ]] ; then - notify-send -u normal "Bateria descarregando" "Nível de bateria alcançou 10%"; pkill -RTMIN+20 dwmblocks -elif [[ $batt -le "$critical_level" ]]; then - notify-send -u critical "Bateria crítica!" "Nível de bateria alcançou 7%"; pkill -RTMIN+20 dwmblocks -fi - -sleep 50 diff --git a/bin/bspHide b/bin/bspHide deleted file mode 100755 index 30a9abc..0000000 --- a/bin/bspHide +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -# hides focused window -# if there are any hidden windows in the current desktop, \ -# unhide them - -hidden=$(bspc query -N -n .hidden -d focused) - -if [ -z "$hidden" ]; then - bspc node focused -g hidden=on -else - bspc node "$hidden" -g hidden=off -fi diff --git a/bin/bspswallow b/bin/bspswallow deleted file mode 100755 index 35784a2..0000000 --- a/bin/bspswallow +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh - -# Get class of a wid -get_class() { - id=$1 - if [ -z "$id" ]; then - echo "" - else - xprop -id "$id" | sed -n '/WM_CLASS\|WM_COMMAND/s/.*"\(.*\)".*/\1/p' - fi -} - -swallow() { - addedtodesktop=$2 - lasttermdesktop=$(bspc query -D -n last) - - swallowerid=$1 - swallowingid=$(bspc query -N -n last) - - if [ "$addedtodesktop" = "$lasttermdesktop" ]; then - cat ~/.config/bspwm/noswallow ~/.config/bspwm/terminals | grep "^$(get_class "$swallowerid")$" && return - grep "^$(get_class "$swallowingid")$" ~/.config/bspwm/terminals || return - echo "$swallowerid $swallowingid" >> /tmp/swallowids - bspc node "$swallowingid" --flag hidden=on - fi -} - -spit() { - spitterid=$1 - spitterdesktop=$2 - grep "^$spitterid" /tmp/swallowids || return - spittingid=$(grep "^$spitterid" /tmp/swallowids | head -n1 | awk '{print $2}') - - bspc node "$spittingid" --flag hidden=off - - termdesktop=$(bspc query -D -n "$spittingid") - [ "$termdesktop" = "$spitterdesktop" ] || bspc node "$spittingid" -d "$spitterdesktop" - - bspc node "$spittingid" -f - sed -i "/^$spitterid/d" /tmp/swallowids -} - -bspc subscribe node_add node_remove | while read -r event -do - case $(echo "$event" | awk '{ print $1 }') in - node_add) - swallow $(echo "$event" | awk '{print $5 " " $3}') - ;; - node_remove) - spit $(echo "$event" | awk '{print $4 " " $3}') - ;; - esac -done diff --git a/bin/connect_wlan b/bin/connect_wlan deleted file mode 100755 index d3b2f20..0000000 --- a/bin/connect_wlan +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/env bash - -# script to pipe scanned networks to dmenu, using iwd - -station="$(iwctl device list | grep station | awk ' { print $1 } ')" - -#iwctl station "$station" disconnect - -iwctl station "$station" scan - -ssid="$(iwctl station "$station" get-networks | dmenu -l 6 -p "Connect to a network:" | sed -e 's/psk.*$//g' -e 's/^\W*//g' -e 's/\W*$//g')" - -[ -v "$ssid" ] && iwctl station "$station" connect "$ssid"; notify-send 'iwctl' "Connected to network $ssid" diff --git a/bin/frame_spawn b/bin/frame_spawn deleted file mode 100755 index 8aa7612..0000000 --- a/bin/frame_spawn +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -# Based on: -# https://github.com/herbstluftwm/herbstluftwm/issues/1164 - - -# The script compares the number of opened windows in the focused tiling frame, and then compares: -# 1) If the frame is not empty (!= 0), then it wll be split vertically by a ratio of 0.5 \ -# and the application will be opened in the new, empty frame -# 2) If the frame is empty, then the application will simply be spawned on it. - -herbstclient \ - chain \ - , and \ - : compare tags.focus.tiling.focused_frame.client_count != 0 \ - : split auto \ - , rule once index=e focus=on \ - , spawn "$1" diff --git a/bin/mic_check b/bin/mic_toggle index 3ead1fc..3ead1fc 100755 --- a/bin/mic_check +++ b/bin/mic_toggle diff --git a/bin/mpd_scroll b/bin/mpd_scroll deleted file mode 100755 index a0952e7..0000000 --- a/bin/mpd_scroll +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -zscroll --before-text "ﱘ No current song playing" --delay 0.3 \ - --match-command "mpc status" \ - --match-text "playing" "--before-text 'ﱘ '" \ - --match-text "paused" "--before-text ' ' --scroll 0" \ - --newline=true \ - --length=30 \ - --scroll=true \ - --update-check true "mpc current" & - -wait diff --git a/bin/pkgs b/bin/pkgs deleted file mode 100755 index dd39483..0000000 --- a/bin/pkgs +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -# prints the number of current installed packages (pacman-based) -pkgs() { - pkgs="$(pacman -Q | wc -l)" - - printf "%s %d" "" "$pkgs" -} - -pkgs diff --git a/bin/pomodoro b/bin/pomodoro deleted file mode 100755 index fbc49f2..0000000 --- a/bin/pomodoro +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -pomodoro () { - case "$1" in - "iniciar");; - "pausar");; - "parar");; - *) - esac -} diff --git a/bin/print_tags b/bin/print_tags deleted file mode 100755 index a5cd811..0000000 --- a/bin/print_tags +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/env bash - -# prints hlwm's tag names -print_tags() { - for tag in $(herbstclient tag_status); do - name=${tag#?} - state=${tag%$name} - - case "$state" in - '#') - printf '%%{B#656565}%%{F#ffffff}%%{U#e60053} %s %%{U-}%%{F-}%%{B-}' "$name" - ;; - '+') - printf '%%{U#101112}%%{F#ffffff}%%{R} %s %%{R-}%%{U-}%%{F-}' "$name" - ;; - '!') - printf '%%{R} %s! %%{R-}' "$name" - ;; - '.') - printf '%%{U#101112}%%{F#8b8b8b} %s %%{F-}%%{U-}' "$name" - ;; - *) - printf '%%{U#101112} %s %%{U-}' "$name" - esac - done - printf '\n' -} - -print_tags diff --git a/bin/sound_check b/bin/sound_check deleted file mode 100755 index dec0348..0000000 --- a/bin/sound_check +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -# mutes the microphone and send a notification - -# default sink state: 1 if muted, 0 if else -mute="$(pulsemixer --get-mute)" - -[ "$mute" -eq 0 ] && notify-send "Alto-falante" "Mudo" - -[ "$mute" -eq 1 ] && notify-send "Alto-falante" "Som reativado" - -# (un)mutes the speaker -pulsemixer --toggle-mute @@ -1,4 +1,4 @@ -#!/bin/env bash +#!/bin/sh # prints temperature temp() { |
