polybar change on old i3 config

main
spinach 10 months ago
commit 3d2b92d5f9

@ -1,4 +1,5 @@
# dotfiles
### TODO
- Add main polybar file and create bar as needed from modules
- port scripts to use rofi or equiv

@ -3,6 +3,7 @@ polybar
feh
imagemagick
rofi
rofi-calc
mpv
mpd
mpc

@ -1,49 +0,0 @@
#!/bin/bash
# getting focused pwd
PID=$(xdotool getwindowfocus getwindowpid)
child=$PID
children=()
while [ -n "$child" ] ; do
children+=($child)
child=$(pgrep -P $child)
done
last_ps=$(ps ${children[-1]} | grep -v PID | awk '{print $5}')
if [ "$last_ps" == "tmux" ] ; then
current_pane=$(tmux list-panes | grep '(active)' | grep -o '^[0-9]')
cwd=$(tmux display-message -p -t $current_pane -F '#{pane_current_path}')
else
cwd=$(readlink -e /proc/${children[-1]}/cwd)
fi
# change to the directory
cd $cwd
files=$(find * -type f)
selection=$(echo "$files" | rofi-dmenu)
# exit on quit
if [ -z "$selection" ] ; then
exit 0
fi
# grab extension
extension=$(echo "$selection" | grep -o '.\([a-zA-Z]\+\)$')
# get proper opener
case "$extension" in
'.pdf') prg="zathura" ;;
'.md') prg="vim" ;;
'.png') prg="feh" ;;
'.jpg') prg="feh" ;;
'.jpeg') prg="feh" ;;
*) prg="xdg-open" ;;
esac
if [[ "$1" == '-S' && "$prg" =~ [feh|zathura] ]] ; then
swallow $prg "$selection"
else
$prg "$selection"
fi

@ -0,0 +1,28 @@
#!/usr/bin/env bash
# checks mullvad status for monitoring in polybar
CONNECTED=$(printf '%s%s' '%{F#0F0}' $(echo -e '\Uf0318')) # green
DISCONNECTED=$(printf '%s%s' '%{F#F00}' $(echo -e '\Uf0319')) # red
# check that its installed
if ! command -v mullvad &>/dev/null ; then
echo "Seafile not downloaded to device!">&2
echo "$DISCONNECTED"
exit 1
fi
# reading vpn status as continous output
while read VPN_STATUS; do
VPN_DISCONNECTED=$(echo "$VPN_STATUS" | grep Disconnect);
if [[ -n "$VPN_DISCONNECTED" ]] ; then
# vpn is disconnected
echo "$DISCONNECTED"
continue
fi
# connected
echo "$CONNECTED"
done < <(mullvad status listen)

@ -53,6 +53,7 @@ bindsym $mod+d exec --no-startup-id rofi-launcher
bindsym $mod+o exec --no-startup-id rofi-files
bindsym $mod+Shift+o exec --no-startup-id rofi-files -S
bindsym $mod+space exec --no-startup-id rofi-calc
# setting up a vimscratch pad to use vimwiki
for_window [instance="todo"] move window to scratchpad
@ -108,7 +109,7 @@ bindsym $mod+e layout toggle split
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent

@ -1,8 +1,8 @@
include base.conf
# binding workspaces
workspace 1 output DP-2
workspace 2 output DP-0
workspace 1 output DP-0
workspace 2 output DP-2
# poly bar
exec_always --no-startup-id polybar-launch.sh desktop-bar

