Commit 1d56a5a0 authored by Nico Schottelius's avatar Nico Schottelius

Merge branch 'master' of code.ungleich.ch:nico/nsbin

parents 1d105d30 e2520808
#!/bin/sh
acpi=$(acpi)
# Nothing to be done if we are charging
if echo "$acpi" | grep -q Charging; then
exit 0
fi
percent=$(echo $acpi | cut -d, -f2 | sed 's/%//')
if [ $percent -le 10 ]; then
notify-send -u critical "Battery:${percent}%"
elif [ $percent -le 15 ]; then
notify-send -u normal "Battery:${percent}%"
elif [ $percent -le 20 ]; then
notify-send -u low "Battery:${percent}%"
fi
This diff is collapsed.
#!/bin/sh
# SSH for people who did not sleep long enough
# Changes background colour to red for remote and resets to LightYellow2 after
# the session is finished
#
# Inspiration by Stefan Baur
# Coded by Nico Schottelius, 2020-01-19
#
# Copying: GPLv3
printf '\033]10;black\007'
printf '\033]11;red\007'
echo ''
ssh "$@"
printf '\033]11;LightYellow2\007'
printf '\033]10;black\007'
echo ''
#!/bin/sh
exec 2>&1
if [ $# -ge 1 ]; then
printf 'Estimated location\n\n'
echo "$@"
printf '\n\n'
fi
printf 'My IP addresses\n\n'
ip -o a | awk '{ print $4 }'
printf '\nLocal time\n'
date
printf '\nPing6 output\n'
ping -6 -c3 ungleich.ch
printf '\nPing4 output\n'
ping -4 -c3 ungleich.ch
......@@ -6,14 +6,16 @@ i3-msg 'workspace 2; append_layout ~/.i3/workspace-2.json'
i3-msg 'workspace 10'
# Start programs afterwards and watch matching
#if command -v firefox; then
# firefox &
if command -v chromium; then
if command -v firefox; then
firefox &
elif command -v chromium; then
chromium &
elif command -v chromium-browser; then
chromium-browser &
fi
# slack &
ssh-add </dev/null && mainemacs &
if [ -f /etc/arch-release ]; then
SSH_ASKPASS=/usr/bin/qt4-ssh-askpass ssh-add </dev/null && mainemacs &
else
ssh-add </dev/null && mainemacs &
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment