Bläddra i källkod

screen: show energy rate and expected time when battery empty

Conflicts:
	screen/battery-rate
	screen/setup
Fabian Peter Hammerle 9 år sedan
förälder
incheckning
658bd1dbd0
2 ändrade filer med 10 tillägg och 25 borttagningar
  1. 8 1
      screenrc
  2. 2 24
      setup

+ 8 - 1
screenrc

@@ -1,5 +1,12 @@
+# If both the lifespan and the autorefresh parameters are zero,
+# the backtick program is expected to stay in the background and generate output once in a while. 
+# In this case, the command is executed right away and screen stores the last line of output. 
+# If a new line gets printed screen will automatically refresh the hardstatus or the captions.
+# backtick 2 0 0 $HOME/.screen-battery-rate
+backtick 2 0 0 $HOME/.config/screen/battery-rate
 hardstatus alwayslastline
-hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][screen %S][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%d.%m. %{W}%c%{g}]'
+# H hostname of the system
+hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][screen %S][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}]%?[%2`]%?[%{B}%d.%m. %{W}%c%{g}]'
 
 defscrollback 10000
 

+ 2 - 24
setup

@@ -2,29 +2,7 @@
 
 pip install --user pydbus
 
-# relpath
 script_dir="$( dirname "${BASH_SOURCE[0]}" )"
-source ${script_dir}/../bash/functions 
 
-link_path="$HOME/.screenrc"
-target_name="screenrc"
-
-target_path="$( relpath "${script_dir}/${target_name}" "$(dirname "${link_path}")" )"
-
-# equals false for broken symlinks
-if [ -e "${link_path}" ]; then
-    # empty of link_path is not a link
-    current_target="$(readlink "${link_path}")"
-    if [ "$current_target" != "$target_path" ]; then
-        mv --backup=numbered "$link_path" "${link_path}.old"
-    fi
-fi
-
-if [ -e "${link_path}" ]; then
-    echo "sym link to '$target_path' already installed at '$link_path'"
-else
-    # delete possibly existing broken symlink
-    rm "$link_path" 2>/dev/null
-    ln -s "$target_path" "$link_path"
-    echo "installed sym link to '$target_path' at '$link_path'"
-fi
+symlink --relative --override "${script_dir}/screenrc" "$HOME/.screenrc"
+symlink --relative --override "${script_dir}/battery-rate" "$HOME/.screen-battery-rate"