@ -6,7 +6,7 @@ foreground = #DDD
primary = #F0C674
secondary = #8ABEB7
disabled = #707880
alert = #A54242
alert = #A54242S
[section/base-bar]
; base bar settings
@ -46,10 +46,10 @@ inherit = section/base-bar
; height
height = 24pt
; modules
modules-left = xworkspaces focus-fast spotify spotify-len todo
modules-left = xworkspaces focus-fast spotify spotify-len
;modules-left = xworkspaces spotify spotify-len
modules-center = weather-desktop
modules-right = pulseaudio memory cpu temperature eth dev-bat packages seafile calendar-sync bg-selector quotes date powermenu
modules-right = pulseaudio memory cpu temperature wlan eth vpn dev-bat packages seafile calendar-sync bg-selector quotes date powermenu
[bar/work-bar]
; desktop bar config
@ -59,7 +59,7 @@ height = 18pt
; modules
modules-left = xworkspaces focus-fast
modules-center = weather-desktop
modules-right = memory cpu temperature eth seafile bg-selector date powermenu
modules-right = memory cpu eth seafile bg-selector date-tp powermenu
[module/xworkspaces]
type = internal/xworkspaces
@ -303,5 +303,17 @@ type = custom/script
interval = 600
exec = printf "%s %s\n" `echo -e '\ueb29'` `pacman -Qu | wc -l`
[module/vpn]
; custom vpn script
type = custom/script
exec = vpn_status.sh
tail = true
[module/crypto]
; custom crypto script
type = custom/script
exec = /home/spinach/sb-ticker 20
tail = true
[settings]
screenchange-reload = true

@ -2,6 +2,5 @@
- [cd src/fzf && make install, Building fzf]
- link:
~/.fzf: src/fzf
~/.local/bin/fzf: src/fzf/bin/fzf
~/.local/bin/fzf-tmux: src/fzf/bin/fzf-tmux

@ -3,5 +3,5 @@
~/.local/share/nvim/site: editors/neovim/site
- shell:
- command: "cd editors/neovim/site/pack/markdown/start/markdown-preview.nvim/app && if ( -z `ls bin` ) ; then ./install.sh; fi"
- command: "cd editors/neovim/site/pack/markdown/start/markdown-preview.nvim/app && if [[ -z `ls bin 2>/dev/null` ]] ; then ./install.sh; fi"
#- [cd editors/neovim/site/pack/markdown/start/markdown-preview.nvim && yarn install --checkfiles && NODE_OPTIONS=--openssl-legacy-provider yarn build, building markdown preview]

@ -2,4 +2,4 @@
- [bin/oh-my-zsh-check.sh]
- link:
~/.local/share/oh-my-zsh: shells/oh-my-zsh
~/.local/share/omz-custom: shells/oh-my-zsh

@ -8,13 +8,13 @@
- link:
~/.local/bin/ssh_agent_check: bin/ssh_agent_check
~/.local/bin/poly_spotify: bin/poly_spotify
~/.local/bin/rofi-files: bin/rofi-files
~/.local/bin/i3-scratchpad.sh: bin/i3-scratchpad.sh
~/.local/bin/todo_display.sh: bin/todo_display.sh
~/.local/bin/display_uptime: bin/display_uptime
~/.local/bin/markdown-preview.sh: bin/markdown-preview.sh
~/.local/bin/docker_check: bin/docker_check
~/.local/bin/seafile_check: bin/seafile_check
~/.local/bin/vpn_status.sh: bin/vpn_status.sh
~/.local/bin/watertracker: src/watertracker/watertracker
~/.local/bin/device_battery.sh: src/device-battery/device_battery.sh
~/.local/bin/weather: src/weather/weather

@ -1,2 +1,2 @@
- link:
~/.tmux.conf: terminals/tmux/tmux.sparse.conf
~/.config/tmux/tmux.conf: terminals/tmux/tmux.sparse.conf

@ -0,0 +1,10 @@
- shell:
- command: chsh -s $(which zsh)
stdin: true
stdout: true
stderr: true
- link:
~/.zprofile: shells/zsh/zprofile
~/.zshrc: shells/zsh/zshrc.basic
~/.p10k.sh: shells/zsh/p10k.sh

