Compare commits

..

No commits in common. "3c91c43fdf92e72596ed2d632b31b4eb93c98e9a" and "072fa544e738f2631b6359a77f655da24fcab83f" have entirely different histories.

5 changed files with 4 additions and 43 deletions

View File

@ -1,19 +0,0 @@
# DISPLAY=:0
XDG_RUNTIME_DIR=/run/user/1000
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR Jan-Dec
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR SUN-SAT
# | | | | |
# * * * * * user-name command to be executed
# * any value
# , value list separator
# - range of values
# / step values
* * * * * /home/sahin/scripts/check-battery.sh 10

@ -1 +1 @@
Subproject commit 20dfe30e960d98db2c259a355ecef96f43ca6021
Subproject commit 7f999024a5bbfaf0bdf7a4e493a3658db5b97ee2

2
.gitmodules vendored
View File

@ -12,5 +12,5 @@
branch = linux
[submodule ".config/zsh"]
path = .config/zsh
url = https://github.com/sahinakkaya/zsh-config.git
url = https://github.com/sahinakkaya/zsh.git
branch = linux

View File

@ -1,3 +1,3 @@
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:=$HOME/.config}"
export ZDOTDIR="${ZDOTDIR:=$XDG_CONFIG_HOME/zsh}"
export ZDOTDIR="$HOME/.config/zsh"
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
export PATH="$HOME/scripts/:$HOME/.local/bin/:$PATH"

View File

@ -1,20 +0,0 @@
#!/bin/bash
# Set limit to shell argument
batteryLimit=$1
fullAt=92
# Get the current battery level with acpi
batteryLevel=$(acpi | cut -d ' ' -f 4 | tr -d '%|,| ')
charging=$(acpi | cut -d ' ' -f 3 | tr -d ',| ')
echo $batteryLevel
if [[ "$batteryLevel" -le "$batteryLimit" ]] && [[ "$charging" == "Discharging" ]]; then
/usr/bin/notify-send -a "Battery Warning" --urgency critical "Battery level at ${batteryLevel}%" -i abrt -t 10000
/usr/bin/mpv /usr/share/sounds/Oxygen-Sys-Warning.ogg
# /usr/bin/aplay /usr/share/sounds/freedesktop/stereo/dialog-warning.oga
#elif [[ "$batteryLevel" -gt "$fullAt" ]] && [[ ! "$charging" == "Discharging" ]]; then
# /usr/bin/notify-send -a "Battery Warning" "Battery is full: ${batteryLevel}" -i abrt -t 10000
# /usr/bin/paplay /usr/share/sounds/freedesktop/stereo/dialog-warning.oga
fi