PIX variable fully removed

This commit is contained in:
Luke Smith 2019-03-20 14:45:08 -04:00
parent a0fbd46164
commit c109b22891
7 changed files with 18 additions and 18 deletions

View file

@ -1,9 +1,9 @@
#!/bin/sh #!/bin/sh
# Syncs repositories and downloads updates, meant to be run as a cronjob. # Syncs repositories and downloads updates, meant to be run as a cronjob.
ping -q -w 1 -c 1 `ip r | grep -m 1 default | cut -d ' ' -f 3` >/dev/null || exit ping -q -c 1 1.1.1.1 > /dev/null || exit
notify-send -i "$PIX/larbs.svg" "Checking for package updates..." notify-send "📦 Checking for package updates..."
sudo pacman -Syyuw --noconfirm || notify-send "Error downloading updates. sudo pacman -Syyuw --noconfirm || notify-send "Error downloading updates.
@ -12,7 +12,7 @@ pkill -RTMIN+8 i3blocks
if pacman -Qu | grep -v "\[ignored\]" if pacman -Qu | grep -v "\[ignored\]"
then then
notify-send -i "$PIX/larbs.gif" "Package updates available. Click statusbar icon (📦) for update." notify-send "🎁 Package updates available. Click statusbar icon (📦) for update."
else else
notify-send -i "$PIX/larbs.gif" "Repository sync complete. No new packages for update." notify-send "📦 Repository sync complete. No new packages for update."
fi fi

View file

@ -2,9 +2,9 @@
# Set as a cron job to check for new RSS entries for newsboat. # Set as a cron job to check for new RSS entries for newsboat.
# If newsboat is open, sends it an "R" key to refresh. # If newsboat is open, sends it an "R" key to refresh.
ping -q -t 1 -c 1 `ip r | grep -m 1 default | cut -d ' ' -f 3` >/dev/null || exit ping -q -c 1 1.1.1.1 > /dev/null || exit
/usr/bin/notify-send -i "$PIX/rss.svg" "Updating RSS feeds..." /usr/bin/notify-send "📰 Updating RSS feeds..."
pgrep -x newsboat >/dev/null && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name newsboat)" R && exit pgrep -x newsboat >/dev/null && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name newsboat)" R && exit
@ -13,4 +13,4 @@ pkill -RTMIN+6 i3blocks
/usr/bin/newsboat -x reload /usr/bin/newsboat -x reload
rm -f /tmp/newsupdate rm -f /tmp/newsupdate
pkill -RTMIN+6 i3blocks pkill -RTMIN+6 i3blocks
/usr/bin/notify-send -i "$PIX/rss.svg" "RSS feed update complete." /usr/bin/notify-send "📰 RSS feed update complete."

View file