@ -1,6 +1,9 @@
- shell:
- [bin/zsh-check]
- command: bin/zsh-check
stdin: true
stdout: true
- link:
~/.zshrc: shells/zsh/zshrc
~/.zprofile: shells/zsh/zprofile
~/.config/zsh/.zprofile: shells/zsh/zprofile
~/.config/zsh/.zshrc: shells/zsh/zshrc
~/.config/zsh/.p10k.sh: shells/zsh/p10k.sh

@ -0,0 +1,2 @@
- shell:
- [echo 'export ZDOTDIR="$HOME/.config/zsh"' > /etc/zsh/zshenv, "creating zshenv"]

@ -3,6 +3,7 @@ arch.i3
arch.nvim
neovim
zsh
zshenv-sudo
oh-my-zsh
fzf
tmux.sparse

@ -0,0 +1,5 @@
tmux.sparse
zsh.basic
oh-my-zsh
neovim
clean

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

@ -0,0 +1 @@
export ZDOTDIR="$HOME/.config/zsh"

@ -8,6 +8,13 @@ fi
export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock
ssh-add -l > /dev/null || ssh-add ~/.ssh/id_ed25519
# Path to your oh-my-zsh installation.
# export ZSH="$HOME/.oh-my-zsh"
export ZSH="$HOME/.local/share/oh-my-zsh"
# Would you like to use another custom folder than $ZSH/custom?
export ZSH_CUSTOM="$HOME/.local/share/omz-custom/custom"
# export ZSH_CUSTOM=$HOME/.local/share/omz-custom
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
@ -21,20 +28,23 @@ fi
# fixing gopath and binaries
export GOPATH="$HOME/.local/share/go"
# moving cargo cache dir
export CARGO_HOME="$HOME/.local/share/cargo"
export RUSTUP_HOME="$HOME/.local/sare/rustup"
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# export ZSH="$HOME/.oh-my-zsh"
export ZSH="$HOME/.local/share/oh-my-zsh"
# Would you like to use another custom folder than $ZSH/custom?
export ZSH_CUSTOM=$HOME/.local/share/oh-my-zsh/custom
plugins=(
zsh-autosugggestions
)
export ZSH_CUSTOM="$HOME/.local/share/omz-custom/custom"
# export ZSH_CUSTOM=$HOME/.local/share/omz-custom
# ZSH theme
ZSH_THEME="powerlevel10k/powerlevel10k"
# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
@ -44,8 +54,11 @@ plugins=(
zsh-autosuggestions
git
)
#vi-mode
source $ZSH/oh-my-zsh.sh
# vi-mode settings
export KEYTIMEOUT=10
bindkey -v
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
@ -71,7 +84,7 @@ source $ZSH/oh-my-zsh.sh
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# export EDITOR='nvim'
# fi
# Compilation flags
@ -82,18 +95,20 @@ source $ZSH/oh-my-zsh.sh
alias vim="nvim"
# helpful aliasis
#alias ifconfig="/sbin/ifconfig"
# bb ip remove work related
alias bbrm='ssh-keygen -f "/home/kdeppe/.ssh/known_hosts" -R "192.168.7.2"'
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
export POWERLEVEL9K_CONFIG_FILE="$HOME/.config/zsh/.p10k.sh"
[[ ! -f "$POWERLEVEL9K_CONFIG_FILE" ]] || source "$POWERLEVEL9K_CONFIG_FILE"
# home and clear
alias c="cd && clear"
# colorize ls
alias ls="ls --color=auto"
# water tracking alias
alias nalgene="water 32"
alias tt="timetracker"
@ -114,3 +129,6 @@ alias gadd="git add ."
alias gbug="git add . && git commit -m 'bug fixes'"
alias gp="git push"
alias glog="git log --pretty --oneline --graph --all --decorate"
# copying with progress
alias cpr="rsync -r -hh --info=stats1,progress2"

