aboutsummaryrefslogtreecommitdiff
path: root/local/bin
diff options
context:
space:
mode:
Diffstat (limited to 'local/bin')
-rwxr-xr-xlocal/bin/mxrandr6
-rwxr-xr-xlocal/bin/startme7
-rwxr-xr-xlocal/bin/sys-reboot2
-rwxr-xr-xlocal/bin/sys-shutdown2
-rwxr-xr-xlocal/bin/sys-suspend2
-rwxr-xr-xlocal/bin/system-backup7
6 files changed, 12 insertions, 14 deletions
diff --git a/local/bin/mxrandr b/local/bin/mxrandr
index 81ae511..7c51128 100755
--- a/local/bin/mxrandr
+++ b/local/bin/mxrandr
@@ -8,9 +8,9 @@ disconnectedOutputs=$(xrandr | grep -E " disconnected (primary )?[1-9]+" | awk '
cmd="xrandr "
cmd_def=$cmd
-INTERNAL=eDP-1
-HDMI=HDMI-1
-VGA=VGA-1
+INTERNAL=eDP1
+HDMI=HDMI1
+VGA=VGA1
for device in "$disconnectedOutputs"; do
if [ -n "$defice" ]; then
diff --git a/local/bin/startme b/local/bin/startme
deleted file mode 100755
index 4af6150..0000000
--- a/local/bin/startme
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-if ls ~/.annoyme/*.pid 2>/dev/null >/dev/null; then
- annoyme
-fi
-
-startx
diff --git a/local/bin/sys-reboot b/local/bin/sys-reboot
new file mode 100755
index 0000000..24a024c
--- /dev/null
+++ b/local/bin/sys-reboot
@@ -0,0 +1,2 @@
+#!/bin/sh
+dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart
diff --git a/local/bin/sys-shutdown b/local/bin/sys-shutdown
new file mode 100755
index 0000000..bff9762
--- /dev/null
+++ b/local/bin/sys-shutdown
@@ -0,0 +1,2 @@
+#!/bin/sh
+dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
diff --git a/local/bin/sys-suspend b/local/bin/sys-suspend
new file mode 100755
index 0000000..49b4b2e
--- /dev/null
+++ b/local/bin/sys-suspend
@@ -0,0 +1,2 @@
+#!/bin/sh
+dbus-send --system --print-reply --dest="org.freedesktop.ConsoleKit" /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Suspend boolean:true
diff --git a/local/bin/system-backup b/local/bin/system-backup
index e19889d..956ba31 100755
--- a/local/bin/system-backup
+++ b/local/bin/system-backup
@@ -1,11 +1,9 @@
#!/bin/bash
# vim:ft=sh
# New line separated list of all directories to backup
-read -d '' DIRS <<-"_EOF_"
-/etc
+DIRS="/etc
/home
-/home_hdd
-_EOF_
+/home_hdd"
# Path where backup will be mounted
MPATH=/media/backup-hdd
# UUID of disk
@@ -18,6 +16,7 @@ if [ `id -u` -ne "0" ]; then
echo Please run this as root.
exit 1
fi
+set -e
# Mount disk
PART=$(lsblk -fpl | grep "$UUID" | awk '{print $1}')