diff --git a/dotfiles/i3/i3blocks_config b/dotfiles/i3/i3blocks_config new file mode 100644 index 0000000..bc95deb --- /dev/null +++ b/dotfiles/i3/i3blocks_config @@ -0,0 +1,47 @@ +# i3blocks config file +# +# Please see man i3blocks for a complete reference! +# The man page is also hosted at http://vivien.github.io/i3blocks +# +# List of valid properties: +# +# align +# color +# command +full_text= +# instance +# interval +# label +# min_width +# name +# separator +# separator_block_width +# short_text +# signal +# urgent + +# Global properties +# +# The top properties below are applied to every block, but can be overridden. +# Each block command defaults to the script name to avoid boilerplate. +# Change $SCRIPT_DIR to the location of your scripts! +command=scripts/$BLOCK_NAME +separator_block_width=15 +markup=pango + +[arch-update] +interval=3600 +LABEL=Updates: +QUIET=true +WATCH=^linux.* ^pacman.* +BASE_COLOR=#5fff5f +UPDATE_COLOR=#ffff85 +LABEL= + +[rofi-calendar] +interval=3600 +LABEL= +DATEFTM=+ %a. %d. %b. %Y +SHORTFTM=+ %d.%m.%Y + +[] diff --git a/dotfiles/i3/i3status_config b/dotfiles/i3/i3status_config new file mode 100644 index 0000000..3b53e39 --- /dev/null +++ b/dotfiles/i3/i3status_config @@ -0,0 +1,59 @@ +general { + output_format = "i3bar" + colors = false + markup = pango + interval = 2 + color_good = '#2f343f' + color_degraded = '#ebcb8b' + color_bad = '#ba5e57' +} + +order += "load" +order += "cpu_temperature 0" +order += "disk /" +order += "disk /run/media/flyingscorpio/Backup" +order += "ethernet enp4s0" +order += "path_exists VPN" +order += "volume master" +order += "tztime local" + +load { + format = " %5min Load " +} + +cpu_temperature 0 { + format = " %degrees °C " + path = "/sys/class/thermal/thermal_zone0/temp" +} + +disk "/" { + format = " %free Free " +} + +disk "/run/media/flyingscorpio/Backup" { + format = " %free Free " +} + +ethernet enp4s0 { + format_up = " %ip " + format_down = " Disconnected " +} + +path_exists VPN { + path = "/proc/sys/net/ipv4/conf/proton0" + format = " %title ON " + format_down = " %title OFF " +} + +volume master { + format = " %volume " + format_muted = " Muted " + device = "default" + mixer = "Master" + mixer_idx = 0 +} + +tztime local { + format = " %time " + format_time = "%a %-d %b %H:%M" +} diff --git a/installation_scripts/i3_update.sh b/installation_scripts/i3_update.sh new file mode 100644 index 0000000..81bc0cc --- /dev/null +++ b/installation_scripts/i3_update.sh @@ -0,0 +1,50 @@ +#!/bin/sh + +## This script takes care of the i3 configuration + +if [ -z "$BASE_DIR" ]; then + echo "BASE_DIR wasn't set." + exit 1 +fi + +mkdir -p ~/github_dotfiles +if [ -e ~/github_dotfiles/i3-starterpack ]; then + if [ "$UPDATE" = 'true' ]; then + cd ~/github_dotfiles/i3-starterpack && git pull + fi +else + cd ~/github_dotfiles && git clone https://github.com/addy-dclxvi/i3-starterpack.git +fi +if [ -e ~/github_dotfiles/i3blocks-contrib ]; then + if [ "$UPDATE" = 'true' ]; then + cd ~/github_dotfiles/i3blocks-contrib && git pull + fi +else + cd ~/github_dotfiles && git clone https://github.com/vivien/i3blocks-contrib.git +fi + +# Add i3 main config {{{ + +echo "Adding i3/config" +mkdir -p ~/.config/i3 +ln -rs "$BASE_DIR"/dotfiles/i3/i3_config ~/.config/i3/config 2> /dev/null + +# }}} + +# Add i3status config {{{ + +echo "Adding i3status/config" +mkdir -p ~/.config/i3status +ln -rs "$BASE_DIR"/dotfiles/i3/i3status_config ~/.config/i3status/config 2> /dev/null + +# }}} + +# Add i3blocks config {{{ + +echo "Adding i3blocks/config" +mkdir -p ~/.config/i3blocks/scripts +ln -rs "$BASE_DIR"/dotfiles/i3/i3blocks_config ~/.config/i3blocks/config 2> /dev/null +ln -rs ~/github_dotfiles/i3blocks-contrib/arch-update/arch-update ~/.config/i3blocks/scripts/arch-update 2> /dev/null +ln -rs ~/github_dotfiles/i3blocks-contrib/rofi-calendar/rofi-calendar ~/.config/i3blocks/scripts/rofi-calendar 2> /dev/null + +# }}}