polybar change on old i3 config
commit
3d2b92d5f9
@ -1,4 +1,5 @@
|
|||||||
# dotfiles
|
# dotfiles
|
||||||
|
|
||||||
### TODO
|
### TODO
|
||||||
- Add main polybar file and create bar as needed from modules
|
|
||||||
|
- port scripts to use rofi or equiv
|
||||||
|
@ -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)
|
@ -1,8 +1,8 @@
|
|||||||
include base.conf
|
include base.conf
|
||||||
|
|
||||||
# binding workspaces
|
# binding workspaces
|
||||||
workspace 1 output DP-2
|
workspace 1 output DP-0
|
||||||
workspace 2 output DP-0
|
workspace 2 output DP-2
|
||||||
|
|
||||||
# poly bar
|
# poly bar
|
||||||
exec_always --no-startup-id polybar-launch.sh desktop-bar
|
exec_always --no-startup-id polybar-launch.sh desktop-bar
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
- link:
|
- 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:
|
- shell:
|
||||||
- [bin/zsh-check]
|
- command: bin/zsh-check
|
||||||
|
stdin: true
|
||||||
|
stdout: true
|
||||||
|
|
||||||
- link:
|
- link:
|
||||||
~/.zshrc: shells/zsh/zshrc
|
~/.config/zsh/.zprofile: shells/zsh/zprofile
|
||||||
~/.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"]
|
@ -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"
|
@ -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"
|
Loading…
Reference in New Issue