@ -0,0 +1,107 @@
# Path to your oh-my-zsh installation.
# export ZSH="$HOME/.oh-my-zsh"
export ZSH="$HOME/.local/share/oh-my-zsh"
# path fix for deb
export PATH=$PATH:/usr/local/bin
# Would you like to use another custom folder than $ZSH/custom?
export ZSH_CUSTOM="$HOME/.local/share/omz-custom/custom"
# export ZSH_CUSTOM=$HOME/.local/share/omz-custom
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# fixing gopath and binaries
export GOPATH="$HOME/.local/share/go"
# moving cargo cache dir
export CARGO_HOME="$HOME/.local/share/cargo"
export RUSTUP_HOME="$HOME/.local/sare/rustup"
# Path to your oh-my-zsh installation.
# export ZSH="$HOME/.oh-my-zsh"
export ZSH="$HOME/.local/share/oh-my-zsh"
# Would you like to use another custom folder than $ZSH/custom?
export ZSH_CUSTOM="$HOME/.local/share/omz-custom/custom"
# export ZSH_CUSTOM=$HOME/.local/share/omz-custom
# ZSH theme
ZSH_THEME="powerlevel10k/powerlevel10k"
# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
zsh-autosuggestions
git
)
#vi-mode
source $ZSH/oh-my-zsh.sh
# vi-mode settings
export KEYTIMEOUT=10
bindkey -v
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='nvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
#
# switching to neovim
alias vim="nvim"
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
export POWERLEVEL9K_CONFIG_FILE="$HOME/.config/zsh/.p10k.sh"
[[ ! -f "$POWERLEVEL9K_CONFIG_FILE" ]] || source "$POWERLEVEL9K_CONFIG_FILE"
# home and clear
alias c="cd && clear"
# colorize ls
alias ls="ls --color=auto"
export FZF_DEFAULT_OPTS='--layout=reverse --border'
# git aliases
alias gadd="git add ."
alias gbug="git add . && git commit -m 'bug fixes'"
alias gp="git push"
alias glog="git log --pretty --oneline --graph --all --decorate"

@ -32,6 +32,18 @@ bind-key a attach -c "#{pane_current_path}"
# setting up TPM
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# adding tmux ssh support
set -g @plugin 'MunifTanjim/tmux-mode-indicator'
set -g @plugin 'MunifTanjim/tmux-suspend'
# suspend key
set -g @suspend_key 'F12'
# suspend cutom colors
set -g @suspend_suspended_options " \
window-status-current-style::bg=color94 dim\\,fg=black, \
@mode_indicator_custom_prompt:: ---- , \
@mode_indicator_custom_mode_style::bg=brightblack\\,fg=black, \
status-style::bg=color94 dim\\,fg=black bold dim, \
"
# clock settings
set -g clock-mode-colour white
@ -39,9 +51,11 @@ set -g clock-mode-colour white
# status config
set -g status-interval 10
set -g status-style "bg=black, fg=brightWhite"
set -g status-right "%a, %b %d %l:%M %P "
set -g status-right "%a, %b %d %l:%M %P #{tmux_mode_indicator}"
set -g status-right-length 100
set -g status-left ""
# change active window color
set-window-option -g window-status-current-style "bg=white, fg=black"
# set -g default-terminal "${TERM}"
# set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
@ -57,9 +71,10 @@ set -g status-left ""
# set -g @continuum-boot 'on'
#set -g @continuum-systemd-start-cmd 'new-session -d -s doormat'
set-environment -g TMUX_PLUGIN_MANAGER_PATH "$HOME/.local/share/tmux/plugins"
# auto install plugins
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
# auto install plugins at correct directory
if "test ! -d ~/.local/share/tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.local/share/tmux/plugins/tpm && ~/.local/share/tmux/plugins/tpm/bin/install_plugins'"
# run tpm
run '~/.tmux/plugins/tpm/tpm'
run '~/.local/share/tmux/plugins/tpm/tpm'

Loading…
Cancel
Save