summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorTharre <tharre3@gmail.com>2016-07-05 19:32:10 +0200
committerTharre <tharre3@gmail.com>2016-10-07 20:13:40 +0000
commit3affff8e3b6878772ca9fe6912f2f267dbf267ca (patch)
treedf40f088dca6a9e59b4152d9ac03f0604bd6737a /shell
parent5d3c2ae5d44245d644ee6288c8da0c2b16453872 (diff)
downloaddotfiles-3affff8e3b6878772ca9fe6912f2f267dbf267ca.tar.gz
dotfiles-3affff8e3b6878772ca9fe6912f2f267dbf267ca.tar.xz
dotfiles-3affff8e3b6878772ca9fe6912f2f267dbf267ca.zip
zsh: remove rarely used functions
Diffstat (limited to 'shell')
-rw-r--r--shell/_zshrc55
1 files changed, 1 insertions, 54 deletions
diff --git a/shell/_zshrc b/shell/_zshrc
index 0594d08..7539c9e 100644
--- a/shell/_zshrc
+++ b/shell/_zshrc
@@ -91,7 +91,7 @@ function noproxy {
dconf write /system/proxy/ftp/port "$base_proxy_port"
proxy_update
- }
+}
# restart/reload applications for proxy settings to take effect
function proxy_update {
@@ -99,59 +99,6 @@ function proxy_update {
dropbox-cli start
}
-# set lid closing action to sleep
-function set_closing_sleep {
- get_closing_action
- if [ $? -eq 0 ]; then
- head -n -2 /etc/systemd/logind.conf | sudo tee /etc/systemd/logind.conf > /dev/null
- echo "Closing action set to sleep if lid is closed."
- sudo systemctl restart systemd-logind.service
- else
- echo "Already set to sleep if lid is closed."
-fi
-}
-
-# set lid closing action to nothing
-function set_closing_nothing {
- get_closing_action
- if [ $? -eq 1 ]; then
- cat <<'EOF' | sudo tee -a /etc/systemd/logind.conf > /dev/null
-#custom
-HandleLidSwitch=ignore
-EOF
- echo "Closing action set to _not_ sleep if lid is closed."
- sudo systemctl restart systemd-logind.service
- else
- echo "Already set to _not_ sleep if lid is closed."
- fi
-}
-
-# 0 is nothing, 1 is sleep
-function get_closing_action {
- grep -q '#custom' /etc/systemd/logind.conf
- return $?
-}
-
-function toggle_laptop_closing_action {
- get_closing_action
- if [ $? -eq 1 ]; then
- set_closing_nothing
- else
- set_closing_sleep
- fi
-}
-
-function update_and_sleep {
- get_closing_action
- save=$?
- set_closing_nothing
- yaourt -Syu --noconfirm
-
- [ $save -eq 1 ] && set_closing_sleep
-
- systemctl suspend
-}
-
function 256color_test {
( x=`tput op` y=`printf %$((${COLUMNS}-6))s`;
for i in {0..256};