@ -17,21 +17,21 @@ getmount() { \
mountusb() { \ mountusb() { \
chosen="$(echo "$usbdrives" | dmenu -i -p "Mount which drive?" | awk '{print $1}')" chosen="$(echo "$usbdrives" | dmenu -i -p "Mount which drive?" | awk '{print $1}')"
sudo -A mount "$chosen" && notify-send -i "$PIX/usb.svg" "$chosen mounted." && exit 0 sudo -A mount "$chosen" && notify-send "$chosen mounted." && exit 0
getmount "/mnt /media /mount /home -maxdepth 5 -type d" getmount "/mnt /media /mount /home -maxdepth 5 -type d"
partitiontype="$(lsblk -no "fstype" "$chosen")" partitiontype="$(lsblk -no "fstype" "$chosen")"
case "$partitiontype" in case "$partitiontype" in
"vfat") sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000;; "vfat") sudo -A mount -t vfat "$chosen" "$mp" -o rw,umask=0000;;
*) sudo -A mount "$chosen" "$mp"; user="$(whoami)"; ug="$(groups | awk '{print $1}')"; sudo -A chown "$user":"$ug" 741 "$mp";; *) sudo -A mount "$chosen" "$mp"; user="$(whoami)"; ug="$(groups | awk '{print $1}')"; sudo -A chown "$user":"$ug" 741 "$mp";;
esac esac
notify-send -i "$PIX/usb.svg" "$chosen mounted to $mp." notify-send "$chosen mounted to $mp."
} }
mountandroid() { \ mountandroid() { \
chosen=$(echo "$anddrives" | dmenu -i -p "Which Android device?" | cut -d : -f 1) chosen=$(echo "$anddrives" | dmenu -i -p "Which Android device?" | cut -d : -f 1)
getmount "$HOME -maxdepth 3 -type d" getmount "$HOME -maxdepth 3 -type d"
simple-mtpfs --device "$chosen" "$mp" simple-mtpfs --device "$chosen" "$mp"
notify-send -i "$PIX/android.svg" "Android device mounted to $mp." notify-send "Android device mounted to $mp."
} }
asktype() { \ asktype() { \

View file

@ -7,13 +7,13 @@ unmountusb() {
[ -z "$drives" ] && exit [ -z "$drives" ] && exit
chosen=$(echo "$drives" | dmenu -i -p "Unmount which drive?" | awk '{print $1}') chosen=$(echo "$drives" | dmenu -i -p "Unmount which drive?" | awk '{print $1}')
[ -z "$chosen" ] && exit [ -z "$chosen" ] && exit
sudo -A umount "$chosen" && pgrep -x dunst && notify-send -i "$PIX/usb.svg" "$chosen unmounted." sudo -A umount "$chosen" && pgrep -x dunst && notify-send "$chosen unmounted."
} }
unmountandroid() { \ unmountandroid() { \
chosen=$(awk '/simple-mtpfs/ {print $2}' /etc/mtab | dmenu -i -p "Unmount which device?") chosen=$(awk '/simple-mtpfs/ {print $2}' /etc/mtab | dmenu -i -p "Unmount which device?")
[ -z "$chosen" ] && exit [ -z "$chosen" ] && exit
sudo -A umount -l "$chosen" && pgrep -x dunst && notify-send -i "$PIX/android.svg" "$chosen unmounted." sudo -A umount -l "$chosen" && pgrep -x dunst && notify-send "$chosen unmounted."
} }
asktype() { \ asktype() { \

View file

@ -2,9 +2,9 @@
# If transmission-daemon is running, will ask to kill, else will ask to start. # If transmission-daemon is running, will ask to kill, else will ask to start.
if pgrep -x transmission-da >/dev/null ; if pgrep -x transmission-da >/dev/null ;
then then
[ "$(printf "No\\nYes" | dmenu -i -p "Kill transmission-daemon?")" = "Yes" ] && killall transmission-da && notify-send -i "$PIX/torrent.svg" "transmission-daemon killed." [ "$(printf "No\\nYes" | dmenu -i -p "Kill transmission-daemon?")" = "Yes" ] && killall transmission-da && notify-send "transmission-daemon killed."
else else
ifinstalled transmission-cli || exit ifinstalled transmission-cli || exit
[ "$(printf "No\\nYes" | dmenu -i -p "Start transmission daemon?")" = "Yes" ] && transmission-daemon && notify-send -i "$PIX/torrent.svg" "tranmission-daemon started." [ "$(printf "No\\nYes" | dmenu -i -p "Start transmission daemon?")" = "Yes" ] && transmission-daemon && notify-send "tranmission-daemon started."
fi fi
sleep 3 && pkill -RTMIN+7 i3blocks sleep 3 && pkill -RTMIN+7 i3blocks

View file

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
ifinstalled transmission-remote-cli transmission-cli || exit ifinstalled transmission-remote-cli transmission-cli || exit
! pgrep -x transmission-da >/dev/null && transmission-daemon && notify-send -i "$PIX/torrent.svg" "Starting torrent daemon..." && sleep 3 && pkill -RTMIN+7 i3blocks ! pgrep -x transmission-da >/dev/null && transmission-daemon && notify-send "Starting torrent daemon..." && sleep 3 && pkill -RTMIN+7 i3blocks
$TERMINAL -e transmission-remote-cli $TERMINAL -e transmission-remote-cli

View file

@ -1,9 +1,9 @@
#!/bin/sh #!/bin/sh
! echo "$1" | grep "https*://\S\+\.[A-Za-z]\+\S*" >/dev/null && ! echo "$1" | grep "https*://\S\+\.[A-Za-z]\+\S*" >/dev/null &&
notify-send -i "$PIX/rss.svg" "That doesn't look like a full URL." && exit notify-send "That doesn't look like a full URL." && exit
RSSFILE="$HOME/.config/newsboat/urls" RSSFILE="$HOME/.config/newsboat/urls"
if awk '{print $1}' "$RSSFILE" | grep "^$1$" >/dev/null; then if awk '{print $1}' "$RSSFILE" | grep "^$1$" >/dev/null; then
notify-send -i "$PIX/rss.svg" "You already have this RSS feed." notify-send "You already have this RSS feed."
else else
echo "$1" >> "$RSSFILE" && notify-send -i "$PIX/rss.svg" "RSS feed added." echo "$1" >> "$RSSFILE" && notify-send "RSS feed added."
fi fi