replace wob with notify-send

remove some unused packages from aur-programs.list
master
Alex 2023-02-27 21:56:22 -06:00
parent f7c17f419c
commit d73a4d5ce1
5 changed files with 10 additions and 72 deletions

View File

@ -7,14 +7,12 @@ pfetch
sysrq-enabler
wlr-randr
sfeed
waylogout-git
ani-cli-git
connman-gtk
lf-sixel-git
autotiling
wob
tofi
shellcheck-bin
librewolf-bin
brave-bin
pipe-viewer-git
lobster

View File

@ -118,7 +118,7 @@ configuration() {
#update repos
sudo pacman -Syu
install meta package which installs most programs used in setup
#install meta package which installs most programs used in setup
CDIR="$PWD"
cd ./ajh-base/
makepkg -si
@ -143,7 +143,7 @@ read input
echo "PWD = $PWD"
echo "installing AUR packages..."
sh ./scripts/aur-install.sh ./files/aur-programs.list
#sh ./scripts/aur-install.sh ./files/aur-programs.list
echo "Done installing AUR packages."
echo ""

View File

@ -26,12 +26,8 @@ if [ -f "$AUR_PROGS_FILE" ]; then
pkg_install
greetd_config
else
greetd_config
echo "enter file containing package names to install separated by newlines as first input argument" && exit
fi

64
mywob
View File

@ -1,64 +1,6 @@
#!/usr/bin/env bash
# https://gitlab.com/wef/dotfiles/-/blob/master/bin/mywob
# shellcheck disable=SC2034
TIME_STAMP="20220627.145053"
#!/bin/sh
# Copyright (C) 2020-2021 Bob Hepple < bob dot hepple at gmail dot com>
if [ "$1" ]; then
notify-send -a "mywob" " " -i I -h int:value:"$1" -h string:synchronous:volume -h string:x-canonical-private-synchronous:anything -t 1000
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
PROG=$( basename "$0" )
wob_pipe=~/.cache/$( basename "$SWAYSOCK" ).wob
case "$1" in
-h|--help)
echo "Usage: $PROG [percent]"
echo
echo "pops up wob; sets up $wob_pipe if necessary "
exit 0
;;
esac
[[ "$SWAYSOCK" ]] || exit 0
# returns 0 (success) if $1 is running and is attached to this sway session; else 1
is_running_on_this_screen() {
pkill -0 "$1" || return 1
for pid in $( pgrep "$1" ); do
WOB_SWAYSOCK="$( tr '\0' '\n' < "/proc/$pid/environ" | awk -F'=' '/^SWAYSOCK/ {print $2}' )"
if [[ "$WOB_SWAYSOCK" == "$SWAYSOCK" ]]; then
return 0
fi
done
return 1
}
new_value=$1 # null or a percent; no checking!!
[[ -p $wob_pipe ]] || mkfifo "$wob_pipe"
# wob does not appear in $(swaymsg -t get_msg), so:
is_running_on_this_screen wob || {
tail -f "$wob_pipe" | wob &
}
# sometimes this hangs - need to use a timeout and restart wob if necessary:
[[ "$new_value" ]] && echo "$new_value" > "$wob_pipe"
# Local Variables:
# mode: shell-script
# time-stamp-pattern: "4/TIME_STAMP=\"%:y%02m%02d.%02H%02M%02S\""
# eval: (add-hook 'before-save-hook 'time-stamp)
# End:

4
vol.sh
View File

@ -8,11 +8,13 @@ refbar() {
display() {
VAL="$(get | sed 's/^.*\.//g' )"
echo "$VAL"
[ -n "$1" ] && VAL="$1"
mywob "$VAL"
#mywob "$VAL"
notify-send -a "volsh" " " -i I -h int:value:"$VAL" -h string:synchronous:volume -h string:x-canonical-private-synchronous:anything -t 1000
}
inc() {