mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-08-09 09:31:14 +10:00
Removing unwanted scripts
This commit is contained in:
@@ -1,4 +0,0 @@
|
|||||||
#! /bin/bash
|
|
||||||
|
|
||||||
dte="$(date +"%a, %B %d %l:%M%p"| sed 's/ / /g')"
|
|
||||||
echo -e "$dte"
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
# Script name: dm-run
|
|
||||||
# Description: The standard dmenu_run command with flags and a prompt.
|
|
||||||
# Dependencies: dmenu
|
|
||||||
# GitLab: https://www.gitlab.com/dwt1/dmscripts
|
|
||||||
# License: https://www.gitlab.com/dwt1/dmscripts/LICENSE
|
|
||||||
# Contributors: Derek Taylor
|
|
||||||
|
|
||||||
# Set with the flags "-e", "-u","-o pipefail" cause the script to fail
|
|
||||||
# if certain things happen, which is a good thing. Otherwise, we can
|
|
||||||
# get hidden bugs that are hard to discover.
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
|
||||||
exec $(dmenu_path | dmenu -l 20 -g 3 -X 0 -Y 0 -W 680 -p 'Run: ' "$@")
|
|
||||||
|
|
||||||
@@ -51,6 +51,10 @@ main() {
|
|||||||
sed -i "s/load-theme '.*/load-theme 'doom-one t)/g" "$HOME"/.config/emacs/config.org || echo "Cannot find config.org."
|
sed -i "s/load-theme '.*/load-theme 'doom-one t)/g" "$HOME"/.config/emacs/config.org || echo "Cannot find config.org."
|
||||||
emacsclient -e "(load-theme 'doom-one t)" || echo "Emacsclient not running."
|
emacsclient -e "(load-theme 'doom-one t)" || echo "Emacsclient not running."
|
||||||
|
|
||||||
|
## DUNST ##
|
||||||
|
killall dunst
|
||||||
|
dunst -conf "$HOME"/.config/dunst/"$choice"
|
||||||
|
|
||||||
;;
|
;;
|
||||||
'dracula')
|
'dracula')
|
||||||
|
|
||||||
@@ -71,6 +75,10 @@ main() {
|
|||||||
sed -i "s/load-theme '.*/load-theme 'doom-dracula t)/g" "$HOME"/.config/emacs/config.org || echo "Cannot find config.org."
|
sed -i "s/load-theme '.*/load-theme 'doom-dracula t)/g" "$HOME"/.config/emacs/config.org || echo "Cannot find config.org."
|
||||||
emacsclient -e "(load-theme 'doom-dracula t)" || echo "Emacsclient not running."
|
emacsclient -e "(load-theme 'doom-dracula t)" || echo "Emacsclient not running."
|
||||||
|
|
||||||
|
## DUNST ##
|
||||||
|
killall dunst
|
||||||
|
dunst -conf "$HOME"/.config/dunst/"$choice"
|
||||||
|
|
||||||
;;
|
;;
|
||||||
'gruvbox-dark')
|
'gruvbox-dark')
|
||||||
|
|
||||||
@@ -91,6 +99,10 @@ main() {
|
|||||||
sed -i "s/load-theme '.*/load-theme 'doom-gruvbox t)/g" "$HOME"/.config/emacs/config.org || echo "Cannot find config.org."
|
sed -i "s/load-theme '.*/load-theme 'doom-gruvbox t)/g" "$HOME"/.config/emacs/config.org || echo "Cannot find config.org."
|
||||||
emacsclient -e "(load-theme 'doom-gruvbox t)" || echo "Emacsclient not running."
|
emacsclient -e "(load-theme 'doom-gruvbox t)" || echo "Emacsclient not running."
|
||||||
|
|
||||||
|
## DUNST ##
|
||||||
|
killall dunst
|
||||||
|
dunst -conf "$HOME"/.config/dunst/"$choice"
|
||||||
|
|
||||||
;;
|
;;
|
||||||
'monokai-pro')
|
'monokai-pro')
|
||||||
|
|
||||||
@@ -111,6 +123,10 @@ main() {
|
|||||||
sed -i "s/load-theme '.*/load-theme 'doom-monokai-pro t)/g" "$HOME"/.config/emacs/config.org || echo "Cannot find config.org."
|
sed -i "s/load-theme '.*/load-theme 'doom-monokai-pro t)/g" "$HOME"/.config/emacs/config.org || echo "Cannot find config.org."
|
||||||
emacsclient -e "(load-theme 'doom-monokai-pro t)" || echo "Emacsclient not running."
|
emacsclient -e "(load-theme 'doom-monokai-pro t)" || echo "Emacsclient not running."
|
||||||
|
|
||||||
|
## DUNST ##
|
||||||
|
killall dunst
|
||||||
|
dunst -conf "$HOME"/.config/dunst/"$choice"
|
||||||
|
|
||||||
;;
|
;;
|
||||||
'nord')
|
'nord')
|
||||||
|
|
||||||
@@ -131,6 +147,10 @@ main() {
|
|||||||
sed -i "s/load-theme '.*/load-theme 'doom-nord t)/g" "$HOME"/.config/emacs/config.org || echo "Cannot find config.org."
|
sed -i "s/load-theme '.*/load-theme 'doom-nord t)/g" "$HOME"/.config/emacs/config.org || echo "Cannot find config.org."
|
||||||
emacsclient -e "(load-theme 'doom-nord t)" || echo "Emacsclient not running."
|
emacsclient -e "(load-theme 'doom-nord t)" || echo "Emacsclient not running."
|
||||||
|
|
||||||
|
## DUNST ##
|
||||||
|
killall dunst
|
||||||
|
dunst -conf "$HOME"/.config/dunst/"$choice"
|
||||||
|
|
||||||
;;
|
;;
|
||||||
'oceanic-next')
|
'oceanic-next')
|
||||||
|
|
||||||
@@ -151,6 +171,10 @@ main() {
|
|||||||
sed -i "s/load-theme '.*/load-theme 'doom-oceanic-next t)/g" "$HOME"/.config/emacs/config.org || echo "Cannot find config.org."
|
sed -i "s/load-theme '.*/load-theme 'doom-oceanic-next t)/g" "$HOME"/.config/emacs/config.org || echo "Cannot find config.org."
|
||||||
emacsclient -e "(load-theme 'doom-oceanic-next t)" || echo "Emacsclient not running."
|
emacsclient -e "(load-theme 'doom-oceanic-next t)" || echo "Emacsclient not running."
|
||||||
|
|
||||||
|
## DUNST ##
|
||||||
|
killall dunst
|
||||||
|
dunst -conf "$HOME"/.config/dunst/"$choice"
|
||||||
|
|
||||||
;;
|
;;
|
||||||
'palenight')
|
'palenight')
|
||||||
|
|
||||||
@@ -171,6 +195,10 @@ main() {
|
|||||||
sed -i "s/load-theme '.*/load-theme 'doom-palenight t)/g" "$HOME"/.config/emacs/config.org || echo "Cannot find config.org."
|
sed -i "s/load-theme '.*/load-theme 'doom-palenight t)/g" "$HOME"/.config/emacs/config.org || echo "Cannot find config.org."
|
||||||
emacsclient -e "(load-theme 'doom-palenight t)" || echo "Emacsclient not running."
|
emacsclient -e "(load-theme 'doom-palenight t)" || echo "Emacsclient not running."
|
||||||
|
|
||||||
|
## DUNST ##
|
||||||
|
killall dunst
|
||||||
|
dunst -conf "$HOME"/.config/dunst/"$choice"
|
||||||
|
|
||||||
;;
|
;;
|
||||||
'solarized-dark')
|
'solarized-dark')
|
||||||
|
|
||||||
@@ -191,6 +219,10 @@ main() {
|
|||||||
sed -i "s/load-theme '.*/load-theme 'doom-solarized-dark t)/g" "$HOME"/.config/emacs/config.org || echo "Cannot find config.org."
|
sed -i "s/load-theme '.*/load-theme 'doom-solarized-dark t)/g" "$HOME"/.config/emacs/config.org || echo "Cannot find config.org."
|
||||||
emacsclient -e "(load-theme 'doom-solarized-dark t)" || echo "Emacsclient not running."
|
emacsclient -e "(load-theme 'doom-solarized-dark t)" || echo "Emacsclient not running."
|
||||||
|
|
||||||
|
## DUNST ##
|
||||||
|
killall dunst
|
||||||
|
dunst -conf "$HOME"/.config/dunst/"$choice"
|
||||||
|
|
||||||
;;
|
;;
|
||||||
'solarized-light')
|
'solarized-light')
|
||||||
|
|
||||||
@@ -211,6 +243,10 @@ main() {
|
|||||||
sed -i "s/load-theme '.*/load-theme 'doom-solarized-light t)/g" "$HOME"/.config/emacs/config.org || echo "Cannot find config.org."
|
sed -i "s/load-theme '.*/load-theme 'doom-solarized-light t)/g" "$HOME"/.config/emacs/config.org || echo "Cannot find config.org."
|
||||||
emacsclient -e "(load-theme 'doom-solarized-light t)" || echo "Emacsclient not running."
|
emacsclient -e "(load-theme 'doom-solarized-light t)" || echo "Emacsclient not running."
|
||||||
|
|
||||||
|
## DUNST ##
|
||||||
|
killall dunst
|
||||||
|
dunst -conf "$HOME"/.config/dunst/"$choice"
|
||||||
|
|
||||||
;;
|
;;
|
||||||
'tomorrow-night')
|
'tomorrow-night')
|
||||||
|
|
||||||
@@ -231,6 +267,10 @@ main() {
|
|||||||
sed -i "s/load-theme '.*/load-theme 'doom-tomorrow-night t)/g" "$HOME"/.config/emacs/config.org || echo "Cannot find config.org."
|
sed -i "s/load-theme '.*/load-theme 'doom-tomorrow-night t)/g" "$HOME"/.config/emacs/config.org || echo "Cannot find config.org."
|
||||||
emacsclient -e "(load-theme 'doom-tomorrow-night t)" || echo "Emacsclient not running."
|
emacsclient -e "(load-theme 'doom-tomorrow-night t)" || echo "Emacsclient not running."
|
||||||
|
|
||||||
|
## DUNST ##
|
||||||
|
killall dunst
|
||||||
|
dunst -conf "$HOME"/.config/dunst/"$choice"
|
||||||
|
|
||||||
;;
|
;;
|
||||||
'Quit this program')
|
'Quit this program')
|
||||||
echo "Program terminated." && exit 0
|
echo "Program terminated." && exit 0
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
#! /bin/bash
|
|
||||||
|
|
||||||
kern="$(uname -r)"
|
|
||||||
echo -e "$kern "
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
#! /bin/bash
|
|
||||||
|
|
||||||
mem="$(free -h | awk '/^Mem:/ {print $3 "/" $2}')"
|
|
||||||
echo -e "$mem RAM "
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
logfile=$1
|
|
||||||
|
|
||||||
declare -a MSGBUF
|
|
||||||
STATE=off
|
|
||||||
MSGTIME=
|
|
||||||
|
|
||||||
printbuf() {
|
|
||||||
JOINED=$( echo "${MSGBUF[@]}" | sed 's/,$//' )
|
|
||||||
printf "%s\n%s\n" "--- ${MSGTIME} ---" "${JOINED}"
|
|
||||||
}
|
|
||||||
|
|
||||||
procmsg() {
|
|
||||||
if [[ "${1}" =~ member=Notify$ ]]; then
|
|
||||||
STATE=on
|
|
||||||
MSGTIME=$(date '+%Y-%m-%d %H:%M:%S')
|
|
||||||
MSGBUF=()
|
|
||||||
elif [[ "${1}" =~ member=NotificationClosed$ ]]; then
|
|
||||||
STATE=off
|
|
||||||
printbuf
|
|
||||||
else
|
|
||||||
if [[ "${STATE}" == "on" ]]; then
|
|
||||||
if [[ "${1}" =~ ^string ]]; then
|
|
||||||
case "${1}" in
|
|
||||||
"string \"\"") ;;
|
|
||||||
"string \"urgency\"") ;;
|
|
||||||
"string \"sender-pid\"") ;;
|
|
||||||
*)
|
|
||||||
MSGBUF+=$( echo -n "${1}," )
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
dbus-monitor "interface='org.freedesktop.Notifications'" | \
|
|
||||||
while read -r line; do
|
|
||||||
procmsg "$line" >> "$logfile"
|
|
||||||
done
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
cupd=$(checkupdates | wc -l)
|
|
||||||
echo "$cupd updates "
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Terminate already running bar instances
|
|
||||||
killall -q polybar
|
|
||||||
|
|
||||||
# Wait until the processes have been shut down
|
|
||||||
while pgrep -u $UID -x polybar >/dev/null; do : ; done
|
|
||||||
|
|
||||||
for m in $(polybar --list-monitors | cut -d":" -f1); do
|
|
||||||
WIRELESS=$(ls /sys/class/net/ | grep ^wl | awk 'NR==1{print $1}') MONITOR=$m polybar --reload mainbar-bspwm &
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "Bars launched..."
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Terminate already running bar instances
|
|
||||||
killall -q polybar
|
|
||||||
|
|
||||||
# Wait until the processes have been shut down
|
|
||||||
while pgrep -u $UID -x polybar >/dev/null; do : ; done
|
|
||||||
|
|
||||||
for m in $(polybar --list-monitors | cut -d":" -f1); do
|
|
||||||
WIRELESS=$(ls /sys/class/net/ | grep ^wl | awk 'NR==1{print $1}') MONITOR=$m polybar --reload mainbar-xmonad &
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "Bars launched..."
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
#! /bin/bash
|
|
||||||
|
|
||||||
upt="$(uptime --pretty | sed -e 's/up //g' -e 's/ days/d/g' -e 's/ day/d/g' -e 's/ hours/h/g' -e 's/ hour/h/g' -e 's/ minutes/m/g' -e 's/, / /g')"
|
|
||||||
echo -e "$upt "
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
vol="$(amixer get Master | tail -n1 | sed -r 's/.*\[(.*)%\].*/\1/')"
|
|
||||||
echo "${vol}% volume "
|
|
||||||
Reference in New Issue
Block a user