From 1fad2e5ebe70df29dedd5ffbd06c7447d9942b73 Mon Sep 17 00:00:00 2001 From: SqrtMinusOne Date: Wed, 30 Dec 2020 13:28:23 +0300 Subject: [PATCH] feat(*): add pntk config --- .bashrc | 11 +++++++++-- .config/polybar/config | 10 +++++----- .profile | 10 ---------- bin/polybar.sh | 14 ++++++++++++-- 4 files changed, 26 insertions(+), 19 deletions(-) diff --git a/.bashrc b/.bashrc index 51e304f..723f39d 100644 --- a/.bashrc +++ b/.bashrc @@ -15,10 +15,17 @@ export MANPATH="/usr/local/texlive/2020/texmf-dist/doc/man:$MANPATH" export INFOPATH="/usr/local/texlive/2020/texmf-dist/doc/info:$INFOPATH" export PATH="/usr/local/texlive/2020/bin/x86_64-linux:$PATH" -export PATH="$HOME/.cargo/bin:$PATH" +if [ -d "$HOME/.cargo" ] ; then + export PATH="$HOME/.cargo/bin:$PATH" +fi +if [ -d "$HOME/.rvm" ] ; then + export PATH="$PATH:$HOME/.rvm/bin" +fi +if [ -d "$HOME/go" ] ; then + export PATH="$HOME/go/bin:$PATH" +fi # export PATH="$HOME/.gem/ruby/2.7.0/bin/:$PATH" -export PATH="$PATH:$HOME/.rvm/bin" if [[ $(ps --no-header --pid=$PPID --format=cmd) != "fish" && ${use_fish} ]] then diff --git a/.config/polybar/config b/.config/polybar/config index 488ef33..f645276 100644 --- a/.config/polybar/config +++ b/.config/polybar/config @@ -119,7 +119,7 @@ label-mode-background = ${colors.blue} ; focused = Active workspace on focused monitor label-focused = %name% -label-focused-background = ${colors.background} +; label-focused-background = ${colors.background-alt} label-focused-underline= ${colors.blue} label-focused-padding = 1 @@ -129,9 +129,9 @@ label-unfocused-padding = 1 ; visible = Active workspace on unfocused monitor label-visible = %name% -label-visible-background = ${self.label-focused-background} -label-visible-underline = ${self.label-focused-underline} -label-visible-padding = ${self.label-focused-padding} +; label-visible-background = ${self.label-focused-background} +; label-visible-underline = ${self.label-focused-underline} +; label-visible-padding = ${self.label-focused-padding} ; urgent = Workspace with urgency hint set label-urgent = %name% @@ -242,7 +242,7 @@ format-underline = ${colors.yellow} type = internal/network interval = 1 -interface = wlp35s0f3u2 +interface = ${env:WLAN_INTERFACE} ; format-connected = [] diff --git a/.profile b/.profile index dcbb07b..34f3431 100644 --- a/.profile +++ b/.profile @@ -4,17 +4,7 @@ export QT_QPA_PLATFORMTHEME="qt5ct" export QT_AUTO_SCREEN_SCALE_FACTOR=0 export GTK2_RC_FILES="$HOME/.gtkrc-2.0" -export MANPATH="/usr/local/texlive/2020/texmf-dist/doc/man:$MANPATH" -export INFOPATH="/usr/local/texlive/2020/texmf-dist/doc/info:$INFOPATH" -export PATH="/usr/local/texlive/2020/bin/x86_64-linux:$PATH" - -export PATH="$HOME/.cargo/bin:$PATH" if [ -d "$HOME/bin" ] ; then export PATH="$HOME/bin:$PATH" export PATH="$HOME/bin/scripts:$PATH" fi - -# Add RVM to PATH for scripting. Make sure this is the last PATH variable change. -export PATH="$PATH:$HOME/.rvm/bin" - -[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* diff --git a/bin/polybar.sh b/bin/polybar.sh index 2a059ff..9259b91 100755 --- a/bin/polybar.sh +++ b/bin/polybar.sh @@ -1,21 +1,31 @@ #!/bin/bash -# TRAY_MONITOR="HDMI-A-0" -TRAY_MONITOR="DVI-D-0" +hostname=$(hostname) +if [ "$hostname" = "pntk" ]; then + TRAY_MONITOR="eDP1" + export WLAN_INTERFACE="wlp3s0" +else + TRAY_MONITOR="HDMI-A-0" + export WLAN_INTERFACE="wlp35s0f3u2" +fi declare -A FONT_SIZES=( + ["eDP1"]="13" ["DVI-D-0"]="11" ["HDMI-A-0"]="13" ) declare -A EMOJI_SCALE=( + ["eDP1"]="9" ["DVI-D-0"]="10" ["HDMI-A-0"]="10" ) declare -A BAR_HEIGHT=( + ["eDP1"]="29" ["DVI-D-0"]="23" ["HDMI-A-0"]="29" ) declare -A BLOCKS=( ["DVI-D-0"]="pulseaudio SEP cpu ram-memory swap-memory SEP network ipstack-vpn SEP xkeyboard SEP sun aw-afk date TSEP" ["HDMI-A-0"]="pulseaudio mpd SEP cpu ram-memory swap-memory SEP network ipstack-vpn SEP xkeyboard SEP sun aw-afk date TSEP" + ["eDP1"]="pulseaudio mpd SEP cpu ram-memory swap-memory SEP network ipstack-vpn SEP xkeyboard SEP sun aw-afk date TSEP" ) pkill polybar