initial commit
							
								
								
									
										10
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,10 @@
 | 
			
		||||
# nvim folders
 | 
			
		||||
/config/nvim/*/
 | 
			
		||||
# tmux plugins
 | 
			
		||||
/rc/tmux/tmux
 | 
			
		||||
 | 
			
		||||
#nextcloud stuff
 | 
			
		||||
/._sync*
 | 
			
		||||
/.owncloud*
 | 
			
		||||
 | 
			
		||||
/tmp
 | 
			
		||||
							
								
								
									
										3
									
								
								README.MD
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,3 @@
 | 
			
		||||
# hoellen/dotfiles
 | 
			
		||||
 | 
			
		||||
This is not cleaned up. Still in development [WIP].
 | 
			
		||||
							
								
								
									
										58
									
								
								config/aliases
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,58 @@
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# aliases
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
alias setclip='xclip -selection c'
 | 
			
		||||
alias getclip='xclip -selection clipboard -o'
 | 
			
		||||
alias open='xdg-open $1'
 | 
			
		||||
alias vi='nvim'
 | 
			
		||||
alias vim='nvim'
 | 
			
		||||
 | 
			
		||||
alias l="ls -lFh"
 | 
			
		||||
alias la="ls -lAFh"
 | 
			
		||||
alias ll="ls -l"
 | 
			
		||||
alias ls='ls --color=auto'
 | 
			
		||||
 | 
			
		||||
alias j="jump"
 | 
			
		||||
 | 
			
		||||
# config files
 | 
			
		||||
alias zshrc="nvim ~/.zshrc"
 | 
			
		||||
alias bashrc="nvim ~/.bashrc"
 | 
			
		||||
alias aliases="nvim ~/.config/aliases"
 | 
			
		||||
alias nviminit="nvim ~/.config/nvim/init.vim"
 | 
			
		||||
alias i3conf="nvim ~/.i3/config"
 | 
			
		||||
alias bspwmconf="nvim ~/.config/bspwm/bspwmrc"
 | 
			
		||||
alias sxhkdconf="nvim ~/.config/sxhkd/sxhkdrc"
 | 
			
		||||
alias tmuxconf="nvim ~/.tmux.conf"
 | 
			
		||||
 | 
			
		||||
# Git aliases
 | 
			
		||||
alias gs="git status"
 | 
			
		||||
alias gd="git diff"
 | 
			
		||||
alias gdh="git diff HEAD"
 | 
			
		||||
alias gc="git clone $1 $2"
 | 
			
		||||
alias gcm="git commit -m "$1""
 | 
			
		||||
alias gaa="git add -A ."
 | 
			
		||||
alias gpo="git push origin $1"
 | 
			
		||||
alias glo="git log --oneline"
 | 
			
		||||
alias grhh="git reset --hard HEAD"
 | 
			
		||||
alias gcp="git cherry-pick $1"
 | 
			
		||||
 | 
			
		||||
# npm aliases
 | 
			
		||||
#alias ni="npm install";
 | 
			
		||||
#alias niS="npm i -S "
 | 
			
		||||
#alias niD="npm i -D "
 | 
			
		||||
#alias nrs="npm run start";
 | 
			
		||||
#alias nrb="npm run build";
 | 
			
		||||
#alias nrt="npm run test";
 | 
			
		||||
 | 
			
		||||
alias xres="xrdb ~/.Xresources"
 | 
			
		||||
 | 
			
		||||
# Pacman
 | 
			
		||||
alias pacman="pacman --color=auto $@"
 | 
			
		||||
alias pm="pacman $@"
 | 
			
		||||
alias pms="pacman -Ss $@"
 | 
			
		||||
alias pmi="sudo pacman -S --color=auto $@"
 | 
			
		||||
alias pmu="sudo pacman -Syu $@"
 | 
			
		||||
alias cower="cower --color=auto $@"
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										63
									
								
								config/bspwm/bspwmrc
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,63 @@
 | 
			
		||||
#! /bin/sh
 | 
			
		||||
 | 
			
		||||
sxhkd &
 | 
			
		||||
 | 
			
		||||
bspc monitor -d web term code IV V VI VII VIII IX music
 | 
			
		||||
 | 
			
		||||
bspc config border_width         2
 | 
			
		||||
bspc config window_gap          12
 | 
			
		||||
 | 
			
		||||
bspc config split_ratio          0.52
 | 
			
		||||
bspc config borderless_monocle   true
 | 
			
		||||
bspc config gapless_monocle      true
 | 
			
		||||
bspc config click_to_focus       true
 | 
			
		||||
 | 
			
		||||
bspc rule -a Gimp desktop='^8' state=floating follow=on
 | 
			
		||||
#bspc rule -a Chromium desktop='^2'
 | 
			
		||||
#bspc rule -a mplayer2 state=floating
 | 
			
		||||
#bspc rule -a Kupfer.py focus=on
 | 
			
		||||
#bspc rule -a Screenkey manage=off
 | 
			
		||||
bspc rule -a Nautilus state=floating
 | 
			
		||||
bspc rule -a Gedit state=floating
 | 
			
		||||
bspc rule -a Gnome-system-monitor state=floating
 | 
			
		||||
bspc rule -a Nextcloud desktop='^9' state=floating
 | 
			
		||||
 | 
			
		||||
# set wallpaper
 | 
			
		||||
feh --bg-scale ~/Bilder/Wallpapers/wallpaper.jpg
 | 
			
		||||
 | 
			
		||||
# map CAPS LOCK to CTRL
 | 
			
		||||
xmodmap -e "remove Lock = Caps_Lock"
 | 
			
		||||
xmodmap -e "keysym Caps_Lock = Control_L"
 | 
			
		||||
#xmodmap -e "add Lock = Shift_L + Shift_R"
 | 
			
		||||
 | 
			
		||||
# toggle keyboard language de, us with alt+shift
 | 
			
		||||
setxkbmap -option grp:alt_space_toggle de,us
 | 
			
		||||
 | 
			
		||||
#xmodmap -e "add Control = Caps_Lock"
 | 
			
		||||
#xmodmap -e "add Lock = Shift_L+Shift_R"
 | 
			
		||||
#remove Control = Control_L
 | 
			
		||||
#keysym Control_L = Caps_Lock
 | 
			
		||||
#keysym Caps_Lock = Control_L
 | 
			
		||||
#add Lock = Caps_Lock
 | 
			
		||||
 | 
			
		||||
# enable touchpad tap-to-click
 | 
			
		||||
#xinput set-prop 12 276 1
 | 
			
		||||
$HOME/.dotfiles/scripts/touchpad_enable_tapping.sh
 | 
			
		||||
# set default mouse cursor (no X)
 | 
			
		||||
xsetroot -cursor_name left_ptr
 | 
			
		||||
 | 
			
		||||
# move/resize window with alt + mouse
 | 
			
		||||
bspc config pointer_modifier mod1
 | 
			
		||||
 | 
			
		||||
# compton (effects)
 | 
			
		||||
compton --config ~/.config/bspwm/compton.conf -b &
 | 
			
		||||
 | 
			
		||||
# autolock after 5 min
 | 
			
		||||
xautolock -time 5 -locker '~/.dotfiles/scripts/lock.sh' &
 | 
			
		||||
 | 
			
		||||
# panel
 | 
			
		||||
polybar top &
 | 
			
		||||
polybar bottom &
 | 
			
		||||
 | 
			
		||||
# autostart
 | 
			
		||||
$HOME/.dotfiles/scripts/autostart.sh &
 | 
			
		||||
							
								
								
									
										71
									
								
								config/bspwm/compton.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,71 @@
 | 
			
		||||
backend = "glx";
 | 
			
		||||
glx-no-stencil = true;
 | 
			
		||||
glx-copy-from-front = false;
 | 
			
		||||
glx-swap-method = 1;
 | 
			
		||||
##blur-background = true;
 | 
			
		||||
##blur-kern = "7x7box";
 | 
			
		||||
 | 
			
		||||
# Shadow
 | 
			
		||||
shadow = true;			# Enabled client-side shadows on windows.
 | 
			
		||||
no-dock-shadow = true;		# Avoid drawing shadows on dock/panel windows.
 | 
			
		||||
no-dnd-shadow = true;		# Don't draw shadows on DND windows.
 | 
			
		||||
clear-shadow = true;		# Zero the part of the shadow's mask behind the window (experimental).
 | 
			
		||||
shadow-radius = 2;		# The blur radius for shadows. (default 12)
 | 
			
		||||
shadow-offset-x = 1;		# The left offset for shadows. (default -15)
 | 
			
		||||
shadow-offset-y = 1;		# The top offset for shadows. (default -15)
 | 
			
		||||
shadow-opacity = 0.6;
 | 
			
		||||
menu-opacity = 1;
 | 
			
		||||
shadow-exclude = [
 | 
			
		||||
 #"! name~=''",
 | 
			
		||||
 "n:e:Notification",
 | 
			
		||||
 "n:e:Dunst",
 | 
			
		||||
 "n:e:dzen",
 | 
			
		||||
 "name = 'dzen slave'",
 | 
			
		||||
 "name = 'gnome-screenshot'",
 | 
			
		||||
 #"n:e:Docky",
 | 
			
		||||
 #"g:e:Synapse",
 | 
			
		||||
 #"g:e:Kupfer",
 | 
			
		||||
 "g:e:Conky",
 | 
			
		||||
 #"n:w:Firefox",
 | 
			
		||||
 "n:w:*Chrome*",
 | 
			
		||||
 #"n:w:*Chromium*",
 | 
			
		||||
 "class_g ?= 'dzen'",
 | 
			
		||||
 "class_g ?= 'gnome-screenshot'",
 | 
			
		||||
 "class_g ?= 'Notify-osd'"
 | 
			
		||||
 #"class_g ?= 'Cairo-dock'",
 | 
			
		||||
 #"class_g ?= 'Xfce4-notifyd'",
 | 
			
		||||
 #"class_g ?= 'Xfce4-power-manager'"
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
blur-background-exclude = [
 | 
			
		||||
 "name = 'gnome-screenshot'",
 | 
			
		||||
 "class_g ?= 'gnome-screenshot'"
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
#opacity-rule = ["85:class_g = 'gnome-terminal'"];
 | 
			
		||||
opacity-rule = [
 | 
			
		||||
	"50:class_g = 'Bspwm' && class_i = 'presel_feedback'",
 | 
			
		||||
	"75:class_g = 'URxvt'"
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
# The shadow exclude options are helpful if you have shadows enabled. Due to the way compton draws its shadows, certain applications will have visual glitches
 | 
			
		||||
# (most applications are fine, only apps that do weird things with xshapes or argb are affected).
 | 
			
		||||
# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher.
 | 
			
		||||
 | 
			
		||||
# Fading
 | 
			
		||||
fading = true; # Fade windows during opacity changes.
 | 
			
		||||
fade-delta = 4; # The time between steps in a fade in milliseconds. (default 10).
 | 
			
		||||
fade-in-step = 0.03; # Opacity change between steps while fading in. (default 0.028).
 | 
			
		||||
fade-out-step = 0.03; # Opacity change between steps while fading out. (default 0.03).
 | 
			
		||||
no-fading-openclose = false; # Fade windows in/out when opening/closing
 | 
			
		||||
 | 
			
		||||
detect-client-opacity = true; # This prevents opacity being ignored for some apps. For example without this enabled my xfce4-notifyd is 100% opacity no matter what.
 | 
			
		||||
 | 
			
		||||
#Window type settings
 | 
			
		||||
wintypes:
 | 
			
		||||
{
 | 
			
		||||
  tooltip = { fade = true; shadow = false; };
 | 
			
		||||
  menu = { shadow = false; };
 | 
			
		||||
  dropdown_menu = { shadow = false; };
 | 
			
		||||
  popup_menu =  { shadow = false; };
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										163
									
								
								config/i3/config
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,163 @@
 | 
			
		||||
# This file has been auto-generated by i3-config-wizard(1).
 | 
			
		||||
# It will not be overwritten, so edit it as you like.
 | 
			
		||||
#
 | 
			
		||||
# Should you change your keyboard layout some time, delete
 | 
			
		||||
# this file and re-run i3-config-wizard(1).
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# i3 config file (v4)
 | 
			
		||||
#
 | 
			
		||||
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
 | 
			
		||||
 | 
			
		||||
set $mod Mod4
 | 
			
		||||
 | 
			
		||||
# Font for window titles. Will also be used by the bar unless a different font
 | 
			
		||||
# is used in the bar {} block below.
 | 
			
		||||
font pango:monospace 8
 | 
			
		||||
 | 
			
		||||
# This font is widely installed, provides lots of unicode glyphs, right-to-left
 | 
			
		||||
# text rendering and scalability on retina/hidpi displays (thanks to pango).
 | 
			
		||||
#font pango:DejaVu Sas Mono 8
 | 
			
		||||
font pango:DejaVu Sas Mono 8
 | 
			
		||||
 | 
			
		||||
# Before i3 v4.8, we used to recommend this one as the default:
 | 
			
		||||
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
 | 
			
		||||
# The font above is very space-efficient, that is, it looks good, sharp and
 | 
			
		||||
# clear in small sizes. However, its unicode glyph coverage is limited, the old
 | 
			
		||||
# X core fonts rendering does not support right-to-left and this being a bitmap
 | 
			
		||||
# font, it doesn’t scale on retina/hidpi displays.
 | 
			
		||||
 | 
			
		||||
# Use Mouse+$mod to drag floating windows to their wanted position
 | 
			
		||||
floating_modifier $mod
 | 
			
		||||
 | 
			
		||||
# start a terminal
 | 
			
		||||
#bindsym $mod+Return exec i3-sensible-terminal
 | 
			
		||||
bindsym $mod+Return exec gnome-terminal
 | 
			
		||||
 | 
			
		||||
# kill focused window
 | 
			
		||||
bindsym $mod+Shift+q kill
 | 
			
		||||
 | 
			
		||||
# start dmenu (a program launcher)
 | 
			
		||||
###bindsym $mod+d exec dmenu_run
 | 
			
		||||
bindsym $mod+d exec rofi -show run
 | 
			
		||||
# There also is the (new) i3-dmenu-desktop which only displays applications
 | 
			
		||||
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
 | 
			
		||||
# installed.
 | 
			
		||||
#bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
 | 
			
		||||
 | 
			
		||||
# change focus
 | 
			
		||||
#bindsym $mod+j focus left
 | 
			
		||||
#bindsym $mod+k focus down
 | 
			
		||||
#bindsym $mod+l focus up
 | 
			
		||||
#bindsym $mod+odiaeresis focus right
 | 
			
		||||
bindsym $mod+j focus down
 | 
			
		||||
bindsym $mod+k focus up
 | 
			
		||||
bindsym $mod+l focus right
 | 
			
		||||
bindsym $mod+h focus left
 | 
			
		||||
 | 
			
		||||
# alternatively, you can use the cursor keys:
 | 
			
		||||
bindsym $mod+Left focus left
 | 
			
		||||
bindsym $mod+Down focus down
 | 
			
		||||
bindsym $mod+Up focus up
 | 
			
		||||
bindsym $mod+Right focus right
 | 
			
		||||
 | 
			
		||||
# move focused window
 | 
			
		||||
bindsym $mod+Shift+j move down
 | 
			
		||||
bindsym $mod+Shift+k move up
 | 
			
		||||
bindsym $mod+Shift+l move right
 | 
			
		||||
bindsym $mod+Shift+h move left
 | 
			
		||||
 | 
			
		||||
# alternatively, you can use the cursor keys:
 | 
			
		||||
bindsym $mod+Shift+Left move left
 | 
			
		||||
bindsym $mod+Shift+Down move down
 | 
			
		||||
bindsym $mod+Shift+Up move up
 | 
			
		||||
bindsym $mod+Shift+Right move right
 | 
			
		||||
 | 
			
		||||
# split in horizontal orientation
 | 
			
		||||
bindsym $mod+minus split h
 | 
			
		||||
 | 
			
		||||
# split in vertical orientation
 | 
			
		||||
bindsym $mod+v split v
 | 
			
		||||
 | 
			
		||||
# enter fullscreen mode for the focused container
 | 
			
		||||
bindsym $mod+f fullscreen toggle
 | 
			
		||||
 | 
			
		||||
# change container layout (stacked, tabbed, toggle split)
 | 
			
		||||
bindsym $mod+s layout stacking
 | 
			
		||||
bindsym $mod+w layout tabbed
 | 
			
		||||
bindsym $mod+e layout toggle split
 | 
			
		||||
 | 
			
		||||
# toggle tiling / floating
 | 
			
		||||
bindsym $mod+Shift+space floating toggle
 | 
			
		||||
 | 
			
		||||
# change focus between tiling / floating windows
 | 
			
		||||
bindsym $mod+space focus mode_toggle
 | 
			
		||||
 | 
			
		||||
# focus the parent container
 | 
			
		||||
bindsym $mod+a focus parent
 | 
			
		||||
 | 
			
		||||
# focus the child container
 | 
			
		||||
#bindsym $mod+d focus child
 | 
			
		||||
 | 
			
		||||
# switch to workspace
 | 
			
		||||
bindsym $mod+1 workspace 1
 | 
			
		||||
bindsym $mod+2 workspace 2
 | 
			
		||||
bindsym $mod+3 workspace 3
 | 
			
		||||
bindsym $mod+4 workspace 4
 | 
			
		||||
bindsym $mod+5 workspace 5
 | 
			
		||||
bindsym $mod+6 workspace 6
 | 
			
		||||
bindsym $mod+7 workspace 7
 | 
			
		||||
bindsym $mod+8 workspace 8
 | 
			
		||||
bindsym $mod+9 workspace 9
 | 
			
		||||
bindsym $mod+0 workspace 10
 | 
			
		||||
 | 
			
		||||
# move focused container to workspace
 | 
			
		||||
bindsym $mod+Shift+1 move container to workspace 1
 | 
			
		||||
bindsym $mod+Shift+2 move container to workspace 2
 | 
			
		||||
bindsym $mod+Shift+3 move container to workspace 3
 | 
			
		||||
bindsym $mod+Shift+4 move container to workspace 4
 | 
			
		||||
bindsym $mod+Shift+5 move container to workspace 5
 | 
			
		||||
bindsym $mod+Shift+6 move container to workspace 6
 | 
			
		||||
bindsym $mod+Shift+7 move container to workspace 7
 | 
			
		||||
bindsym $mod+Shift+8 move container to workspace 8
 | 
			
		||||
bindsym $mod+Shift+9 move container to workspace 9
 | 
			
		||||
bindsym $mod+Shift+0 move container to workspace 10
 | 
			
		||||
 | 
			
		||||
# reload the configuration file
 | 
			
		||||
bindsym $mod+Shift+c reload
 | 
			
		||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
 | 
			
		||||
bindsym $mod+Shift+r restart
 | 
			
		||||
# exit i3 (logs you out of your X session)
 | 
			
		||||
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
 | 
			
		||||
 | 
			
		||||
# resize window (you can also use the mouse for that)
 | 
			
		||||
mode "resize" {
 | 
			
		||||
        # These bindings trigger as soon as you enter the resize mode
 | 
			
		||||
 | 
			
		||||
        # Pressing left will shrink the window’s width.
 | 
			
		||||
        # Pressing right will grow the window’s width.
 | 
			
		||||
        # Pressing up will shrink the window’s height.
 | 
			
		||||
        # Pressing down will grow the window’s height.
 | 
			
		||||
        bindsym h resize shrink width 10 px or 10 ppt
 | 
			
		||||
        bindsym j resize grow height 10 px or 10 ppt
 | 
			
		||||
        bindsym k resize shrink height 10 px or 10 ppt
 | 
			
		||||
        bindsym l resize grow width 10 px or 10 ppt
 | 
			
		||||
 | 
			
		||||
        # same bindings, but for the arrow keys
 | 
			
		||||
        bindsym Left resize shrink width 10 px or 10 ppt
 | 
			
		||||
        bindsym Down resize grow height 10 px or 10 ppt
 | 
			
		||||
        bindsym Up resize shrink height 10 px or 10 ppt
 | 
			
		||||
        bindsym Right resize grow width 10 px or 10 ppt
 | 
			
		||||
 | 
			
		||||
        # back to normal: Enter or Escape
 | 
			
		||||
        bindsym Return mode "default"
 | 
			
		||||
        bindsym Escape mode "default"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bindsym $mod+r mode "resize"
 | 
			
		||||
 | 
			
		||||
# Start i3bar to display a workspace bar (plus the system information i3status
 | 
			
		||||
# finds out, if available)
 | 
			
		||||
bar {
 | 
			
		||||
        status_command i3status
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										85
									
								
								config/lemonbar/i3_lemonbar.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,85 @@
 | 
			
		||||
#! /bin/bash
 | 
			
		||||
#
 | 
			
		||||
# I3 bar with https://github.com/LemonBoy/bar
 | 
			
		||||
 | 
			
		||||
. $(dirname $0)/i3_lemonbar_config
 | 
			
		||||
 | 
			
		||||
if [ $(pgrep -cx $(basename $0)) -gt 1 ] ; then
 | 
			
		||||
    printf "%s\n" "The status bar is already running." >&2
 | 
			
		||||
    exit 1
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
trap 'trap - TERM; kill 0' INT TERM QUIT EXIT
 | 
			
		||||
 | 
			
		||||
[ -e "${panel_fifo}" ] && rm "${panel_fifo}"
 | 
			
		||||
mkfifo "${panel_fifo}"
 | 
			
		||||
 | 
			
		||||
# echo "=== Starting up bar at $(date +%c)" >> bar.log
 | 
			
		||||
 | 
			
		||||
### EVENTS METERS
 | 
			
		||||
 | 
			
		||||
# Window title, "WIN"
 | 
			
		||||
xprop -spy -root _NET_ACTIVE_WINDOW | sed -un 's/.*\(0x.*\)/WIN\1/p' > "${panel_fifo}" &
 | 
			
		||||
 | 
			
		||||
# i3 Workspaces, "WSP"
 | 
			
		||||
$(dirname $0)/i3_workspaces.py > ${panel_fifo} &
 | 
			
		||||
 | 
			
		||||
# IRC, "IRC"
 | 
			
		||||
# only for init
 | 
			
		||||
# ~/bin/irc_warn &
 | 
			
		||||
 | 
			
		||||
# Conky, "SYS"
 | 
			
		||||
conky -c $(dirname $0)/i3_lemonbar_conky > "${panel_fifo}" &
 | 
			
		||||
 | 
			
		||||
### UPDATE INTERVAL METERS
 | 
			
		||||
cnt_vol=${upd_vol}
 | 
			
		||||
cnt_mail=${upd_mail}
 | 
			
		||||
cnt_mpd=${upd_mpd}
 | 
			
		||||
cnt_bat=${upd_bat}
 | 
			
		||||
cnt_win=${upd_win}
 | 
			
		||||
 | 
			
		||||
while :; do
 | 
			
		||||
 | 
			
		||||
  # Volume, "VOL"
 | 
			
		||||
  if [ $((cnt_vol++)) -ge ${upd_vol} ]; then
 | 
			
		||||
    echo "VOL$(alsa-status)" > "${panel_fifo}" &
 | 
			
		||||
    cnt_vol=0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # GMAIL, "GMA"
 | 
			
		||||
  # if [ $((cnt_mail++)) -ge ${upd_mail} ]; then
 | 
			
		||||
  #   printf "%s%s\n" "GMA" "$(~/bin/gmail.sh)" > "${panel_fifo}"
 | 
			
		||||
  #   cnt_mail=0
 | 
			
		||||
  # fi
 | 
			
		||||
 | 
			
		||||
  # MPD
 | 
			
		||||
  if [ $((cnt_mpd++)) -ge ${upd_mpd} ]; then
 | 
			
		||||
    #printf "%s%s\n" "MPD" "$(ncmpcpp --now-playing '{%a - %t}|{%f}' | head -c 60)" > "${panel_fifo}"
 | 
			
		||||
    printf "%s%s\n" "MPD" "$(mpc current -f '[[%artist% - ]%title%]|[%file%]' 2>&1 | head -c 70)" > "${panel_fifo}"
 | 
			
		||||
    cnt_mpd=0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # Battey, "BAT"
 | 
			
		||||
  if [ $((cnt_bat++)) -ge ${upd_bat} ]; then
 | 
			
		||||
    echo "$(batstat)" > "${panel_fifo}" &
 | 
			
		||||
    cnt_bat=0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # Periodic Window title update (Ticket #1)
 | 
			
		||||
  if [ $((cnt_win++)) -ge ${upd_win} ]; then
 | 
			
		||||
    echo "WIN`mywin`" > "${panel_fifo}" &
 | 
			
		||||
    cnt_win=0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # Finally, wait 1 second
 | 
			
		||||
  sleep 1s;
 | 
			
		||||
 | 
			
		||||
done &
 | 
			
		||||
 | 
			
		||||
#### LOOP FIFO
 | 
			
		||||
 | 
			
		||||
cat "${panel_fifo}" | $(dirname $0)/i3_lemonbar_parser.sh \
 | 
			
		||||
  | bar -p -f "${font}" -f "${iconfont}" -f "${plfont}" -g "${geometry}" -B "${color_back}" -F "${color_fore}" &
 | 
			
		||||
 | 
			
		||||
wait
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										132
									
								
								config/lemonbar/i3_lemonbar_config
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,132 @@
 | 
			
		||||
#!\bin\bash
 | 
			
		||||
# i3 panel config. Powerline style.
 | 
			
		||||
 | 
			
		||||
panel_fifo="/tmp/i3_lemonbar_${USER}"
 | 
			
		||||
geometry="x14"
 | 
			
		||||
#font="-xos4-terminesspowerline-medium-r-normal--12-120-72-72-c-60-iso10646-1"
 | 
			
		||||
#font="--powerlinesymbols-medium-----------"
 | 
			
		||||
iconfont="-wuncon-siji-medium-r-normal--10-100-75-75-c-80-iso10646-1"
 | 
			
		||||
res_w=$(xrandr | grep "current" | awk '{print $8a}')
 | 
			
		||||
 | 
			
		||||
# Alarm settings
 | 
			
		||||
cpu_alert=75                        # % cpu use
 | 
			
		||||
net_alert=5                         # K net use
 | 
			
		||||
 | 
			
		||||
# update setting, in seconds (conky update in i3_lemonbar_conky
 | 
			
		||||
upd_vol=3                           # Volume update
 | 
			
		||||
upd_mail=300                        # Mail check update
 | 
			
		||||
upd_mpd=5                           # MPD song update
 | 
			
		||||
upd_bat=5                           # Battey update
 | 
			
		||||
upd_win=1                           # Window title (xprop -spy only updates on focus change)
 | 
			
		||||
 | 
			
		||||
# --- APPLY XRES BEGIN
 | 
			
		||||
c_red_l="#ffCC6666"
 | 
			
		||||
c_green_l="#ffBDE077"
 | 
			
		||||
c_cyan_d="#ff72AD8C"
 | 
			
		||||
c_cursor="#fffff000"
 | 
			
		||||
c_yellow_d="#ffFEA63C"
 | 
			
		||||
c_green_d="#ffB7CE42"
 | 
			
		||||
c_yellow_l="#ffFFE863"
 | 
			
		||||
c_foreground="#ffddeedd"
 | 
			
		||||
c_blue_l="#ffAACCBB"
 | 
			
		||||
c_magenta_l="#ffff5879"
 | 
			
		||||
c_black_d="#ff25374A"
 | 
			
		||||
c_background="#ff131D24"
 | 
			
		||||
c_magenta_d="#ffF26B9E"
 | 
			
		||||
c_black_l="#ff3A526B"
 | 
			
		||||
c_blue_d="#ff66AABB"
 | 
			
		||||
c_white_l="#ffFFFFFF"
 | 
			
		||||
c_cyan_l="#ff9FE3BC"
 | 
			
		||||
c_red_d="#ffBD4A4A"
 | 
			
		||||
c_white_d="#ffDDEEDD"
 | 
			
		||||
# --- APPLY XRES END
 | 
			
		||||
 | 
			
		||||
# color definitions 
 | 
			
		||||
color_back="$c_background"              # Default background
 | 
			
		||||
color_fore="$c_white_l"              # Default foreground
 | 
			
		||||
color_head="$c_yellow_d"              # Background for unselected workspaces
 | 
			
		||||
color_wsp="$c_yellow_l"               # Background for selected workspace
 | 
			
		||||
color_sec_b1="$c_black_d"            # Background for section 1
 | 
			
		||||
color_sec_b2="$c_black_l"            # Background for section 2
 | 
			
		||||
color_sec_b3="$c_white_d"            # Background for section 3
 | 
			
		||||
color_icon="$c_white_d"              # For icons
 | 
			
		||||
color_mail="$c_magenta_l"              # Background color for mail alert
 | 
			
		||||
color_chat="$c_magenta_l"              # Background color for chat alert
 | 
			
		||||
color_cpu="$c_magenta_l"               # Background color for cpu alert
 | 
			
		||||
color_net="$c_white_l"               # Background color for net alert
 | 
			
		||||
color_disable="$c_black_l"           # Foreground for disable elements
 | 
			
		||||
color_clock="$c_yellow_d"             # Color for clock
 | 
			
		||||
color_clock_edge="$c_yellow_l"             # Color for clock
 | 
			
		||||
 | 
			
		||||
color_success="$c_green_d"           # Positive color for good times
 | 
			
		||||
color_warning="$c_yellow_l"           # Yellow color for warnings (eg, low battery)
 | 
			
		||||
color_critical="$c_magenta_l"          # Red color for critical meters
 | 
			
		||||
 | 
			
		||||
#default space between sections
 | 
			
		||||
if [ ${res_w} -gt 1024 ]; then
 | 
			
		||||
  stab='  '
 | 
			
		||||
else
 | 
			
		||||
  stab=' '
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Char glyps for powerline fonts
 | 
			
		||||
sep_left=""                        # Powerline separator left
 | 
			
		||||
sep_right=""                       # Powerline separator right
 | 
			
		||||
sep_l_left=""                      # Powerline light separator left
 | 
			
		||||
sep_l_right=""                     # Powerline light sepatator right
 | 
			
		||||
 | 
			
		||||
# Icon glyphs from Terminusicons2
 | 
			
		||||
# icon_clock="Õ"                      # Clock icon
 | 
			
		||||
# icon_cpu="Ï"                        # CPU icon
 | 
			
		||||
# icon_mem="Þ"                        # MEM icon
 | 
			
		||||
# icon_dl="Ð"                         # Download icon
 | 
			
		||||
# icon_ul="Ñ"                         # Upload icon
 | 
			
		||||
# icon_vol="Ô"                        # Volume icon
 | 
			
		||||
# icon_hd="À"                         # HD / icon
 | 
			
		||||
# icon_home="Æ"                       # HD /home icon
 | 
			
		||||
# icon_mail="Ó"                       # Mail icon
 | 
			
		||||
# icon_chat="Ò"                       # IRC/Chat icon
 | 
			
		||||
# icon_music="Î"                      # Music icon
 | 
			
		||||
# icon_prog="Â"                       # Window icon
 | 
			
		||||
# icon_contact="Á"                    # Contact icon
 | 
			
		||||
# icon_wsp="Ç"                        # Workspace icon
 | 
			
		||||
# icon_battery=""                    # Battery icon
 | 
			
		||||
# icon_charging="+"                   # Charging icon
 | 
			
		||||
 | 
			
		||||
# Icon glyphs from Siji
 | 
			
		||||
icon_clock=""                      # Clock icon
 | 
			
		||||
icon_cpu=""                        # CPU icon
 | 
			
		||||
icon_mem=""                        # MEM icon
 | 
			
		||||
icon_dl=""                         # Download icon
 | 
			
		||||
icon_ul=""                         # Upload icon
 | 
			
		||||
icon_vol=""                        # Volume icon
 | 
			
		||||
icon_mute=""
 | 
			
		||||
icon_hd="À"                         # HD / icon
 | 
			
		||||
icon_home="Æ"                       # HD /home icon
 | 
			
		||||
icon_mail="Ó"                       # Mail icon
 | 
			
		||||
icon_chat="Ò"                       # IRC/Chat icon
 | 
			
		||||
icon_music=""                      # Music icon
 | 
			
		||||
icon_music_playing=""
 | 
			
		||||
icon_music_paused=""
 | 
			
		||||
icon_prog=""                       # Window icon
 | 
			
		||||
icon_contact="Á"                    # Contact icon
 | 
			
		||||
icon_wsp=""                        # Workspace icon
 | 
			
		||||
icon_battery="         "
 | 
			
		||||
icon_charging=""
 | 
			
		||||
 | 
			
		||||
# Ionicon glyphs
 | 
			
		||||
# icon_battery=""                      # Battery icon (half-ish full)
 | 
			
		||||
# icon_clock=""                        # Clock icon
 | 
			
		||||
# icon_cpu="?"                          # CPU icon
 | 
			
		||||
# icon_globe=""                        # Globe icon
 | 
			
		||||
# icon_home=""                         # Home icon (also linux)
 | 
			
		||||
# icon_laptop=""                       # Laptop icon
 | 
			
		||||
# icon_linux=""                        # Linux (Tux) icon
 | 
			
		||||
# icon_mail=""                         # Email icon
 | 
			
		||||
# icon_mem="?"                          # Memory icon
 | 
			
		||||
# icon_music=""                        # Music icon
 | 
			
		||||
# icon_paw=""                          # Paw icon
 | 
			
		||||
# icon_prog=""                         # Window icon
 | 
			
		||||
# icon_shell=""                        # Shell icon
 | 
			
		||||
# icon_vol=""                          # Volume icon
 | 
			
		||||
# icon_wsp=""                          # Workspace icon (paw duplicate for now)
 | 
			
		||||
							
								
								
									
										23
									
								
								config/lemonbar/i3_lemonbar_conky
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,23 @@
 | 
			
		||||
conky.config = {
 | 
			
		||||
 background = false,
 | 
			
		||||
 update_interval = 2,
 | 
			
		||||
 total_run_times = 0,
 | 
			
		||||
 override_utf8_locale = true,
 | 
			
		||||
 short_units = true,
 | 
			
		||||
 uppercase = false,
 | 
			
		||||
 out_to_console = true,
 | 
			
		||||
 out_to_x = false,
 | 
			
		||||
 if_up_strictness = 'address',
 | 
			
		||||
 format_human_readable = true
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
conky.text = [[
 | 
			
		||||
SYS\
 | 
			
		||||
${time %a %d %b %I:%M%p} \
 | 
			
		||||
${cpu} \
 | 
			
		||||
${mem} \
 | 
			
		||||
${fs_used_perc /} \
 | 
			
		||||
${fs_used_perc /home} \
 | 
			
		||||
${if_up wlp9s0}${downspeedf wlp2s0} ${upspeedf wlp2s0} \
 | 
			
		||||
${else} down down ${endif}\
 | 
			
		||||
]]
 | 
			
		||||
							
								
								
									
										219
									
								
								config/lemonbar/i3_lemonbar_parser.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,219 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
#
 | 
			
		||||
# Input parser for i3 bar
 | 
			
		||||
# 14 ago 2015 - Electro7
 | 
			
		||||
 | 
			
		||||
# config
 | 
			
		||||
. $(dirname $0)/i3_lemonbar_config
 | 
			
		||||
 | 
			
		||||
# min init
 | 
			
		||||
irc_n_high=0
 | 
			
		||||
title="%{F${color_head} B${color_sec_b2}}${sep_right}%{F${color_head} B${color_sec_b2}%{T2} ${icon_prog} %{F${color_sec_b2} B-}${sep_right}%{F- B- T1}"
 | 
			
		||||
 | 
			
		||||
# parser
 | 
			
		||||
while read -r line ; do
 | 
			
		||||
  case $line in
 | 
			
		||||
    SYS*)
 | 
			
		||||
      # conky=, 0 = wday, 1 = mday, 2 = month, 3 = time, 4 = cpu, 5 = mem, 6 = disk /, 7 = disk /home, 8-9 = up/down wlan, 10-11 = up/down eth, 12-13=speed
 | 
			
		||||
      sys_arr=(${line#???})
 | 
			
		||||
 | 
			
		||||
      # date
 | 
			
		||||
      if [ ${res_w} -gt 1024 ]; then
 | 
			
		||||
        date="${sys_arr[0]} ${sys_arr[1]} ${sys_arr[2]}"
 | 
			
		||||
      else
 | 
			
		||||
        date="${sys_arr[1]} ${sys_arr[2]}"
 | 
			
		||||
      fi
 | 
			
		||||
      date="%{F${color_sec_b1}}${sep_left}%{F${color_icon} B${color_sec_b1}} %{T2}${icon_clock}%{F- T1} ${date}"
 | 
			
		||||
 | 
			
		||||
      # time
 | 
			
		||||
      time="%{F${color_clock_edge}}${sep_left}%{F${color_clock} B${color_clock_edge}}${sep_left}%{F${color_back} B${color_clock}} ${sys_arr[3]} %{F- B-}"
 | 
			
		||||
 | 
			
		||||
      # cpu
 | 
			
		||||
      if [ ${sys_arr[4]} -gt ${cpu_alert} ]; then
 | 
			
		||||
        cpu_cback=${color_cpu}; cpu_cicon=${color_back}; cpu_cfore=${color_back};
 | 
			
		||||
      else
 | 
			
		||||
        cpu_cback=${color_sec_b2}; cpu_cicon=${color_icon}; cpu_cfore=${color_fore};
 | 
			
		||||
      fi
 | 
			
		||||
      cpu="%{F${cpu_cback}}${sep_left}%{F${cpu_cicon} B${cpu_cback}} %{T2}${icon_cpu}%{F${cpu_cfore} T1} ${sys_arr[4]}%%"
 | 
			
		||||
 | 
			
		||||
      # mem
 | 
			
		||||
      mem="%{F${cpu_cicon}}${sep_l_left} %{T2}${icon_mem}%{F${cpu_cfore} T1} ${sys_arr[5]}"
 | 
			
		||||
 | 
			
		||||
      # disk /
 | 
			
		||||
      # diskr="%{F${color_sec_b1}}${sep_left}%{F${color_icon} B${color_sec_b1}} %{T2}${icon_hd}%{F- T1} ${sys_arr[6]}%%"
 | 
			
		||||
 | 
			
		||||
      # disk home
 | 
			
		||||
      # diskh="%{F${color_icon}}${sep_l_left} %{T2}${icon_home}%{F- T1} ${sys_arr[7]}%%"
 | 
			
		||||
 | 
			
		||||
      # wlan
 | 
			
		||||
      if [ "${sys_arr[8]}" == "down" ]; then
 | 
			
		||||
        wland_v="×"; wlanu_v="×";
 | 
			
		||||
        wlan_cback=${color_sec_b2}; wlan_cicon=${color_sec_b3}; wlan_cfore=${color_sec_b3};
 | 
			
		||||
      else
 | 
			
		||||
        wland_v=${sys_arr[8]}K; wlanu_v=${sys_arr[9]}K;
 | 
			
		||||
        if [ ${wland_v:0:-3} -gt ${net_alert} ] || [ ${wlanu_v:0:-3} -gt ${net_alert} ]; then
 | 
			
		||||
          wlan_cback=${color_net}; wlan_cicon=${color_back}; wlan_cfore=${color_back};
 | 
			
		||||
        else
 | 
			
		||||
          wlan_cback=${color_sec_b2}; wlan_cicon=${color_icon}; wlan_cfore=${color_fore};
 | 
			
		||||
        fi
 | 
			
		||||
      fi
 | 
			
		||||
      wland="%{F${wlan_cback}}${sep_left}%{F${wlan_cicon} B${wlan_cback}} %{T2}${icon_dl}%{F${wlan_cfore} T1} ${wland_v}"
 | 
			
		||||
      wlanu="%{F${wlan_cicon}}${sep_l_left} %{T2}${icon_ul}%{F${wlan_cfore} T1} ${wlanu_v}"
 | 
			
		||||
 | 
			
		||||
      # eth
 | 
			
		||||
      # if [ "${sys_arr[10]}" == "down" ]; then
 | 
			
		||||
      #   ethd_v="×"; ethu_v="×";
 | 
			
		||||
      #   eth_cback=${color_sec_b1}; eth_cicon=${color_disable}; eth_cfore=${color_disable};
 | 
			
		||||
      # else
 | 
			
		||||
      #   ethd_v=${sys_arr[10]}K; ethu_v=${sys_arr[11]}K;
 | 
			
		||||
      #   if [ ${ethd_v:0:-3} -gt ${net_alert} ] || [ ${ethu_v:0:-3} -gt ${net_alert} ]; then
 | 
			
		||||
      #     eth_cback=${color_net}; eth_cicon=${color_back}; eth_cfore=${color_back};
 | 
			
		||||
      #   else
 | 
			
		||||
      #     eth_cback=${color_sec_b1}; eth_cicon=${color_icon}; eth_cfore=${color_fore};
 | 
			
		||||
      #   fi
 | 
			
		||||
      # fi
 | 
			
		||||
      # ethd="%{F${eth_cback}}${sep_left}%{F${eth_cicon} B${eth_cback}} %{T2}${icon_dl}%{F${eth_cfore} T1} ${ethd_v}"
 | 
			
		||||
      # ethu="%{F${eth_cicon}}${sep_l_left} %{T2}${icon_ul}%{F${eth_cfore} T1} ${ethu_v}"
 | 
			
		||||
      ;;
 | 
			
		||||
 | 
			
		||||
    VOL*)
 | 
			
		||||
      # Volume:
 | 
			
		||||
      #   [0] Muted indicator: (M=Muted / (anything else)=Unmuted)
 | 
			
		||||
      #   [1] On/off (muted) status (1=Unmuted / 0=Muted)
 | 
			
		||||
      vol_arr=(${line#???})
 | 
			
		||||
      vol_bkg=$color_sec_b2
 | 
			
		||||
      vol_frg=$color_fore
 | 
			
		||||
      vol_ico=$icon_vol
 | 
			
		||||
      vol_txt=${vol_arr[1]}
 | 
			
		||||
      if [[ ${vol_arr[0]} == "M" ]]; then
 | 
			
		||||
        vol_bkg=$color_sec_b1
 | 
			
		||||
        vol_frg=$color_icon
 | 
			
		||||
        vol_ico=$icon_mute
 | 
			
		||||
      fi
 | 
			
		||||
      vol="%{F${vol_bkg}}${sep_left}%{F${color_icon} B${vol_bkg}} %{T2}${vol_ico}%{F${vol_frg} T1} $vol_txt%{F${color_fore}}"
 | 
			
		||||
      ;;
 | 
			
		||||
 | 
			
		||||
    GMA*)
 | 
			
		||||
      # Gmail
 | 
			
		||||
      gmail="${line#???}"
 | 
			
		||||
      if [ "${gmail}" != "0" ]; then
 | 
			
		||||
        mail_cback=${color_mail}; mail_cicon=${color_back}; mail_cfore=${color_back}
 | 
			
		||||
      else
 | 
			
		||||
        mail_cback=${color_sec_b1}; mail_cicon=${color_icon}; mail_cfore=${color_fore}
 | 
			
		||||
      fi
 | 
			
		||||
      gmail="%{F${mail_cback}}${sep_left}%{F${mail_cicon} B${mail_cback}} %{T2}${icon_mail}%{F${mail_cfore} T1} ${gmail}"
 | 
			
		||||
      ;;
 | 
			
		||||
 | 
			
		||||
    IRC*)
 | 
			
		||||
      # IRC highlight (script irc_warn)
 | 
			
		||||
      if [ "${line#???}" != "0" ]; then
 | 
			
		||||
        ((irc_n_high++)); irc_high="${line#???}";
 | 
			
		||||
        irc_cback=${color_chat}; irc_cicon=${color_back}; irc_cfore=${color_back}
 | 
			
		||||
      else
 | 
			
		||||
        irc_n_high=0; [ -z "${irc_high}" ] && irc_high="none";
 | 
			
		||||
        irc_cback=${color_sec_b2}; irc_cicon=${color_icon}; irc_cfore=${color_fore}
 | 
			
		||||
      fi
 | 
			
		||||
      irc="%{F${irc_cback}}${sep_left}%{F${irc_cicon} B${irc_cback}} %{T2}${icon_chat}%{F${irc_cfore} T1} ${irc_n_high} %{F${irc_cicon}}${sep_l_left} %{T2}${icon_contact}%{F${irc_cfore} T1} ${irc_high}"
 | 
			
		||||
      ;;
 | 
			
		||||
 | 
			
		||||
    MPD*)
 | 
			
		||||
      # Music
 | 
			
		||||
      mpd_arr=(${line#???})
 | 
			
		||||
      if [ -z "${line#???}" ]; then
 | 
			
		||||
        song="none";
 | 
			
		||||
      elif [ "${mpd_arr[1]}" == "error:" ]; then
 | 
			
		||||
        song="mpd off";
 | 
			
		||||
      else
 | 
			
		||||
        song="${line#???}";
 | 
			
		||||
      fi
 | 
			
		||||
      mpd="%{F${color_sec_b2}}${sep_left}%{B${color_sec_b2}}%{F${color_sec_b1}}${sep_left}%{F${color_icon} B${color_sec_b1}} %{T2}${icon_music}%{F${color_fore} T1}  ${song}"
 | 
			
		||||
      # echo "Setting music display to ${song}" >> bar.log
 | 
			
		||||
      ;;
 | 
			
		||||
 | 
			
		||||
    BAT*)
 | 
			
		||||
      # Battery readout:
 | 
			
		||||
      #   [0] = integer part
 | 
			
		||||
      #   [1] = charging status (D(ischarging), C(harging))
 | 
			
		||||
      #   [2] = power level (F(ull), N(ormal), L(ow), C(ritical))
 | 
			
		||||
      bat_arr=(${line#???})
 | 
			
		||||
      bat_icons=($icon_battery)
 | 
			
		||||
      ico="${bat_icons[$(((${bat_arr[0]}*(${#bat_icons[@]}-1))/100))]}"
 | 
			
		||||
      bkg="${color_sec_b1}"
 | 
			
		||||
      frg="${color_fore}"
 | 
			
		||||
 | 
			
		||||
      if [[ ${bat_arr[2]} == "L" ]]; then
 | 
			
		||||
        bkg="${color_warning}"
 | 
			
		||||
        frg="${color_back}"
 | 
			
		||||
      elif [[ ${bat_arr[2]} == "C" ]]; then
 | 
			
		||||
        bkg="${color_critical}"
 | 
			
		||||
        frg="${color_back}"
 | 
			
		||||
      elif [[ ${bat_arr[2]} == "F" ]]; then
 | 
			
		||||
        bkg="${c_green_d}"
 | 
			
		||||
        frg="${c_white_l}"
 | 
			
		||||
      fi
 | 
			
		||||
 | 
			
		||||
      batamt="%{F${bkg}}${sep_left}%{B${bkg}} %{F${frg}} ${ico} ${bat_arr[0]}%%"
 | 
			
		||||
 | 
			
		||||
      if [[ ${bat_arr[1]} == "C" ]]; then
 | 
			
		||||
        batamt="%{F${color_fore}}${sep_left}%{F${color_back} B${color_fore}}${icon_charging}${batamt}"
 | 
			
		||||
      fi
 | 
			
		||||
      ;;
 | 
			
		||||
 | 
			
		||||
    WSP*)
 | 
			
		||||
      # I3 Workspaces
 | 
			
		||||
      wsp="%{F${color_back} B${color_head}} %{T2}${icon_wsp}%{T1} "
 | 
			
		||||
      set -- ${line#???}
 | 
			
		||||
      while [ $# -gt 0 ] ; do
 | 
			
		||||
        case $1 in
 | 
			
		||||
         FOC*)
 | 
			
		||||
           wsp="${wsp}%{F${color_head} B${color_wsp}}${sep_right}%{F${color_back} B${color_wsp} T1} ${1##????} %{F${color_wsp} B${color_head}}${sep_right}"
 | 
			
		||||
           ;;
 | 
			
		||||
         INA*|URG*|ACT*)
 | 
			
		||||
           wsp="${wsp}%{F${color_back} T1} ${1##????} "
 | 
			
		||||
           ;;
 | 
			
		||||
        esac
 | 
			
		||||
        shift
 | 
			
		||||
      done
 | 
			
		||||
      ;;
 | 
			
		||||
      
 | 
			
		||||
    WIN*)
 | 
			
		||||
      # window title
 | 
			
		||||
      title=$(xprop -id ${line#???} | awk '/_NET_WM_NAME/{$1=$2="";print}' | cut -d'"' -f2)
 | 
			
		||||
      title="%{F${color_head} B${color_sec_b2} T1}${sep_right}%{F${color_icon} B${color_sec_b2} T2} ${icon_prog} %{F${color_sec_b2} B- T1}${sep_right}%{F- B- T1} ${title}"
 | 
			
		||||
      ;;
 | 
			
		||||
 | 
			
		||||
    WNM*)
 | 
			
		||||
      # Window title (string)
 | 
			
		||||
      title=$(echo ${line#???} | xargs)
 | 
			
		||||
      title="%{F${color_head} B${color_sec_b2} T1}${sep_right}%{F${color_icon} B${color_sec_b2} T2} ${icon_prog} %{F${color_sec_b2} B- T1}${sep_right}%{F- B- T1} ${title}"
 | 
			
		||||
      ;;
 | 
			
		||||
 | 
			
		||||
    VIS*)
 | 
			
		||||
      # Visual effects
 | 
			
		||||
      viscmds=(${line#???})
 | 
			
		||||
      ;;
 | 
			
		||||
 | 
			
		||||
    MSG*)
 | 
			
		||||
      viscmds=(`echo "fill ${color_sec_b2} ${color_fore}"`)
 | 
			
		||||
      msg=${line#???}
 | 
			
		||||
      ;;
 | 
			
		||||
 | 
			
		||||
    WRN*)
 | 
			
		||||
      viscmds=(`echo "fill ${color_warning} ${color_back}"`)
 | 
			
		||||
      msg=${line#???}
 | 
			
		||||
      ;;
 | 
			
		||||
 | 
			
		||||
    ALT*)
 | 
			
		||||
      viscmds=(`echo "fill ${color_critical} ${color_back}"`)
 | 
			
		||||
      msg=${line#???}
 | 
			
		||||
      ;;
 | 
			
		||||
      
 | 
			
		||||
  esac
 | 
			
		||||
 | 
			
		||||
  # And finally, output
 | 
			
		||||
  if [[ ${viscmds[0]} == "fill" ]]; then
 | 
			
		||||
    printf "%s\n" "%{l}%{B${viscmds[2]}}   %{B${viscmds[1]} F${viscmds[2]}}${sep_right} ${msg} %{r}%{B${viscmds[1]} F${viscmds[2]}}"
 | 
			
		||||
  else
 | 
			
		||||
    printf "%s\n" "%{l}${wsp}${title} %{r}${mpd}${stab}${wland}${stab}${wlanu}${stab}${vol}${stab}${cpu}${stab}${mem}${stab}${batamt}${stab}${date}${stab}${time}"
 | 
			
		||||
  fi
 | 
			
		||||
done
 | 
			
		||||
							
								
								
									
										138
									
								
								config/lemonbar/i3_workspaces.pl
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,138 @@
 | 
			
		||||
#!/usr/bin/env perl
 | 
			
		||||
# vim:ts=4:sw=4:expandtab:ft=perl
 | 
			
		||||
# 
 | 
			
		||||
# Print i3 workspaces on every change.
 | 
			
		||||
# 
 | 
			
		||||
# Format: 
 | 
			
		||||
#   For every workspace (x = workspace name)
 | 
			
		||||
#       - "FOCx" -> Focused workspace
 | 
			
		||||
#       - "INAx" -> Inactive workspace
 | 
			
		||||
#       - "ACTx" -> Ative workspace
 | 
			
		||||
#       - "URGx" -> Urgent workspace
 | 
			
		||||
#
 | 
			
		||||
# Uses AnyEvent I3 0.8 -> https://metacpan.org/module/AnyEvent::I3
 | 
			
		||||
# Based in i3-wsbar of Michael Stapelberg -> http://code.stapelberg.de/git/i3/tree/contrib/i3-wsbar
 | 
			
		||||
#
 | 
			
		||||
# 16 feb 2015 - Electro7
 | 
			
		||||
 | 
			
		||||
use strict;
 | 
			
		||||
use warnings;
 | 
			
		||||
use AnyEvent::I3;
 | 
			
		||||
use AnyEvent;
 | 
			
		||||
use v5.10;
 | 
			
		||||
 | 
			
		||||
my $socket_path = undef;
 | 
			
		||||
my ($workspaces, $outputs) = ([], {});
 | 
			
		||||
my $w = AnyEvent->timer(
 | 
			
		||||
    after => 3,
 | 
			
		||||
    cb => sub {
 | 
			
		||||
        die "Connection to i3 timed out. Verify socket path ($socket_path)";
 | 
			
		||||
        exit 1;
 | 
			
		||||
    }
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
my $i3 = i3($socket_path);
 | 
			
		||||
 | 
			
		||||
# Disable buffering
 | 
			
		||||
$| = 1;
 | 
			
		||||
STDERR->autoflush;
 | 
			
		||||
STDOUT->autoflush;
 | 
			
		||||
 | 
			
		||||
# Wait a short amount of time and try to connect to i3 again
 | 
			
		||||
sub reconnect {
 | 
			
		||||
    print "reconecting\n";
 | 
			
		||||
    my $timer;
 | 
			
		||||
    $i3 = i3($socket_path);
 | 
			
		||||
    if (!defined($w)) {
 | 
			
		||||
        $w = AnyEvent->timer(
 | 
			
		||||
            after => 3,
 | 
			
		||||
            cb => sub {
 | 
			
		||||
                die "Connection to i3 timed out. Verify socket path ($socket_path)";
 | 
			
		||||
                exit 1;
 | 
			
		||||
            }
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    my $c = sub {
 | 
			
		||||
        $timer = AnyEvent->timer(
 | 
			
		||||
            after => 0.01,
 | 
			
		||||
            cb => sub { $i3->connect->cb(\&connected) }
 | 
			
		||||
        );
 | 
			
		||||
    };
 | 
			
		||||
    $c->();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Connection attempt succeeded or failed
 | 
			
		||||
sub connected {
 | 
			
		||||
    my ($cv) = @_;
 | 
			
		||||
 | 
			
		||||
    if (!$cv->recv) {
 | 
			
		||||
        reconnect();
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    $w = undef;
 | 
			
		||||
 | 
			
		||||
    $i3->subscribe({
 | 
			
		||||
        workspace => \&ws_change,
 | 
			
		||||
        output => \&output_change,
 | 
			
		||||
        _error => sub { reconnect() }
 | 
			
		||||
    });
 | 
			
		||||
    ws_change();
 | 
			
		||||
    output_change();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Called when a ws changes
 | 
			
		||||
sub ws_change {
 | 
			
		||||
    # Request the current workspaces and update the output afterwards
 | 
			
		||||
    $i3->get_workspaces->cb(
 | 
			
		||||
        sub {
 | 
			
		||||
            my ($cv) = @_;
 | 
			
		||||
            $workspaces = $cv->recv;
 | 
			
		||||
            update_output();
 | 
			
		||||
        });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Called when the reply to the GET_OUTPUTS message arrives
 | 
			
		||||
sub got_outputs {
 | 
			
		||||
    my $reply = shift->recv;
 | 
			
		||||
    my %new = map { ($_->{name}, $_) } grep { $_->{active} } @{$reply};
 | 
			
		||||
 | 
			
		||||
    for my $name (keys %new) {
 | 
			
		||||
        $outputs->{$name} = $new{$name};
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    update_output();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub output_change {
 | 
			
		||||
    $i3->get_outputs->cb(\&got_outputs)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub update_output {
 | 
			
		||||
    my $out;
 | 
			
		||||
 | 
			
		||||
    for my $name (keys %{$outputs}) {
 | 
			
		||||
        $out .= "WSP";
 | 
			
		||||
 | 
			
		||||
        for my $ws (@{$workspaces}) {
 | 
			
		||||
            my $state = "INA";
 | 
			
		||||
            $state = "ACT" if $ws->{visible};
 | 
			
		||||
            $state = "URG" if $ws->{urgent};
 | 
			
		||||
            $state = "FOC" if $ws->{focused};
 | 
			
		||||
            my $name = $ws->{name};
 | 
			
		||||
            $out .= qq|$state$name |;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        $out .= "\n";
 | 
			
		||||
 | 
			
		||||
        print $out;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
$i3->connect->cb(\&connected);
 | 
			
		||||
 | 
			
		||||
# let AnyEvent do the rest ("endless loop")
 | 
			
		||||
AnyEvent->condvar->recv
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										102
									
								
								config/lemonbar/i3_workspaces.py
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,102 @@
 | 
			
		||||
#!/usr/bin/env python
 | 
			
		||||
# 
 | 
			
		||||
# Print i3 workspaces on every change.
 | 
			
		||||
# 
 | 
			
		||||
# Format: 
 | 
			
		||||
#   For every workspace (x = workspace name)
 | 
			
		||||
#       - "FOCx" -> Focused workspace
 | 
			
		||||
#       - "INAx" -> Inactive workspace
 | 
			
		||||
#       - "ACTx" -> Ative workspace
 | 
			
		||||
#       - "URGx" -> Urgent workspace
 | 
			
		||||
#
 | 
			
		||||
# Uses i3py.py -> https://github.com/ziberna/i3-py
 | 
			
		||||
# Based in wsbar.py en examples dir
 | 
			
		||||
#
 | 
			
		||||
# 16 feb 2015 - Electro7
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
import sys
 | 
			
		||||
import time
 | 
			
		||||
import subprocess
 | 
			
		||||
 | 
			
		||||
import i3
 | 
			
		||||
 | 
			
		||||
class State(object):
 | 
			
		||||
    # workspace states
 | 
			
		||||
    focused = 'FOC'
 | 
			
		||||
    active = 'ACT'
 | 
			
		||||
    inactive = 'INA'
 | 
			
		||||
    urgent = 'URG'
 | 
			
		||||
    
 | 
			
		||||
    def get_state(self, workspace, output):
 | 
			
		||||
        if workspace['focused']:
 | 
			
		||||
            if output['current_workspace'] == workspace['name']:
 | 
			
		||||
                return self.focused
 | 
			
		||||
            else:
 | 
			
		||||
                return self.active
 | 
			
		||||
        if workspace['urgent']:
 | 
			
		||||
            return self.urgent
 | 
			
		||||
        else:
 | 
			
		||||
            return self.inactive
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class i3ws(object):
 | 
			
		||||
    ws_format = '%s%s '
 | 
			
		||||
    end_format = 'WSP%s'
 | 
			
		||||
    state = State()
 | 
			
		||||
    
 | 
			
		||||
    def __init__(self, state=None):
 | 
			
		||||
        if state:
 | 
			
		||||
            self.state = state
 | 
			
		||||
        # socket
 | 
			
		||||
        self.socket = i3.Socket()
 | 
			
		||||
        # Output to console
 | 
			
		||||
        workspaces = self.socket.get('get_workspaces')
 | 
			
		||||
        outputs = self.socket.get('get_outputs')
 | 
			
		||||
        self.display(self.format(workspaces, outputs))
 | 
			
		||||
        # Subscribe to an event
 | 
			
		||||
        callback = lambda data, event, _: self.change(data, event)
 | 
			
		||||
        self.subscription = i3.Subscription(callback, 'workspace')
 | 
			
		||||
    
 | 
			
		||||
    def change(self, event, workspaces):
 | 
			
		||||
        # Receives event and workspace data
 | 
			
		||||
        if 'change' in event:
 | 
			
		||||
            outputs = self.socket.get('get_outputs')
 | 
			
		||||
            text = self.format(workspaces, outputs)
 | 
			
		||||
            self.display(text)
 | 
			
		||||
    
 | 
			
		||||
    def format(self, workspaces, outputs):
 | 
			
		||||
        # Formats the text according to the workspace data given.
 | 
			
		||||
        out = '' 
 | 
			
		||||
        for workspace in workspaces:
 | 
			
		||||
            output = None
 | 
			
		||||
            for output_ in outputs:
 | 
			
		||||
                if output_['name'] == workspace['output']:
 | 
			
		||||
                    output = output_
 | 
			
		||||
                    break
 | 
			
		||||
            if not output:
 | 
			
		||||
                continue
 | 
			
		||||
            st = self.state.get_state(workspace, output)
 | 
			
		||||
            name = workspace['name']
 | 
			
		||||
            item= self.ws_format % (st, name)
 | 
			
		||||
            out += item
 | 
			
		||||
        return self.end_format % out
 | 
			
		||||
    
 | 
			
		||||
    def display(self, text):
 | 
			
		||||
        # Displays the text in stout
 | 
			
		||||
        print(text)
 | 
			
		||||
        sys.stdout.flush()
 | 
			
		||||
    
 | 
			
		||||
    def quit(self):
 | 
			
		||||
        # Quits the i3ws; closes the subscription and terminates
 | 
			
		||||
        self.subscription.close()
 | 
			
		||||
 | 
			
		||||
if __name__ == '__main__':
 | 
			
		||||
    ws = i3ws()
 | 
			
		||||
    try:
 | 
			
		||||
        while True:
 | 
			
		||||
            time.sleep(1)
 | 
			
		||||
    except KeyboardInterrupt:
 | 
			
		||||
        print('')  # force new line
 | 
			
		||||
    finally:
 | 
			
		||||
        ws.quit()
 | 
			
		||||
							
								
								
									
										89
									
								
								config/lemonbar/lemonbar.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,89 @@
 | 
			
		||||
#! /bin/bash
 | 
			
		||||
#
 | 
			
		||||
# BSPWM bar with https://github.com/LemonBoy/bar
 | 
			
		||||
 | 
			
		||||
. $(dirname $0)/i3_lemonbar_config
 | 
			
		||||
 | 
			
		||||
if [ $(pgrep -cx $(basename $0)) -gt 1 ] ; then
 | 
			
		||||
    printf "%s\n" "The status bar is already running." >&2
 | 
			
		||||
    exit 1
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
trap 'trap - TERM; kill 0' INT TERM QUIT EXIT
 | 
			
		||||
 | 
			
		||||
[ -e "${panel_fifo}" ] && rm "${panel_fifo}"
 | 
			
		||||
mkfifo "${panel_fifo}"
 | 
			
		||||
 | 
			
		||||
# echo "=== Starting up bar at $(date +%c)" >> bar.log
 | 
			
		||||
 | 
			
		||||
### EVENTS METERS
 | 
			
		||||
 | 
			
		||||
# Window title, "WIN"
 | 
			
		||||
xprop -spy -root _NET_ACTIVE_WINDOW | sed -un 's/.*\(0x.*\)/WIN\1/p' > "${panel_fifo}" &
 | 
			
		||||
 | 
			
		||||
# i3 Workspaces, "WSP"
 | 
			
		||||
#$(dirname $0)/i3_workspaces.py > ${panel_fifo} &
 | 
			
		||||
 | 
			
		||||
# IRC, "IRC"
 | 
			
		||||
# only for init
 | 
			
		||||
# ~/bin/irc_warn &
 | 
			
		||||
 | 
			
		||||
# Conky, "SYS"
 | 
			
		||||
conky -c $(dirname $0)/i3_lemonbar_conky > "${panel_fifo}" &
 | 
			
		||||
 | 
			
		||||
### UPDATE INTERVAL METERS
 | 
			
		||||
cnt_vol=${upd_vol}
 | 
			
		||||
cnt_mail=${upd_mail}
 | 
			
		||||
cnt_mpd=${upd_mpd}
 | 
			
		||||
cnt_bat=${upd_bat}
 | 
			
		||||
cnt_win=${upd_win}
 | 
			
		||||
 | 
			
		||||
while :; do
 | 
			
		||||
 | 
			
		||||
  # Volume, "VOL"
 | 
			
		||||
  if [ $((cnt_vol++)) -ge ${upd_vol} ]; then
 | 
			
		||||
    #echo "VOL$(alsa-status)" > "${panel_fifo}" &
 | 
			
		||||
    echo "VOL20" > "${panel_fifo}" &
 | 
			
		||||
    cnt_vol=0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # GMAIL, "GMA"
 | 
			
		||||
  # if [ $((cnt_mail++)) -ge ${upd_mail} ]; then
 | 
			
		||||
  #   printf "%s%s\n" "GMA" "$(~/bin/gmail.sh)" > "${panel_fifo}"
 | 
			
		||||
  #   cnt_mail=0
 | 
			
		||||
  # fi
 | 
			
		||||
 | 
			
		||||
  # MPD
 | 
			
		||||
  #if [ $((cnt_mpd++)) -ge ${upd_mpd} ]; then
 | 
			
		||||
    ##printf "%s%s\n" "MPD" "$(ncmpcpp --now-playing '{%a - %t}|{%f}' | head -c 60)" > "${panel_fifo}"
 | 
			
		||||
    #printf "%s%s\n" "MPD" "$(mpc current -f '[[%artist% - ]%title%]|[%file%]' 2>&1 | head -c 70)" > "${panel_fifo}"
 | 
			
		||||
    #cnt_mpd=0
 | 
			
		||||
  #fi
 | 
			
		||||
 | 
			
		||||
  # Battery, "BAT"
 | 
			
		||||
  if [ $((cnt_bat++)) -ge ${upd_bat} ]; then
 | 
			
		||||
    #echo "$(batstat)" > "${panel_fifo}" &
 | 
			
		||||
    echo "BAT99" > "${panel_fifo}" &
 | 
			
		||||
    cnt_bat=0
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  # Periodic Window title update (Ticket #1)
 | 
			
		||||
  #if [ $((cnt_win++)) -ge ${upd_win} ]; then
 | 
			
		||||
    #echo "WIN`mywin`" > "${panel_fifo}" &
 | 
			
		||||
    #cnt_win=0
 | 
			
		||||
  #fi
 | 
			
		||||
 | 
			
		||||
  # Finally, wait 1 second
 | 
			
		||||
  sleep 1s;
 | 
			
		||||
 | 
			
		||||
done &
 | 
			
		||||
 | 
			
		||||
#### LOOP FIFO
 | 
			
		||||
 | 
			
		||||
#cat "${panel_fifo}" | $(dirname $0)/i3_lemonbar_parser.sh \
 | 
			
		||||
  #| bar -p -f "${font}" -f "${iconfont}" -f "${plfont}" -g "${geometry}" -B "${color_back}" -F "${color_fore}" &
 | 
			
		||||
cat "${panel_fifo}" | $(dirname $0)/i3_lemonbar_parser.sh \
 | 
			
		||||
  | lemonbar -p -f "${font}" -f "${iconfont}" -f "${plfont}" -g "${geometry}" -B "${color_back}" -F "${color_fore}" &
 | 
			
		||||
 | 
			
		||||
wait
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										32
									
								
								config/muttrc
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,32 @@
 | 
			
		||||
set sidebar_visible
 | 
			
		||||
set sidebar_format = "%B%?F? [%F]?%* %?N?%N/?%S"
 | 
			
		||||
set mail_check_stats
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
set folder      = imaps://url.com/
 | 
			
		||||
set imap_user   = roman@url.com
 | 
			
		||||
#set imap_pass   = your-imap-password
 | 
			
		||||
set spoolfile   = +INBOX
 | 
			
		||||
mailboxes       = +INBOX
 | 
			
		||||
 | 
			
		||||
# Store message headers locally to speed things up.
 | 
			
		||||
# If hcache is a folder, Mutt will create sub cache folders for each account which may speeds things up even more.
 | 
			
		||||
set header_cache = ~/.cache/mutt
 | 
			
		||||
 | 
			
		||||
# Store messages locally to speed things up, like searching message bodies.
 | 
			
		||||
# Can be the same folder as header_cache.
 | 
			
		||||
# This will cost important disk usage according to your e-mail amount.
 | 
			
		||||
set message_cachedir = "~/.cache/mutt"
 | 
			
		||||
 | 
			
		||||
# Specify where to save and/or look for postponed messages.
 | 
			
		||||
set postponed = +[url.com]/Drafts
 | 
			
		||||
 | 
			
		||||
# Allow Mutt to open a new IMAP connection automatically.
 | 
			
		||||
unset imap_passive
 | 
			
		||||
 | 
			
		||||
# Keep the IMAP connection alive by polling intermittently (time in seconds).
 | 
			
		||||
set imap_keepalive = 300
 | 
			
		||||
 | 
			
		||||
# How often to check for new mail (time in seconds).
 | 
			
		||||
set mail_check = 120
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										217
									
								
								config/nvim/init.vim
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,217 @@
 | 
			
		||||
"Many ideas from https://github.com/nicknisi/dotfiles/blob/master/config/nvim/init.vim
 | 
			
		||||
"https://github.com/mhartington/dotfiles/blob/master/vimrc
 | 
			
		||||
"and https://dougblack.io/words/a-good-vimrc.html
 | 
			
		||||
 | 
			
		||||
" Plugins
 | 
			
		||||
call plug#begin('~/.config/nvim/plugged')
 | 
			
		||||
 | 
			
		||||
Plug 'vim-airline/vim-airline'                     " fancy statusline
 | 
			
		||||
Plug 'vim-airline/vim-airline-themes'              " themes for vim-airline
 | 
			
		||||
Plug 'scrooloose/nerdtree'                         " file tree browser
 | 
			
		||||
Plug 'ctrlpvim/ctrlp.vim'                          " fuzzy file finder
 | 
			
		||||
Plug 'bronson/vim-trailing-whitespace'
 | 
			
		||||
Plug 'altercation/vim-colors-solarized'
 | 
			
		||||
Plug 'ryanoasis/vim-devicons'                      " awesome icons
 | 
			
		||||
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
 | 
			
		||||
Plug 'ashisha/image.vim'                           " Display images in vim
 | 
			
		||||
Plug 'Yggdroot/indentLine'                         " Display indent line
 | 
			
		||||
Plug 'neomake/neomake'                             " asynchronous make functionality :NeoMake!
 | 
			
		||||
Plug 'Shougo/deoplete.nvim'                        " autocomplete function
 | 
			
		||||
"Plug 'Shougo/neocomplcache.vim'
 | 
			
		||||
"Plug 'terryma/vim-multiple-cursors'                "Sublime multiple cursor support
 | 
			
		||||
Plug 'Shougo/neosnippet.vim'                       " snippet manager
 | 
			
		||||
Plug 'Shougo/neosnippet-snippets'                  " default snippets
 | 
			
		||||
Plug 'Raimondi/delimitMate'                        " automatic closing of quotes, parenthesis, brackets, etc.
 | 
			
		||||
Plug 'tpope/vim-commentary'                        " comment stuff out
 | 
			
		||||
Plug 'tpope/vim-ragtag'                            " endings for html, xml, etc. - ehances surround
 | 
			
		||||
Plug 'tpope/vim-surround'                          " mappings to easily delete, change and add such
 | 
			
		||||
Plug 'tpope/vim-fugitive'                          " Git support
 | 
			
		||||
Plug 'airblade/vim-gitgutter'                      " show git diff in gutter
 | 
			
		||||
                                                   " surroundings in pairs, such as quotes, parens, etc.
 | 
			
		||||
Plug 'simnalamburt/vim-mundo'                      " undo tree visualizer DOESN'T WORK ATM
 | 
			
		||||
"Plug 'junegunn/limelight.vim', { 'on': 'Limelight' } " focus tool. Dim text.  Good for presentating with vim
 | 
			
		||||
 | 
			
		||||
"language-specific plugins
 | 
			
		||||
" html
 | 
			
		||||
Plug 'gregsexton/MatchTag' "highlight the current tag
 | 
			
		||||
 | 
			
		||||
" latex
 | 
			
		||||
Plug 'lervag/vimtex'
 | 
			
		||||
 | 
			
		||||
call plug#end()
 | 
			
		||||
 | 
			
		||||
" Theme
 | 
			
		||||
syntax enable
 | 
			
		||||
"set background=dark
 | 
			
		||||
colorscheme solarized
 | 
			
		||||
 | 
			
		||||
if has('gui_running')
 | 
			
		||||
  set background=light
 | 
			
		||||
else
 | 
			
		||||
  set background=dark
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
" Enable snipMate compatibility feature.
 | 
			
		||||
"let g:neosnippet#enable_snipmate_compatibility = 1
 | 
			
		||||
"let g:neosnippet#snippets_directory='~/.vim/bundle/vim-snippets/snippets'
 | 
			
		||||
 | 
			
		||||
"deoplete settings
 | 
			
		||||
let g:deoplete#enable_at_startup = 1
 | 
			
		||||
let g:deoplete#ignore_sources = {}
 | 
			
		||||
"let g:deoplete#ignore_sources._ = ["neosnippet"]
 | 
			
		||||
 | 
			
		||||
" I want to use my tab more smarter. If we are inside a completion menu jump
 | 
			
		||||
" to the next item. Otherwise check if there is any snippet to expand, if yes
 | 
			
		||||
" expand it. Also if inside a snippet and we need to jump tab jumps. If none
 | 
			
		||||
" of the above matches we just call our usual 'tab'.
 | 
			
		||||
function! s:neosnippet_complete()
 | 
			
		||||
  if pumvisible()
 | 
			
		||||
    return "\<c-n>"
 | 
			
		||||
  else
 | 
			
		||||
    if neosnippet#expandable_or_jumpable()
 | 
			
		||||
      return "\<Plug>(neosnippet_expand_or_jump)"
 | 
			
		||||
    endif
 | 
			
		||||
    return "\<tab>"
 | 
			
		||||
  endif
 | 
			
		||||
endfunction
 | 
			
		||||
imap <expr><TAB> <SID>neosnippet_complete()
 | 
			
		||||
 | 
			
		||||
:inoremap <lt>/ </<C-X><C-O>
 | 
			
		||||
 | 
			
		||||
" nerdtree setting
 | 
			
		||||
" start with vim if no file is specified
 | 
			
		||||
if has("autocmd")
 | 
			
		||||
  autocmd StdinReadPre * let s:std_in=1
 | 
			
		||||
  "autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
 | 
			
		||||
  " close vim if only nerd tree is open
 | 
			
		||||
  autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
 | 
			
		||||
endif
 | 
			
		||||
map <C-n> :NERDTreeToggle<CR>
 | 
			
		||||
 | 
			
		||||
" Highlight full name (not only icons)
 | 
			
		||||
let g:NERDTreeFileExtensionHighlightFullName = 1
 | 
			
		||||
let g:NERDTreeExactMatchHighlightFullName = 1
 | 
			
		||||
let g:NERDTreePatternMatchHighlightFullName = 1
 | 
			
		||||
" Disable uncommon file extensions highlighting (good idea if lag when scrolling)
 | 
			
		||||
let g:NERDTreeLimitedSyntax = 1
 | 
			
		||||
" after a re-source, fix syntax matching issues (concealing brackets):
 | 
			
		||||
if exists('g:loaded_webdevicons')
 | 
			
		||||
    call webdevicons#refresh()
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
" toggle gundo
 | 
			
		||||
nnoremap <leader>u :MundoToggle<CR>
 | 
			
		||||
 | 
			
		||||
" Toggle number lines
 | 
			
		||||
map <C-S-l> :set number!<CR>:set relativenumber!<CR>
 | 
			
		||||
set relativenumber
 | 
			
		||||
set number
 | 
			
		||||
 | 
			
		||||
set history=200 "set Ex command history
 | 
			
		||||
set autoread " detect when a file is changed
 | 
			
		||||
 | 
			
		||||
set cursorline
 | 
			
		||||
 | 
			
		||||
" enable global undo
 | 
			
		||||
set undofile
 | 
			
		||||
set undodir=~/.config/nvim/undo
 | 
			
		||||
 | 
			
		||||
" jump to the last position when reopening a file
 | 
			
		||||
if has("autocmd")
 | 
			
		||||
  au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
set shortmess=I "disable intro message
 | 
			
		||||
 | 
			
		||||
" Tab control
 | 
			
		||||
set expandtab " insert spaces rather than tabs for <Tab> [noexpandtab for invert]
 | 
			
		||||
set smarttab " tab respects 'tabstop', 'shiftwidth', and 'softtabstop'
 | 
			
		||||
set tabstop=2 " the visible width of tabs
 | 
			
		||||
set softtabstop=2 " edit as if the tabs are 4 characters wide
 | 
			
		||||
set shiftwidth=2 " number of spaces to use for indent and unindent
 | 
			
		||||
set shiftround " round indent to a multiple of 'shiftwidth'
 | 
			
		||||
set completeopt+=longest
 | 
			
		||||
 | 
			
		||||
" Vim Splits
 | 
			
		||||
set splitbelow
 | 
			
		||||
set splitright
 | 
			
		||||
 | 
			
		||||
" substitute live preview
 | 
			
		||||
set inccommand=nosplit
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
" Key Bindings
 | 
			
		||||
 | 
			
		||||
"ReMap leader key
 | 
			
		||||
let mapleader = ","
 | 
			
		||||
 | 
			
		||||
" for learning: disable arrow keys
 | 
			
		||||
" noremap <Up> <NOP>
 | 
			
		||||
" noremap <Down> <NOP>
 | 
			
		||||
" noremap <Left> <NOP>
 | 
			
		||||
" noremap <Right> <NOP>
 | 
			
		||||
 | 
			
		||||
" better movement in Vim Splits
 | 
			
		||||
nnoremap <C-J> <C-W><C-J>
 | 
			
		||||
nnoremap <C-K> <C-W><C-K>
 | 
			
		||||
nnoremap <C-L> <C-W><C-L>
 | 
			
		||||
nnoremap <C-H> <C-W><C-H>
 | 
			
		||||
 | 
			
		||||
" enable copy to clipboard
 | 
			
		||||
map <Leader>y "+y
 | 
			
		||||
map <Leader>p "*p
 | 
			
		||||
 | 
			
		||||
" move vertically by visual line
 | 
			
		||||
" if there is a very long line that gets visually wrapped to two lines, wouldn't skip over the "fake" part of the visual line
 | 
			
		||||
nnoremap <UP>   gk
 | 
			
		||||
nnoremap <DOWN> gj
 | 
			
		||||
nnoremap j gj
 | 
			
		||||
nnoremap k gk
 | 
			
		||||
 | 
			
		||||
" fast movement
 | 
			
		||||
nnoremap J 5j
 | 
			
		||||
nnoremap K 5k
 | 
			
		||||
 | 
			
		||||
" cursor to begin or end of line
 | 
			
		||||
nnoremap B ^
 | 
			
		||||
nnoremap E $
 | 
			
		||||
 | 
			
		||||
" Align block of text and keep them selected
 | 
			
		||||
vmap < <gv
 | 
			
		||||
vmap > >gv
 | 
			
		||||
 | 
			
		||||
" Faster delete. Doesnt work actually
 | 
			
		||||
inoremap <C-BS> db
 | 
			
		||||
inoremap <C-Del> dw
 | 
			
		||||
 | 
			
		||||
" turn off last search highlight
 | 
			
		||||
map <esc> :noh<cr>
 | 
			
		||||
 | 
			
		||||
" highlight last inserted text
 | 
			
		||||
nnoremap gV `[v`]
 | 
			
		||||
 | 
			
		||||
" jk is escape
 | 
			
		||||
inoremap jk <ESC>
 | 
			
		||||
 | 
			
		||||
call togglebg#map("<F5>") "Toggle background dark/light
 | 
			
		||||
map <F6> :IndentLinesToggle<CR>
 | 
			
		||||
 | 
			
		||||
" vim-airline
 | 
			
		||||
 | 
			
		||||
let g:airline_theme='badwolf'
 | 
			
		||||
let g:airline_left_sep = ''
 | 
			
		||||
let g:airline_left_alt_sep = ''
 | 
			
		||||
let g:airline_right_sep = ''
 | 
			
		||||
let g:airline_right_alt_sep = ''
 | 
			
		||||
let g:airline_symbols_branch = ''
 | 
			
		||||
let g:airline_symbols_readonly = ''
 | 
			
		||||
let g:airline_symbols_linenr = ''
 | 
			
		||||
let g:airline_powerline_fonts = 1 "required for devicons
 | 
			
		||||
" Enable Airline Tabbar
 | 
			
		||||
let g:airline#extensions#tabline#enabled = 1
 | 
			
		||||
 | 
			
		||||
set encoding=utf8
 | 
			
		||||
set guifont=DroidSansMonoForPowerline\ Nerd\ Font
 | 
			
		||||
 | 
			
		||||
" EOF
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								config/nvim/logo.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 508 KiB  | 
							
								
								
									
										12
									
								
								config/nvim/neovim.desktop
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,12 @@
 | 
			
		||||
[Desktop Entry]
 | 
			
		||||
Categories=Utility;TextEditor;
 | 
			
		||||
Comment=Edit file in NeoVim
 | 
			
		||||
Exec=nvim %f
 | 
			
		||||
GenericName=Text Editor Vim
 | 
			
		||||
Hidden=false
 | 
			
		||||
Icon=/home/roman/.config/nvim/logo.png
 | 
			
		||||
Name=NeoVim
 | 
			
		||||
Terminal=true
 | 
			
		||||
Type=Application
 | 
			
		||||
Version=1.0
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										356
									
								
								config/polybar/config
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,356 @@
 | 
			
		||||
[bar/top]
 | 
			
		||||
monitor = eDP-1
 | 
			
		||||
width = 100%
 | 
			
		||||
height = 34
 | 
			
		||||
;wm-restack = bspwm
 | 
			
		||||
background = #002292B8
 | 
			
		||||
foreground = #ccf1e6F7
 | 
			
		||||
 | 
			
		||||
line-color = ${bar/top.background}
 | 
			
		||||
line-size = 2
 | 
			
		||||
 | 
			
		||||
spacing = 2
 | 
			
		||||
padding-right = 5
 | 
			
		||||
module-margin = 4
 | 
			
		||||
 | 
			
		||||
font-0 = NotoSans-Regular:size=10;2
 | 
			
		||||
font-1 = MaterialIcons:size=14;4
 | 
			
		||||
font-2 = Termsynu:size=8:antialias=false;-2
 | 
			
		||||
font-3 = FontAwesome:size=12;2
 | 
			
		||||
font-4 = NotoSans-Regular:size=12;2
 | 
			
		||||
 | 
			
		||||
modules-left = bspwm
 | 
			
		||||
modules-center = xwindow
 | 
			
		||||
modules-right =  wireless-network wired-network battery date
 | 
			
		||||
 | 
			
		||||
[bar/bottom]
 | 
			
		||||
monitor = eDP-1
 | 
			
		||||
bottom = true
 | 
			
		||||
width = 100%
 | 
			
		||||
height = 27
 | 
			
		||||
 | 
			
		||||
background = #000c3944
 | 
			
		||||
foreground = ${bar/top.foreground}
 | 
			
		||||
 | 
			
		||||
line-color = ${bar/top.background}
 | 
			
		||||
line-size = 2
 | 
			
		||||
 | 
			
		||||
spacing = 3
 | 
			
		||||
padding-right = 4
 | 
			
		||||
padding-left = 4
 | 
			
		||||
module-margin-left = 0
 | 
			
		||||
module-margin-right = 6
 | 
			
		||||
 | 
			
		||||
font-0 = NotoSans-Regular:size=8;0
 | 
			
		||||
font-1 = unifont:size=6;0
 | 
			
		||||
font-2 = FontAwesome:size=8;2
 | 
			
		||||
font-3 = NotoSans-Regular:size=8;-1
 | 
			
		||||
font-4 = MaterialIcons:size=10;2
 | 
			
		||||
font-5 = Termsynu:size=8:antialias=false;0
 | 
			
		||||
font-6 = NotoSans-Regular:size=20;10
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
modules-left = keyboard battery volume backlight
 | 
			
		||||
modules-right = cpu memory powermenu
 | 
			
		||||
 | 
			
		||||
[module/xwindow]
 | 
			
		||||
type = internal/xwindow
 | 
			
		||||
label = %{T5}%title:0:60:...%
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
[module/keyboard]
 | 
			
		||||
type = internal/xkeyboard
 | 
			
		||||
blacklist-0 = num lock
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
[module/battery]
 | 
			
		||||
type = internal/battery
 | 
			
		||||
full-at = 98
 | 
			
		||||
battery = BAT1
 | 
			
		||||
adapter = ADP1
 | 
			
		||||
 | 
			
		||||
format-charging = <animation-charging> <label-charging>
 | 
			
		||||
format-discharging = <ramp-capacity> <label-discharging>
 | 
			
		||||
format-full = <ramp-capacity> <label-full>
 | 
			
		||||
 | 
			
		||||
ramp-capacity-0 = 
 | 
			
		||||
ramp-capacity-0-foreground = #f53c3c
 | 
			
		||||
ramp-capacity-1 = 
 | 
			
		||||
ramp-capacity-1-foreground = #ffa900
 | 
			
		||||
ramp-capacity-2 = 
 | 
			
		||||
ramp-capacity-3 = 
 | 
			
		||||
ramp-capacity-4 = 
 | 
			
		||||
 | 
			
		||||
bar-capacity-width = 10
 | 
			
		||||
bar-capacity-format = %{+u}%{+o}%fill%%empty%%{-u}%{-o}
 | 
			
		||||
bar-capacity-fill = █
 | 
			
		||||
bar-capacity-fill-foreground = #ddffffff
 | 
			
		||||
bar-capacity-fill-font = 3
 | 
			
		||||
bar-capacity-empty = █
 | 
			
		||||
bar-capacity-empty-font = 3
 | 
			
		||||
bar-capacity-empty-foreground = #44ffffff
 | 
			
		||||
 | 
			
		||||
animation-charging-0 = 
 | 
			
		||||
animation-charging-1 = 
 | 
			
		||||
animation-charging-2 = 
 | 
			
		||||
animation-charging-3 = 
 | 
			
		||||
animation-charging-4 = 
 | 
			
		||||
animation-charging-framerate = 750
 | 
			
		||||
 | 
			
		||||
[module/bspwm]
 | 
			
		||||
type = internal/bspwm
 | 
			
		||||
 | 
			
		||||
ws-icon-0 = term;
 | 
			
		||||
ws-icon-1 = web;
 | 
			
		||||
ws-icon-2 = code;
 | 
			
		||||
ws-icon-3 = music;
 | 
			
		||||
ws-icon-4 = irssi;
 | 
			
		||||
ws-icon-default = 
 | 
			
		||||
 | 
			
		||||
format = <label-state> <label-mode>
 | 
			
		||||
 | 
			
		||||
label-dimmed-underline = ${root.background}
 | 
			
		||||
 | 
			
		||||
label-focused = %icon%
 | 
			
		||||
label-focused-foreground = #fff
 | 
			
		||||
label-focused-background = #773f3f3f
 | 
			
		||||
label-focused-underline = #ffffff
 | 
			
		||||
label-focused-font = 4
 | 
			
		||||
label-focused-padding = 4
 | 
			
		||||
 | 
			
		||||
label-occupied = %icon%
 | 
			
		||||
label-occupied-foreground = #dd
 | 
			
		||||
label-occupied-underline = #f7ed91
 | 
			
		||||
label-occupied-font = 4
 | 
			
		||||
label-occupied-padding = 4
 | 
			
		||||
 | 
			
		||||
label-urgent = %icon%
 | 
			
		||||
label-urgent-foreground = #000000
 | 
			
		||||
label-urgent-background = #bd2c40
 | 
			
		||||
label-urgent-underline = #9b0a20
 | 
			
		||||
label-urgent-font = 4
 | 
			
		||||
label-urgent-padding = 4
 | 
			
		||||
 | 
			
		||||
label-empty = %icon%
 | 
			
		||||
label-empty-foreground = #55
 | 
			
		||||
label-empty-font = 4
 | 
			
		||||
label-empty-padding = 4
 | 
			
		||||
 | 
			
		||||
label-monocle = 
 | 
			
		||||
label-monocle-underline = ${module/bspwm.label-focused-underline}
 | 
			
		||||
label-monocle-background = #33ffffff
 | 
			
		||||
label-monocle-padding = 2
 | 
			
		||||
 | 
			
		||||
label-locked = 
 | 
			
		||||
label-locked-foreground = #bd2c40
 | 
			
		||||
label-locked-underline = ${module/bspwm.label-monocle-underline}
 | 
			
		||||
label-locked-padding = ${module/bspwm.label-monocle-padding}
 | 
			
		||||
 | 
			
		||||
label-sticky = 
 | 
			
		||||
label-sticky-foreground = #fba922
 | 
			
		||||
label-sticky-underline = ${module/bspwm.label-monocle-underline}
 | 
			
		||||
label-sticky-padding = ${module/bspwm.label-monocle-padding}
 | 
			
		||||
 | 
			
		||||
label-private = 
 | 
			
		||||
label-private-foreground = #bd2c40
 | 
			
		||||
label-private-underline = ${module/bspwm.label-monocle-underline}
 | 
			
		||||
label-private-padding = ${module/bspwm.label-monocle-padding}
 | 
			
		||||
 | 
			
		||||
[module/bspwm-tmp]
 | 
			
		||||
type = internal/bspwm
 | 
			
		||||
format = <label-state>
 | 
			
		||||
 | 
			
		||||
label-active = 
 | 
			
		||||
label-active-padding = 1
 | 
			
		||||
label-occupied = 
 | 
			
		||||
label-occupied-padding = 1
 | 
			
		||||
label-empty = 
 | 
			
		||||
label-empty-padding = 1
 | 
			
		||||
 | 
			
		||||
[module/cpu]
 | 
			
		||||
type = internal/cpu
 | 
			
		||||
format = <label> <ramp-coreload>
 | 
			
		||||
label = CPU
 | 
			
		||||
interval = 1
 | 
			
		||||
 | 
			
		||||
ramp-coreload-0 = ▁
 | 
			
		||||
ramp-coreload-0-font = 2
 | 
			
		||||
ramp-coreload-0-foreground = #aaff77
 | 
			
		||||
ramp-coreload-1 = ▂
 | 
			
		||||
ramp-coreload-1-font = 2
 | 
			
		||||
ramp-coreload-1-foreground = #aaff77
 | 
			
		||||
ramp-coreload-2 = ▃
 | 
			
		||||
ramp-coreload-2-font = 2
 | 
			
		||||
ramp-coreload-2-foreground = #aaff77
 | 
			
		||||
ramp-coreload-3 = ▄
 | 
			
		||||
ramp-coreload-3-font = 2
 | 
			
		||||
ramp-coreload-3-foreground = #aaff77
 | 
			
		||||
ramp-coreload-4 = ▅
 | 
			
		||||
ramp-coreload-4-font = 2
 | 
			
		||||
ramp-coreload-4-foreground = #fba922
 | 
			
		||||
ramp-coreload-5 = ▆
 | 
			
		||||
ramp-coreload-5-font = 2
 | 
			
		||||
ramp-coreload-5-foreground = #fba922
 | 
			
		||||
ramp-coreload-6 = ▇
 | 
			
		||||
ramp-coreload-6-font = 2
 | 
			
		||||
ramp-coreload-6-foreground = #ff5555
 | 
			
		||||
ramp-coreload-7 = █
 | 
			
		||||
ramp-coreload-7-font = 2
 | 
			
		||||
ramp-coreload-7-foreground = #ff5555
 | 
			
		||||
 | 
			
		||||
[module/date]
 | 
			
		||||
type = internal/date
 | 
			
		||||
date =    %%{F#99}%Y-%m-%d%%{F-} %a  %%{F#fff}%H:%M%%{F-}
 | 
			
		||||
date-alt = %%{F#fff}%A, %d %B %Y  %%{F#fff}%H:%M%%{F#666}:%%{F#fba922}%S%%{F-}
 | 
			
		||||
 | 
			
		||||
[module/memory]
 | 
			
		||||
type = internal/memory
 | 
			
		||||
format = <label> <bar-used>
 | 
			
		||||
label = RAM
 | 
			
		||||
interval = 3
 | 
			
		||||
 | 
			
		||||
bar-used-width = 30
 | 
			
		||||
bar-used-foreground-0 = #aaff77
 | 
			
		||||
bar-used-foreground-1 = #aaff77
 | 
			
		||||
bar-used-foreground-2 = #fba922
 | 
			
		||||
bar-used-foreground-3 = #ff5555
 | 
			
		||||
bar-used-indicator = |
 | 
			
		||||
bar-used-indicator-font = 6
 | 
			
		||||
bar-used-indicator-foreground = #ff
 | 
			
		||||
bar-used-fill = ─
 | 
			
		||||
bar-used-fill-font = 6
 | 
			
		||||
bar-used-empty = ─
 | 
			
		||||
bar-used-empty-font = 6
 | 
			
		||||
bar-used-empty-foreground = #444444
 | 
			
		||||
 | 
			
		||||
[module/mpd]
 | 
			
		||||
type = internal/mpd
 | 
			
		||||
format-online = <icon-prev> <icon-stop> <toggle> <icon-next>  <icon-repeat> <icon-random>  <bar-progress> <label-time>  <label-song>
 | 
			
		||||
 | 
			
		||||
icon-play = 
 | 
			
		||||
icon-pause = 
 | 
			
		||||
icon-stop = 
 | 
			
		||||
icon-prev = 
 | 
			
		||||
icon-next = 
 | 
			
		||||
icon-random = 
 | 
			
		||||
icon-repeat = 
 | 
			
		||||
 | 
			
		||||
toggle-on-foreground =
 | 
			
		||||
toggle-off-foreground = #55
 | 
			
		||||
 | 
			
		||||
bar-progress-width = 45
 | 
			
		||||
bar-progress-format = %{A4:mpdseek+2: A5:mpdseek-2:}%fill%%indicator%%empty%%{A A}
 | 
			
		||||
bar-progress-indicator = |
 | 
			
		||||
bar-progress-indicator-foreground = #ff
 | 
			
		||||
bar-progress-indicator-font = 3
 | 
			
		||||
bar-progress-fill = ─
 | 
			
		||||
bar-progress-fill-foreground = #bb
 | 
			
		||||
bar-progress-fill-font = 3
 | 
			
		||||
bar-progress-empty = ─
 | 
			
		||||
bar-progress-empty-font = 3
 | 
			
		||||
bar-progress-empty-foreground = #44
 | 
			
		||||
 | 
			
		||||
[module/wired-network]
 | 
			
		||||
type = internal/network
 | 
			
		||||
interface = enp4s0
 | 
			
		||||
interval = 10
 | 
			
		||||
ping-interval = 10
 | 
			
		||||
 | 
			
		||||
format-connected = %{A1:gnome-control-center network:} <label-connected>%{A}
 | 
			
		||||
label-connected =   %local_ip%
 | 
			
		||||
label-disconnected =
 | 
			
		||||
 | 
			
		||||
animation-packetloss-0 = 
 | 
			
		||||
animation-packetloss-0-foreground = #ffa64c
 | 
			
		||||
animation-packetloss-1 = 
 | 
			
		||||
animation-packetloss-1-foreground = ${bar/top.foreground}
 | 
			
		||||
animation-packetloss-framerate = 500
 | 
			
		||||
 | 
			
		||||
[module/wireless-network]
 | 
			
		||||
type = internal/network
 | 
			
		||||
interface = wlp9s0
 | 
			
		||||
interval = 5.0
 | 
			
		||||
ping-interval = 10
 | 
			
		||||
 | 
			
		||||
format-connected = %{A1:gnome-control-center network:}<ramp-signal> <label-connected>%{A}
 | 
			
		||||
label-connected = %essid%
 | 
			
		||||
label-disconnected =    not connected
 | 
			
		||||
label-disconnected-foreground = #66
 | 
			
		||||
 | 
			
		||||
ramp-signal-0 = 
 | 
			
		||||
ramp-signal-1 = 
 | 
			
		||||
ramp-signal-2 = 
 | 
			
		||||
ramp-signal-3 = 
 | 
			
		||||
ramp-signal-4 = 
 | 
			
		||||
 | 
			
		||||
animation-packetloss-0 = 
 | 
			
		||||
animation-packetloss-0-foreground = #ffa64c
 | 
			
		||||
animation-packetloss-1 = 
 | 
			
		||||
animation-packetloss-1-foreground = ${bar/top.foreground}
 | 
			
		||||
animation-packetloss-framerate = 500
 | 
			
		||||
 | 
			
		||||
[module/volume]
 | 
			
		||||
type = internal/volume
 | 
			
		||||
 | 
			
		||||
; Soundcard to be used
 | 
			
		||||
master-soundcard = default
 | 
			
		||||
speaker-soundcard = default
 | 
			
		||||
headphone-soundcard = default
 | 
			
		||||
 | 
			
		||||
master-mixer = Master
 | 
			
		||||
 | 
			
		||||
mapping = true
 | 
			
		||||
 | 
			
		||||
format-volume = %{A3:gnome-control-center sound:}<ramp-volume> <label-volume>%{A}
 | 
			
		||||
label-muted =   muted
 | 
			
		||||
label-muted-foreground = #66
 | 
			
		||||
 | 
			
		||||
ramp-volume-0 = 
 | 
			
		||||
ramp-volume-1 = 
 | 
			
		||||
ramp-volume-2 = 
 | 
			
		||||
ramp-volume-3 = 
 | 
			
		||||
 | 
			
		||||
#[module/vpn]
 | 
			
		||||
#type = custom/script
 | 
			
		||||
#interval = 2
 | 
			
		||||
#label = %output%
 | 
			
		||||
#exec = ~/.config/polybar/vpn.sh
 | 
			
		||||
 | 
			
		||||
[module/backlight]
 | 
			
		||||
type = custom/script
 | 
			
		||||
interval = 2
 | 
			
		||||
label = " %output%%"
 | 
			
		||||
exec = xbacklight | cut -f1 -d"."
 | 
			
		||||
scroll-up = xbacklight -inc 10
 | 
			
		||||
scroll-down = xbacklight -dec 10
 | 
			
		||||
 | 
			
		||||
[module/powermenu]
 | 
			
		||||
type = custom/menu
 | 
			
		||||
 | 
			
		||||
#format-padding = 5
 | 
			
		||||
label-separator = |
 | 
			
		||||
 | 
			
		||||
label-open = 
 | 
			
		||||
label-close = 
 | 
			
		||||
 | 
			
		||||
menu-0-0 = Terminate WM
 | 
			
		||||
menu-0-0-foreground = #fba922
 | 
			
		||||
menu-0-0-exec = bspc quit -1
 | 
			
		||||
menu-0-1 = " "
 | 
			
		||||
menu-0-1-foreground = #fba922
 | 
			
		||||
menu-0-1-exec = systemctl suspend
 | 
			
		||||
menu-0-2 = Power
 | 
			
		||||
menu-0-2-foreground = #fba922
 | 
			
		||||
menu-0-2-exec = menu-open-1
 | 
			
		||||
 | 
			
		||||
menu-1-0 = Cancel
 | 
			
		||||
menu-1-0-foreground = #fba922
 | 
			
		||||
menu-1-0-exec = menu-open-0
 | 
			
		||||
menu-1-1 = Reboot
 | 
			
		||||
menu-1-1-foreground = #fba922
 | 
			
		||||
menu-1-1-exec = systemctl reboot
 | 
			
		||||
menu-1-2 = Power off
 | 
			
		||||
menu-1-2-foreground = #fba922
 | 
			
		||||
menu-1-2-exec = systemctl poweroff
 | 
			
		||||
 | 
			
		||||
; vim:ft=dosini
 | 
			
		||||
							
								
								
									
										208
									
								
								config/sxhkd/sxhkdrc
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,208 @@
 | 
			
		||||
#
 | 
			
		||||
# wm independent hotkeys
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# terminal emulator
 | 
			
		||||
super + Return
 | 
			
		||||
	gnome-terminal
 | 
			
		||||
 | 
			
		||||
# system monitor
 | 
			
		||||
control + shift + Escape
 | 
			
		||||
  gnome-system-monitor
 | 
			
		||||
 | 
			
		||||
# program launcher
 | 
			
		||||
super + r
 | 
			
		||||
  rofi -show run
 | 
			
		||||
 | 
			
		||||
super + space
 | 
			
		||||
  rofi -show drun
 | 
			
		||||
	#dmenu_run
 | 
			
		||||
 | 
			
		||||
# open file explorer
 | 
			
		||||
super + e
 | 
			
		||||
  nautilus
 | 
			
		||||
 | 
			
		||||
# make sxhkd reload its configuration files:
 | 
			
		||||
super + ctrl + Escape
 | 
			
		||||
	pkill -USR1 -x sxhkd
 | 
			
		||||
 | 
			
		||||
# lock screen
 | 
			
		||||
super + Escape
 | 
			
		||||
  ~/.dotfiles/scripts/lock.sh
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# screenshot keys
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
Print
 | 
			
		||||
  scrot 'Screenshot_%Y-%m-%d_%H-%M-%S.png' -e 'mv $f ~/Bilder/' && \
 | 
			
		||||
  notify-send --icon=gtk-info "Screenshot taken"
 | 
			
		||||
 | 
			
		||||
alt + @Print
 | 
			
		||||
  scrot -u 'Screenshot_%Y-%m-%d_%H-%M-%S.png' -e 'mv $f ~/Bilder/' && \
 | 
			
		||||
  notify-send --icon=gtk-info "Screenshot taken"
 | 
			
		||||
 | 
			
		||||
shift + @Print
 | 
			
		||||
  scrot -s -d 0.5 'Screenshot_%Y-%m-%d_%H-%M-%S.png' -e 'mv $f ~/Bilder/' && \
 | 
			
		||||
  notify-send --icon=gtk-info "Screenshot taken"
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# notebook funtion keys
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# brightness
 | 
			
		||||
XF86MonBrightnessUp
 | 
			
		||||
  ~/.dotfiles/scripts/notify_brightness.sh && \
 | 
			
		||||
  xbacklight -inc 10
 | 
			
		||||
XF86MonBrightnessDown
 | 
			
		||||
  ~/.dotfiles/scripts/notify_brightness.sh && \
 | 
			
		||||
  xbacklight -dec 10
 | 
			
		||||
 | 
			
		||||
# audio keys
 | 
			
		||||
XF86AudioRaiseVolume
 | 
			
		||||
  amixer sset Master 5%+ unmute && \
 | 
			
		||||
  ~/.dotfiles/scripts/notify_sound.sh
 | 
			
		||||
XF86AudioLowerVolume
 | 
			
		||||
  amixer sset Master 5%- unmute && \
 | 
			
		||||
  ~/.dotfiles/scripts/notify_sound.sh
 | 
			
		||||
XF86AudioMute
 | 
			
		||||
  amixer sset Master toggle && \
 | 
			
		||||
  ~/.dotfiles/scripts/notify_sound.sh
 | 
			
		||||
 | 
			
		||||
# standby key
 | 
			
		||||
XF86Sleep
 | 
			
		||||
  systemctl suspend
 | 
			
		||||
 | 
			
		||||
# display key
 | 
			
		||||
XF86Display
 | 
			
		||||
  lxrandr
 | 
			
		||||
  #gnome-control-center display
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# bspwm hotkeys
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# quit bspwm normally
 | 
			
		||||
super + alt + Escape
 | 
			
		||||
	bspc quit
 | 
			
		||||
 | 
			
		||||
# reload bspwm config
 | 
			
		||||
super + shift + c
 | 
			
		||||
  sh ~/.config/bspwm/bspwmrc
 | 
			
		||||
 | 
			
		||||
# close and kill
 | 
			
		||||
super + {_,shift + }w
 | 
			
		||||
	bspc node -{c,k}
 | 
			
		||||
 | 
			
		||||
alt + F4
 | 
			
		||||
  bspc node -c
 | 
			
		||||
 | 
			
		||||
# alternate between the tiled and monocle layout
 | 
			
		||||
super + m
 | 
			
		||||
	bspc desktop -l next
 | 
			
		||||
 | 
			
		||||
# if the current node is automatic, send it to the last manual, otherwise pull the last leaf
 | 
			
		||||
super + y
 | 
			
		||||
	bspc query -N -n focused.automatic && bspc node -n last.!automatic || bspc node last.leaf -n focused
 | 
			
		||||
 | 
			
		||||
# swap the current node and the biggest node
 | 
			
		||||
super + g
 | 
			
		||||
	bspc node -s biggest
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# state/flags
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# set the window state
 | 
			
		||||
super + {t,shift + t,s,f}
 | 
			
		||||
	bspc node -t {tiled,pseudo_tiled,floating,fullscreen}
 | 
			
		||||
 | 
			
		||||
# set the node flags
 | 
			
		||||
super + ctrl + {x,y,z}
 | 
			
		||||
	bspc node -g {locked,sticky,private}
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# focus/swap
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# focus the node in the given direction
 | 
			
		||||
super + {_,shift + }{h,j,k,l}
 | 
			
		||||
	bspc node -{f,s} {west,south,north,east}
 | 
			
		||||
 | 
			
		||||
# focus the node for the given path jump
 | 
			
		||||
super + {p,b,comma,period}
 | 
			
		||||
	bspc node -f @{parent,brother,first,second}
 | 
			
		||||
 | 
			
		||||
# focus the next/previous node
 | 
			
		||||
super + {_,shift + }c
 | 
			
		||||
	bspc node -f {next,prev}
 | 
			
		||||
 | 
			
		||||
# focus the next/previous desktop
 | 
			
		||||
super + bracket{left,right}
 | 
			
		||||
	bspc desktop -f {prev,next}
 | 
			
		||||
 | 
			
		||||
# focus the last node/desktop
 | 
			
		||||
super + {grave,Tab}
 | 
			
		||||
	bspc {node,desktop} -f last
 | 
			
		||||
 | 
			
		||||
# focus the older or newer node in the focus history
 | 
			
		||||
super + {o,i}
 | 
			
		||||
	bspc wm -h off; \
 | 
			
		||||
	bspc node {older,newer} -f; \
 | 
			
		||||
	bspc wm -h on
 | 
			
		||||
 | 
			
		||||
# focus or send to the given desktop
 | 
			
		||||
super + {_,shift + }{1-9,0}
 | 
			
		||||
	bspc {desktop -f,node -d} '^{1-9,10}'
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# preselect
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# preselect the direction
 | 
			
		||||
super + ctrl + {h,j,k,l}
 | 
			
		||||
	bspc node -p {west,south,north,east}
 | 
			
		||||
 | 
			
		||||
# preselect the ratio
 | 
			
		||||
super + ctrl + {1-9}
 | 
			
		||||
	bspc node -o 0.{1-9}
 | 
			
		||||
 | 
			
		||||
# cancel the preselection for the focused node
 | 
			
		||||
super + ctrl + space
 | 
			
		||||
	bspc node -p cancel
 | 
			
		||||
 | 
			
		||||
# cancel the preselection for the focused desktop
 | 
			
		||||
super + ctrl + shift + space
 | 
			
		||||
	bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# move/resize
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# expand a window by moving one of its side outward
 | 
			
		||||
super + alt + {h,j,k,l}
 | 
			
		||||
	bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
 | 
			
		||||
 | 
			
		||||
# contract a window by moving one of its side inward
 | 
			
		||||
super + alt + shift + {h,j,k,l}
 | 
			
		||||
	bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
 | 
			
		||||
 | 
			
		||||
# move a floating window
 | 
			
		||||
super + {Left,Down,Up,Right}
 | 
			
		||||
	bspc node -v {-20 0,0 20,0 -20,20 0}
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# mouse bindings
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# Move or resize window
 | 
			
		||||
#alt + button{1-3}
 | 
			
		||||
	#bspc pointer -g {move,resize_side,resize_corner}
 | 
			
		||||
 | 
			
		||||
# Needed for ^^^^
 | 
			
		||||
#alt + !button{1-3}
 | 
			
		||||
    #bspc pointer -t %i %i
 | 
			
		||||
 | 
			
		||||
#alt + @button{1-3}
 | 
			
		||||
    #bspc pointer -u
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								files/icons/email.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 8.0 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								files/icons/firefox.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 26 KiB  | 
							
								
								
									
										17
									
								
								files/icons/folder.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,17 @@
 | 
			
		||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256">
 | 
			
		||||
 <defs>
 | 
			
		||||
  <radialGradient id="radialGradient3816" cx="-25" cy="203.5" r="35" gradientTransform="matrix(1,0,0,0.78571429,0,43.607143)" gradientUnits="userSpaceOnUse">
 | 
			
		||||
   <stop style="stop-color:#000;stop-opacity:1"/>
 | 
			
		||||
   <stop offset="1" style="stop-color:#000;stop-opacity:0"/>
 | 
			
		||||
  </radialGradient>
 | 
			
		||||
 </defs>
 | 
			
		||||
 <g transform="translate(0,-796.3622)">
 | 
			
		||||
  <path d="m 10 203.5 a 35 27.5 0 1 1 -70 0 35 27.5 0 1 1 70 0 z" transform="matrix(5.0857143,0,0,1.0909091,255.14286,788.3622)" style="fill:url(#radialGradient3816);opacity:0.55;fill-opacity:1;stroke:none"/>
 | 
			
		||||
  <path d="m 0 832.6 0 171.29 256 0 0 -85.65 -12.19 -73.41 l -95.81 -0.47 l -12 -24 -123.81 0 c -6.095 0 -12.19 6.118 -12.19 12.235 z" style="fill:#ef6c00;fill-opacity:1;stroke:none"/>
 | 
			
		||||
  <rect width="126.29" height="47.529" x="20" y="852.36" style="fill:#fffdf0;fill-opacity:1;stroke:none"/>
 | 
			
		||||
  <path d="m 12.25 820.36 c -6.095 0 -12.25 6.132 -12.25 12.25 l 0 8 c 0 -6.118 6.155 -12.25 12.25 -12.25 l 119.75 0 12 24 99.75 0.5 12.25 73.38 0 -8 -12.25 -73.37 -95.75 -0.5 -12 -24 z" style="fill:#000;opacity:0.03;fill-opacity:1;stroke:none"/>
 | 
			
		||||
  <path d="m 256 857.07 0 171.29 -256 0 0 -160 120 0 12 -24 111.81 0.47 c 6.095 0 12.19 6.118 12.19 12.236 z" style="fill:#ffa726;fill-opacity:1;stroke:none"/>
 | 
			
		||||
  <path d="m 0 1020.36 0 8 256 0 0 -8 z" style="fill:#000;opacity:0.15;fill-opacity:1;stroke:none"/>
 | 
			
		||||
  <path d="m 132 844.36 -12 24 -120 0 0 8 124 0 12 -24 107.75 0.5 c 6.095 0 12.25 6.132 12.25 12.25 l 0 -8 c 0 -6.118 -6.155 -12.25 -12.25 -12.25 z" style="fill:#000;opacity:0.03;fill-opacity:1;stroke:none"/>
 | 
			
		||||
 </g>
 | 
			
		||||
</svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 1.6 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								files/icons/terminal.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 10 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								files/screen-lock.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 4.0 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								files/screen-lock2.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 4.3 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								files/screen-lock_big.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 6.3 KiB  | 
							
								
								
									
										59
									
								
								install/bspwm.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,59 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
# text settings
 | 
			
		||||
ORANGE='\033[0;33m'
 | 
			
		||||
NC='\033[0m' # No Color
 | 
			
		||||
BOLD=$(tput bold)
 | 
			
		||||
NORMAL=$(tput sgr0)
 | 
			
		||||
 | 
			
		||||
INSTALL="sudo pacman -S"
 | 
			
		||||
AUR_DOWNLOAD="cower -d"
 | 
			
		||||
 | 
			
		||||
INSTALL_DIR="./bspwm_install"
 | 
			
		||||
 | 
			
		||||
if [ -d $INSTALL_DIR ] then
 | 
			
		||||
  mkdir $INSTALL_DIR
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# install packages
 | 
			
		||||
 | 
			
		||||
# core
 | 
			
		||||
echo -e "Installing bspwm and sxhkd:"
 | 
			
		||||
$INSTALL bspwm sxhkd
 | 
			
		||||
echo -e "Installing xrandr gui:"
 | 
			
		||||
$INSTALL lxrandr
 | 
			
		||||
echo -e "Installing wmame:"
 | 
			
		||||
$INSTALL wmname
 | 
			
		||||
echo -e "Installing rofi:"
 | 
			
		||||
$INSTALL rofi
 | 
			
		||||
echo -e "Installing notification daemon"
 | 
			
		||||
$INSTALL notify-osd
 | 
			
		||||
echo -e "Installing i3lock for lockscreen:"
 | 
			
		||||
$INSTALL i3lock xautolock
 | 
			
		||||
# change background image
 | 
			
		||||
echo -e "Installing background image controller:"
 | 
			
		||||
$INSTALL feh
 | 
			
		||||
# audio and backlight control
 | 
			
		||||
echo -e "Installing audio and backlight controller:"
 | 
			
		||||
$INSTALL alsa-utils xorg-xbacklight
 | 
			
		||||
# modify key mapping
 | 
			
		||||
echo -e "Installing key mapping modifier:"
 | 
			
		||||
$INSTALL xorg-xmodmap
 | 
			
		||||
echo -e "Installing Compton (wm effects):"
 | 
			
		||||
$INSTALL compton
 | 
			
		||||
echo -e "Installing scort for screenshots:"
 | 
			
		||||
$INSTALL scrot
 | 
			
		||||
echo -e "${BOLD}You need to install Polybar from AUR"
 | 
			
		||||
$AUR_DOWNLOAD polybar -t $INSTALL_DIR
 | 
			
		||||
 | 
			
		||||
echo -e "${BOLD}You need to install the following fonts from AUR:${NORMAL}"
 | 
			
		||||
echo -e "${ORANGE} ttf-font-awesome${NC}"
 | 
			
		||||
echo -e "${ORANGE} ttf-material-design-icons${NC}"
 | 
			
		||||
 | 
			
		||||
$AUR_DOWNLOAD ttf-font-awesome -t $INSTALL_DIR
 | 
			
		||||
$AUR_DOWNLOAD ttf-material-design-icons -t $INSTALL_DIR
 | 
			
		||||
 | 
			
		||||
# link config files
 | 
			
		||||
# TODO
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										23
									
								
								install/install.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,23 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
echo "Installing dotfiles"
 | 
			
		||||
 | 
			
		||||
echo "Updating git submodules"
 | 
			
		||||
git submodule update --init
 | 
			
		||||
 | 
			
		||||
echo "Installing packages"
 | 
			
		||||
source install/pacman.sh
 | 
			
		||||
 | 
			
		||||
#echo "set up gnome-terminal colorscheme"
 | 
			
		||||
#source gnome-terminal/gnome-terminal-colors-solarized/install.sh
 | 
			
		||||
 | 
			
		||||
echo "linking config files"
 | 
			
		||||
source install/link.sh
 | 
			
		||||
 | 
			
		||||
echo "Configuring zsh as default shell"
 | 
			
		||||
chsh -s $(which zsh)
 | 
			
		||||
source $HOME/.config/base16-shell/base16-brewer.dark.sh
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										17
									
								
								install/link.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,17 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
DOTFILES=$HOME/.dotfiles
 | 
			
		||||
 | 
			
		||||
echo -e "\nCreating symlinks"
 | 
			
		||||
echo "=============================="
 | 
			
		||||
 | 
			
		||||
echo "tmux:"
 | 
			
		||||
ln -s $DOTFILES/tmux/tmux.conf $HOME/.tmux.conf
 | 
			
		||||
ln -s $DOTFILES/tmux/tmux $HOME/.tmux
 | 
			
		||||
 | 
			
		||||
echo "zsh:"
 | 
			
		||||
ln -s $DOTFILES/zsh/zshrc $HOME/.zshrc
 | 
			
		||||
 | 
			
		||||
echo "base16:"
 | 
			
		||||
ln -s $DOTFILES/base16/* $HOME/.config
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										13
									
								
								install/pacman.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,13 @@
 | 
			
		||||
#!/bin/sh
 | 
			
		||||
 | 
			
		||||
type pacman > /dev/null 2>&1 || { echo >&2 "I require pacman but it's not installed.  Aborting."; exit 1; }
 | 
			
		||||
 | 
			
		||||
echo "Installing packages..."
 | 
			
		||||
 | 
			
		||||
pacman -S git
 | 
			
		||||
pacman -S tmux
 | 
			
		||||
pacman -S zsh
 | 
			
		||||
pacman -S powerline
 | 
			
		||||
pacman -S nvim
 | 
			
		||||
 | 
			
		||||
exit 0
 | 
			
		||||
							
								
								
									
										48
									
								
								rc/bashrc
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,48 @@
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# ~/.bashrc
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# If not running interactively, don't do anything
 | 
			
		||||
[[ $- != *i* ]] && return
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#set dircolor to solarized-dark
 | 
			
		||||
#eval `dircolors ~/.dotfiles/gnome-terminal/dircolors-solarized/dircolors.ansi-dark`
 | 
			
		||||
 | 
			
		||||
#export PATH=~/bin:$PATH
 | 
			
		||||
 | 
			
		||||
export EDITOR="nvim"
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# load aliases
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
source ~/.config/aliases
 | 
			
		||||
 | 
			
		||||
# add ruby to path
 | 
			
		||||
#PATH="$(ruby -e 'print Gem.user_dir')/bin:$PATH"
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# Prompt
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
exitstatus()
 | 
			
		||||
{
 | 
			
		||||
  if [[ $? == 0 ]]; then
 | 
			
		||||
    echo ''
 | 
			
		||||
  else
 | 
			
		||||
    echo '! '
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
user()
 | 
			
		||||
{
 | 
			
		||||
  if [[ $USER == 'roman' ]]; then
 | 
			
		||||
    echo ''
 | 
			
		||||
  else
 | 
			
		||||
    echo '\u@\h '
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
PS1='[$(exitstatus)$(user)\w]\$ '
 | 
			
		||||
							
								
								
									
										117
									
								
								rc/tmux/tmux.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,117 @@
 | 
			
		||||
 | 
			
		||||
# tmux display things in 256 colors
 | 
			
		||||
set -g default-terminal "screen-256color"
 | 
			
		||||
 | 
			
		||||
# set new history limit
 | 
			
		||||
set -g history-limit 30000
 | 
			
		||||
 | 
			
		||||
# screesaver after 600 sek
 | 
			
		||||
set -g lock-after-time 600
 | 
			
		||||
set -g lock-command "/usr/bin/cmatrix -C blue -s"
 | 
			
		||||
 | 
			
		||||
# automatically renumber tmux windows
 | 
			
		||||
set -g renumber-windows on
 | 
			
		||||
 | 
			
		||||
# set new prefix key
 | 
			
		||||
unbind C-b
 | 
			
		||||
set -g prefix C-a
 | 
			
		||||
bind C-a send-prefix
 | 
			
		||||
 | 
			
		||||
# Activity Monitoring
 | 
			
		||||
setw -g monitor-activity off
 | 
			
		||||
set -g visual-activity off
 | 
			
		||||
 | 
			
		||||
# Rather than constraining window size to the maximum size of any client
 | 
			
		||||
# connected to the *session*, constrain window size to the maximum size of any
 | 
			
		||||
# client connected to *that window*. Much more reasonable.
 | 
			
		||||
#setw -g aggressive-resize on
 | 
			
		||||
 | 
			
		||||
# make delay shorter
 | 
			
		||||
set -sg escape-time 0
 | 
			
		||||
 | 
			
		||||
# tile all windows
 | 
			
		||||
#unbind =
 | 
			
		||||
#bind = select-layout tiled
 | 
			
		||||
 | 
			
		||||
# make window/pane index start with 1
 | 
			
		||||
set -g base-index 1
 | 
			
		||||
setw -g pane-base-index 1
 | 
			
		||||
 | 
			
		||||
new-session -A -s main
 | 
			
		||||
 | 
			
		||||
set-option -g set-titles on
 | 
			
		||||
set-option -g set-titles-string "#T - #W"
 | 
			
		||||
set-window-option -g automatic-rename on
 | 
			
		||||
 | 
			
		||||
# set config reload key
 | 
			
		||||
bind-key r source-file ~/.tmux.conf \; display "Config reloaded!"
 | 
			
		||||
 | 
			
		||||
# enable mouse scrolling
 | 
			
		||||
set -g mouse on
 | 
			
		||||
bind -T root WheelUpPane   if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
 | 
			
		||||
bind -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
######################
 | 
			
		||||
#### Key Bindings ####
 | 
			
		||||
######################
 | 
			
		||||
 | 
			
		||||
# quickly open a new window
 | 
			
		||||
bind N new-window
 | 
			
		||||
 | 
			
		||||
# split window and fix path for tmux 1.9
 | 
			
		||||
bind | split-window -h -c "#{pane_current_path}"
 | 
			
		||||
bind - split-window -v -c "#{pane_current_path}"
 | 
			
		||||
bind c new-window -c "#{pane_current_path}"
 | 
			
		||||
 | 
			
		||||
# pane movement shortcuts
 | 
			
		||||
bind h select-pane -L
 | 
			
		||||
bind j select-pane -D
 | 
			
		||||
bind k select-pane -U
 | 
			
		||||
bind l select-pane -R
 | 
			
		||||
 | 
			
		||||
# Resize pane shortcuts
 | 
			
		||||
bind -r H resize-pane -L 10
 | 
			
		||||
bind -r J resize-pane -D 10
 | 
			
		||||
bind -r K resize-pane -U 10
 | 
			
		||||
bind -r L resize-pane -R 10
 | 
			
		||||
 | 
			
		||||
# maximizing and restoring windows
 | 
			
		||||
unbind Up
 | 
			
		||||
bind Up new-window -d -n fullscreen \; swap-pane -s fullscreen.1 \; select-window -t fullscreen
 | 
			
		||||
unbind Down
 | 
			
		||||
bind Down last-window \; swap-pane -s fullscreen.1 \; kill-window -t fullscreen
 | 
			
		||||
 | 
			
		||||
# set vi mode for copy mode
 | 
			
		||||
setw -g mode-keys vi
 | 
			
		||||
# more settings to make copy-mode more vim-like
 | 
			
		||||
unbind [
 | 
			
		||||
bind Escape copy-mode
 | 
			
		||||
unbind p
 | 
			
		||||
bind p paste-buffer
 | 
			
		||||
bind -t vi-copy 'v' begin-selection
 | 
			
		||||
bind -t vi-copy 'y' copy-selection
 | 
			
		||||
 | 
			
		||||
##############################
 | 
			
		||||
### Color & Style Settings ###
 | 
			
		||||
##############################
 | 
			
		||||
 | 
			
		||||
source ~/.tmux/theme.sh
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
##############################
 | 
			
		||||
###        Plugins         ###
 | 
			
		||||
##############################
 | 
			
		||||
 | 
			
		||||
# List of plugins
 | 
			
		||||
set -g @plugin 'tmux-plugins/tpm'
 | 
			
		||||
 | 
			
		||||
set -g @plugin 'tmux-plugins/tmux-sidebar'
 | 
			
		||||
set -g @plugin 'tmux-plugins/tmux-resurrect'
 | 
			
		||||
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
 | 
			
		||||
set -g @plugin 'tmux-plugins/tmux-yank'
 | 
			
		||||
set -g @plugin 'tmux-plugins/tmux-open'
 | 
			
		||||
 | 
			
		||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
 | 
			
		||||
run '~/.tmux/plugins/tpm/tpm'
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										33
									
								
								rc/zshrc
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,33 @@
 | 
			
		||||
export ZSH=/home/roman/.oh-my-zsh
 | 
			
		||||
 | 
			
		||||
DEFAULT_USER="roman"
 | 
			
		||||
ZSH_THEME="agnoster"
 | 
			
		||||
COMPLETION_WAITING_DOTS="true"
 | 
			
		||||
ZSH_TMUX_AUTOSTART="true"
 | 
			
		||||
ZSH_TMUX_AUTOQUIT="true"
 | 
			
		||||
 | 
			
		||||
plugins=(tmux jump)
 | 
			
		||||
CASE_SENSITIVE="true"
 | 
			
		||||
 | 
			
		||||
#set dircolor to solarized-dark
 | 
			
		||||
eval `dircolors ~/.dotfiles/gnome-terminal/dircolors-solarized/dircolors.ansi-dark`
 | 
			
		||||
 | 
			
		||||
#export PATH=~/bin:$PATH
 | 
			
		||||
 | 
			
		||||
source $ZSH/oh-my-zsh.sh
 | 
			
		||||
 | 
			
		||||
export EDITOR="nvim"
 | 
			
		||||
 | 
			
		||||
# load aliases
 | 
			
		||||
source ~/.config/aliases
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#BASE16_SHELL="$HOME/.config/base16-shell/base16-brewer.dark.sh"
 | 
			
		||||
#[[ -s $BASE16_SHELL ]] && source $BASE16_SHELL
 | 
			
		||||
 | 
			
		||||
#export NVM_DIR="/home/booker/.nvm"
 | 
			
		||||
#[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm
 | 
			
		||||
 | 
			
		||||
# add ruby to path
 | 
			
		||||
PATH="$(ruby -e 'print Gem.user_dir')/bin:$PATH"
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										3
									
								
								scripts/autostart.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,3 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
nextcloud &
 | 
			
		||||
							
								
								
									
										13
									
								
								scripts/battery.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,13 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
STATUS="$(cat /sys/class/power_supply/BAT1/status)"
 | 
			
		||||
BAT="$(cat /sys/class/power_supply/BAT1/capacity)"
 | 
			
		||||
 | 
			
		||||
OUTPUT="♥ "
 | 
			
		||||
 | 
			
		||||
if [ "$STATUS" == "charging" ]
 | 
			
		||||
  then
 | 
			
		||||
    OUTPUT=$OUTPUT"l"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
echo "$OUTPUT$BAT%"
 | 
			
		||||
							
								
								
									
										11
									
								
								scripts/bin/spotify
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,11 @@
 | 
			
		||||
#!/bin/sh
 | 
			
		||||
 | 
			
		||||
spotify=/usr/bin/spotify
 | 
			
		||||
 | 
			
		||||
if [[ -x $spotify && -x /usr/bin/blockify ]];
 | 
			
		||||
then
 | 
			
		||||
  blockify &
 | 
			
		||||
  block_pid=$!
 | 
			
		||||
  $spotify
 | 
			
		||||
  trap "kill -9 $block_pid" SIGINT SIGTERM EXIT
 | 
			
		||||
fi
 | 
			
		||||
							
								
								
									
										37
									
								
								scripts/lock.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,37 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
lock_icon="$HOME/.dotfiles/screen-lock.png"
 | 
			
		||||
 | 
			
		||||
scrot /tmp/screen.png
 | 
			
		||||
convert /tmp/screen.png -scale 20% -scale 500% /tmp/screen.png
 | 
			
		||||
 | 
			
		||||
if [[ -f $lock_icon ]]
 | 
			
		||||
then
 | 
			
		||||
    # placement x/y
 | 
			
		||||
    PX=0
 | 
			
		||||
    PY=0
 | 
			
		||||
    # lockscreen image info
 | 
			
		||||
    R=$(file $lock_icon | grep -o '[0-9]* x [0-9]*')
 | 
			
		||||
    RX=$(echo $R | cut -d' ' -f 1)
 | 
			
		||||
    RY=$(echo $R | cut -d' ' -f 3)
 | 
			
		||||
 | 
			
		||||
    SR=$(xrandr --query | grep ' connected' | sed 's/primary //' | cut -f3 -d' ')
 | 
			
		||||
    for RES in $SR
 | 
			
		||||
    do
 | 
			
		||||
        # monitor position/offset
 | 
			
		||||
        SRX=$(echo $RES | cut -d'x' -f 1)                   # x pos
 | 
			
		||||
        SRY=$(echo $RES | cut -d'x' -f 2 | cut -d'+' -f 1)  # y pos
 | 
			
		||||
        SROX=$(echo $RES | cut -d'x' -f 2 | cut -d'+' -f 2) # x offset
 | 
			
		||||
        SROY=$(echo $RES | cut -d'x' -f 2 | cut -d'+' -f 3) # y offset
 | 
			
		||||
        PX=$(($SROX + $SRX/2 - $RX/2))
 | 
			
		||||
        PY=$(($SROY + $SRY/2 - $RY/2))
 | 
			
		||||
 | 
			
		||||
        convert /tmp/screen.png $lock_icon -geometry +$PX+$PY -composite -matte  /tmp/screen.png
 | 
			
		||||
        echo "done"
 | 
			
		||||
    done
 | 
			
		||||
fi
 | 
			
		||||
# dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop
 | 
			
		||||
i3lock -e -n -u -i /tmp/screen.png
 | 
			
		||||
 | 
			
		||||
# Turn the screen off after a delay.
 | 
			
		||||
sleep 60; pgrep i3lock && xset dpms force off
 | 
			
		||||
							
								
								
									
										22
									
								
								scripts/notify_brightness.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,22 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
brightness=$((`xbacklight|cut -f1 -d"."` + 1 ))
 | 
			
		||||
echo $brightness
 | 
			
		||||
 | 
			
		||||
if [ $brightness -lt 10 ]
 | 
			
		||||
then
 | 
			
		||||
  status="notification-display-brightness-off"
 | 
			
		||||
elif [ $brightness -lt "30" ]
 | 
			
		||||
then
 | 
			
		||||
  status="notification-display-brightness-low"
 | 
			
		||||
elif [ $brightness -lt "60" ]
 | 
			
		||||
then
 | 
			
		||||
  status="notification-display-brightness-medium"
 | 
			
		||||
elif [ $brightness -lt "95" ]
 | 
			
		||||
then
 | 
			
		||||
  status="notification-display-brightness-high"
 | 
			
		||||
else
 | 
			
		||||
  status="notification-display-brightness-full"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
notify-send " " -i $status -h int:value:$brightness -h string:x-canonical-private-synchronous:brightness
 | 
			
		||||
							
								
								
									
										62
									
								
								scripts/notify_examples.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,62 @@
 | 
			
		||||
#!/bin/sh
 | 
			
		||||
 | 
			
		||||
notify-send "Take note" "The next example will test the icon-only layout-case" -i dialog-info
 | 
			
		||||
sleep 2
 | 
			
		||||
notify-send "Eject" -i notification-device-eject -h string:x-canonical-private-icon-only:
 | 
			
		||||
sleep 2
 | 
			
		||||
notify-send "WiFi signal found" -i notification-network-wireless-medium
 | 
			
		||||
sleep 2
 | 
			
		||||
notify-send "WiFi signal lost" -i notification-network-wireless-disconnected
 | 
			
		||||
sleep 2
 | 
			
		||||
notify-send "Volume" -i notification-audio-volume-medium -h int:value:75 -h string:x-canonical-private-synchronous:
 | 
			
		||||
sleep 2
 | 
			
		||||
notify-send "Volume" -i notification-audio-volume-low -h int:value:30 -h string:x-canonical-private-synchronous:
 | 
			
		||||
sleep 2
 | 
			
		||||
notify-send "Brightness" -i notification-display-brightness-high -h int:value:101 -h string:x-canonical-private-synchronous:
 | 
			
		||||
sleep 2
 | 
			
		||||
notify-send "Brightness" -i notification-keyboard-brightness-medium -h int:value:45 -h string:x-canonical-private-synchronous:
 | 
			
		||||
sleep 2
 | 
			
		||||
notify-send "Testing markup" "Some <b>bold</b>, <u>underlined</u>, <i>italic</i> text. Note, you should not see any marked up text."
 | 
			
		||||
sleep 2
 | 
			
		||||
notify-send "Jamshed Kakar" "Hey, what about this restaurant? http://www.blafasel.org
 | 
			
		||||
Would you go from your place by train or should I pick you up from work? What do you think?"
 | 
			
		||||
sleep 2
 | 
			
		||||
notify-send "English bubble" "The quick brown fox jumps over the lazy dog." -i network
 | 
			
		||||
sleep 2
 | 
			
		||||
notify-send "Bubble from Germany" "Polyfon zwitschernd aßen Mäxchens Vögel Rüben, Joghurt und Quark." -i gnome-system
 | 
			
		||||
sleep 2
 | 
			
		||||
notify-send "Very russian" "Съешь ещё этих мягких французских булок, да выпей чаю." -i dialog-info
 | 
			
		||||
sleep 2
 | 
			
		||||
notify-send "More from Germany" "Oje, Qualm verwölkt Dix zig Farbtriptychons." -i gnome-globe
 | 
			
		||||
sleep 2
 | 
			
		||||
notify-send "Filter the world 1/3" "<a href=\"http://www.ubuntu.com/\">Ubuntu</a>
 | 
			
		||||
Don't rock the boat
 | 
			
		||||
Kick him while he's down
 | 
			
		||||
\"Film spectators are quiet vampires.\"
 | 
			
		||||
Peace & Love
 | 
			
		||||
War & Peace
 | 
			
		||||
Law & Order
 | 
			
		||||
Love & War
 | 
			
		||||
7 > 3
 | 
			
		||||
7 > 3"
 | 
			
		||||
sleep 2
 | 
			
		||||
notify-send "Filter the world 2/3" "7 > 3
 | 
			
		||||
7 > 3
 | 
			
		||||
14 < 42
 | 
			
		||||
14 < 42
 | 
			
		||||
14 < 42
 | 
			
		||||
14 < 42
 | 
			
		||||
><
 | 
			
		||||
<>
 | 
			
		||||
< this is not a tag >
 | 
			
		||||
<i>Not italic</i>"
 | 
			
		||||
sleep 2
 | 
			
		||||
notify-send "Filter the world 3/3" "<b>So broken</i>
 | 
			
		||||
<img src=\"foobar.png\" />Nothing to see
 | 
			
		||||
<u>Test</u>
 | 
			
		||||
<b>Bold</b>
 | 
			
		||||
<span>Span</span>
 | 
			
		||||
<s>E-flat</s>
 | 
			
		||||
<sub>Sandwich</sub>
 | 
			
		||||
<small>Fry</small>
 | 
			
		||||
<tt>Testing tag</tt>"
 | 
			
		||||
							
								
								
									
										29
									
								
								scripts/notify_sound.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,29 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
volume=$(amixer sget Master | grep % | cut -f 7 -d " " | grep "[0-9]*" -o | head -1)
 | 
			
		||||
muted=$(amixer sget Master | grep % | cut -f 8 -d " " | head -1 | grep "off" -o)
 | 
			
		||||
echo $volume
 | 
			
		||||
 | 
			
		||||
if [ $muted == "off" ]
 | 
			
		||||
then
 | 
			
		||||
  notify-send " " -i notification-audio-volume-muted -h int:value:0 -h string:x-canonical-private-synchronous:audio
 | 
			
		||||
  exit
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [ $volume -eq 0 ]
 | 
			
		||||
then
 | 
			
		||||
  status="notification-audio-volume-muted"
 | 
			
		||||
elif [ $volume -lt 20 ]
 | 
			
		||||
then
 | 
			
		||||
  status="notification-audio-volume-off"
 | 
			
		||||
elif [ $volume -lt "50" ]
 | 
			
		||||
then
 | 
			
		||||
  status="notification-audio-volume-low"
 | 
			
		||||
elif [ $volume -lt "80" ]
 | 
			
		||||
then
 | 
			
		||||
  status="notification-audio-volume-medium"
 | 
			
		||||
else
 | 
			
		||||
  status="notification-audio-volume-high"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
notify-send " " -i $status -h int:value:$volume -h string:x-canonical-private-synchronous:audio
 | 
			
		||||
							
								
								
									
										99
									
								
								scripts/playonlinux/office2010.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,99 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 
 | 
			
		||||
# CHANGELOG
 | 
			
		||||
# [Quentin PÂRIS] (2012-05-05 14-45)
 | 
			
		||||
#   Wine version set to 1.5.3, Outlook 2010 compatiblity
 | 
			
		||||
# [Quentin PÂRIS] (2012-05-05 15-05)
 | 
			
		||||
#   Check winbind presence on Linux, required to install
 | 
			
		||||
#   Adding gettext support
 | 
			
		||||
# [Quentin PÂRIS] (2012-05-12 18-36)
 | 
			
		||||
#   Requires 4.0.18
 | 
			
		||||
# [SuperPlumus] (2013-06-09 14-44)
 | 
			
		||||
#   gettext
 | 
			
		||||
# [Quentin PÂRIS] (2014-07-21 17-09)
 | 
			
		||||
#   Updating with the latest WineHQ version
 | 
			
		||||
 
 | 
			
		||||
[ "$PLAYONLINUX" = "" ] && exit 0
 | 
			
		||||
source "$PLAYONLINUX/lib/sources"
 | 
			
		||||
 
 | 
			
		||||
PREFIX="Office2010"
 | 
			
		||||
WINEVERSION="2.12"
 | 
			
		||||
TITLE="Microsoft Office 2010"
 | 
			
		||||
 
 | 
			
		||||
POL_GetSetupImages "http://files.playonlinux.com/resources/setups/Office/top.jpg" "http://files.playonlinux.com/resources/setups/Office/left.png" "$TITLE"
 | 
			
		||||
 
 | 
			
		||||
POL_SetupWindow_Init
 | 
			
		||||
POL_SetupWindow_SetID 801
 | 
			
		||||
 
 | 
			
		||||
POL_SetupWindow_presentation "$TITLE" "Microsoft" "http://www.microsoft.com" "Quentin PÂRIS" "$PREFIX"
 | 
			
		||||
 
 | 
			
		||||
POL_RequiredVersion 4.0.18 || POL_Debug_Fatal "$TITLE won't work with $APPLICATION_TITLE $VERSION\nPlease update"
 | 
			
		||||
 
 | 
			
		||||
if [ "$POL_OS" = "Linux" ]; then
 | 
			
		||||
        wbinfo -V || POL_Debug_Fatal "Please install winbind before installing $TITLE"
 | 
			
		||||
fi
 | 
			
		||||
POL_Debug_Init
 | 
			
		||||
POL_System_SetArch "x86"
 | 
			
		||||
 
 | 
			
		||||
 
 | 
			
		||||
POL_SetupWindow_InstallMethod "LOCAL,DVD"
 | 
			
		||||
 
 | 
			
		||||
if [ "$INSTALL_METHOD" = "DVD" ]; then
 | 
			
		||||
        POL_SetupWindow_cdrom
 | 
			
		||||
        POL_SetupWindow_check_cdrom "x86/setup.exe" "setup.exe"
 | 
			
		||||
        SetupIs="$CDROM_SETUP"
 | 
			
		||||
        cd "$CDROM"
 | 
			
		||||
else
 | 
			
		||||
        POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
 | 
			
		||||
        SetupIs="$APP_ANSWER"
 | 
			
		||||
fi
 | 
			
		||||
 
 | 
			
		||||
POL_Wine_SelectPrefix "$PREFIX"
 | 
			
		||||
POL_Wine_PrefixCreate "$WINEVERSION"
 | 
			
		||||
 
 | 
			
		||||
if [ "$POL_OS" = "Mac" ]; then
 | 
			
		||||
    # Samba support
 | 
			
		||||
    POL_Call POL_GetTool_samba3
 | 
			
		||||
    source "$POL_USER_ROOT/tools/samba3/init"
 | 
			
		||||
fi
 | 
			
		||||
 
 | 
			
		||||
 
 | 
			
		||||
POL_Wine_WaitBefore "$TITLE"
 | 
			
		||||
[ "$CDROM" ] && cd "$CDROM"
 | 
			
		||||
 
 | 
			
		||||
if [ ! "$(file $SetupIs | grep 'x86-64')" = "" ]; then
 | 
			
		||||
    POL_Debug_Fatal "$(eval_gettext "The 64bits version is not compatible! Sorry")";
 | 
			
		||||
fi
 | 
			
		||||
POL_Wine "$SetupIs"
 | 
			
		||||
POL_Wine_WaitExit "$TITLE"
 | 
			
		||||
 
 | 
			
		||||
# See http://forum.winehq.org/viewtopic.php?f=8&t=23126&p=95555#p95555
 | 
			
		||||
POL_Wine_OverrideDLL "native,builtin" "riched20"
 | 
			
		||||
 
 | 
			
		||||
# Fix a crash when loading a file
 | 
			
		||||
POL_Call POL_Install_msxml6
 | 
			
		||||
 
 | 
			
		||||
POL_Shortcut "WINWORD.EXE" "Microsoft Word 2010" "" "" "Office;WordProcessor;"
 | 
			
		||||
POL_Shortcut "EXCEL.EXE" "Microsoft Excel 2010" "" "" "Office;Spreadsheet;"
 | 
			
		||||
POL_Shortcut "POWERPNT.EXE" "Microsoft Powerpoint 2010" "" "" "Office;Presentation;"
 | 
			
		||||
POL_Shortcut "ONENOTE.EXE" "Microsoft OneNote 2010" "" "" "Network;InstantMessaging;" # No category for collaborative work?
 | 
			
		||||
POL_Shortcut "OUTLOOK.EXE" "Microsoft Outlook 2010" "" "" "Network;Email;" # Calendar;ContactManagement; ? :p
 | 
			
		||||
 
 | 
			
		||||
POL_Extension_Write doc "Microsoft Word 2010"
 | 
			
		||||
POL_Extension_Write docx "Microsoft Word 2010"
 | 
			
		||||
POL_Extension_Write xls "Microsoft Excel 2010"
 | 
			
		||||
POL_Extension_Write xlsx "Microsoft Excel 2010"
 | 
			
		||||
POL_Extension_Write ppt "Microsoft Powerpoint 2010"
 | 
			
		||||
POL_Extension_Write pptx "Microsoft Powerpoint 2010"
 | 
			
		||||
 
 | 
			
		||||
if [ "$POL_OS" = "Mac" ]; then
 | 
			
		||||
    POL_Shortcut_InsertBeforeWine "Microsoft Word 2010" "source \"$POL_USER_ROOT/tools/samba3/init\""
 | 
			
		||||
    POL_Shortcut_InsertBeforeWine "Microsoft Excel 2010" "source \"$POL_USER_ROOT/tools/samba3/init\""
 | 
			
		||||
    POL_Shortcut_InsertBeforeWine "Microsoft Powerpoint 2010" "source \"$POL_USER_ROOT/tools/samba3/init\""
 | 
			
		||||
    POL_Shortcut_InsertBeforeWine "Microsoft OneNote 2010" "source \"$POL_USER_ROOT/tools/samba3/init\""
 | 
			
		||||
    POL_Shortcut_InsertBeforeWine "Microsoft Outlook 2010" "source \"$POL_USER_ROOT/tools/samba3/init\""
 | 
			
		||||
fi
 | 
			
		||||
 
 | 
			
		||||
POL_SetupWindow_message "$(eval_gettext '$TITLE has been installed successfully\n\nIf an installation Windows prevent your programs from running, you must remove and reinstall $TITLE')" "$TITLE"
 | 
			
		||||
POL_SetupWindow_Close
 | 
			
		||||
exit
 | 
			
		||||
							
								
								
									
										10
									
								
								scripts/toggle_monitor.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,10 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
left=HDMI-0
 | 
			
		||||
right=DVI-I-3
 | 
			
		||||
 | 
			
		||||
#if xrandr | grep "$right disconnected"; then
 | 
			
		||||
if ! xrandr --listmonitors | grep "$right"; then
 | 
			
		||||
    xrandr --output "$right" --primary --auto --output "$left" --left-of "$right" --auto
 | 
			
		||||
else
 | 
			
		||||
    xrandr --output "$right" --off --output "$left" --auto
 | 
			
		||||
fi
 | 
			
		||||
							
								
								
									
										6
									
								
								scripts/touchpad_enable_tapping.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,6 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
device=$(xinput | grep Touchpad | grep -o "id=[0-9]*" | cut -f 2 -d "=")
 | 
			
		||||
prop=$(xinput list-props $device | grep "Tapping Enabled" | head -n 1 | grep -o "([0-9]*)" | grep -o "[0-9]*")
 | 
			
		||||
 | 
			
		||||
xinput set-prop $device $prop 1
 | 
			
		||||
							
								
								
									
										44
									
								
								scripts/tunes.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						@@ -0,0 +1,44 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
# https://community.spotify.com/t5/Help-Desktop-Linux-Windows-Web/Conky-Spotify-quot-Now-Playing-quot-scripts/m-p/812541#M88825
 | 
			
		||||
 | 
			
		||||
SYMBOL="♫ "
 | 
			
		||||
 | 
			
		||||
ARTIST="$(dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'|egrep -A 2 "artist"|egrep -v "artist"|egrep -v "array"|cut -b 27-|cut -d '"' -f 1|egrep -v ^$)"
 | 
			
		||||
 | 
			
		||||
TITLE="$(dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'|egrep -A 1 "title"|egrep -v "title"|cut -b 44-|cut -d '"' -f 1|egrep -v ^$)"
 | 
			
		||||
 | 
			
		||||
#TIME="$(dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'|egrep -A 2 "time"|cut -d " " -f 3|cut -c 6-)"
 | 
			
		||||
 | 
			
		||||
#if [ ! -f "/tmp/tunes_time" ] ; then
 | 
			
		||||
#	TIME_OLD=0
 | 
			
		||||
#else
 | 
			
		||||
#	TIME_OLD=$(cat /tmp/tunes_time)
 | 
			
		||||
#fi
 | 
			
		||||
#
 | 
			
		||||
#if [ $TIME == $TIME_OLD ]
 | 
			
		||||
#	then
 | 
			
		||||
#		exit 0
 | 
			
		||||
#fi
 | 
			
		||||
 | 
			
		||||
#echo "$TIME" > /tmp/tunes_time
 | 
			
		||||
 | 
			
		||||
if [ -n "$ARTIST" ]
 | 
			
		||||
	then
 | 
			
		||||
		index=$(expr index "$ARTIST" -)
 | 
			
		||||
		if [ $index -gt 0 ]
 | 
			
		||||
			then
 | 
			
		||||
				length=$((${#ARTIST} - $index + 2))
 | 
			
		||||
				ARTIST=${ttest::-$length}
 | 
			
		||||
		fi
 | 
			
		||||
		OUTPUT="$SYMBOL $ARTIST - $TITLE"
 | 
			
		||||
		if [ ${#OUTPUT} -gt 35 ]
 | 
			
		||||
		then
 | 
			
		||||
			OUTPUT="$SYMBOL $TITLE"
 | 
			
		||||
		fi
 | 
			
		||||
	else
 | 
			
		||||
		OUTPUT=""
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
echo "$OUTPUT"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										7
									
								
								workarounds/inc_max_user_watches.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,7 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
# for e.g. nextcloud client, if it doesn't sync anymore
 | 
			
		||||
 | 
			
		||||
echo fs.inotify.max_user_watches=524288 | sudo tee /etc/sysctl.d/40-max-user-watches.conf
 | 
			
		||||
 | 
			
		||||
sudo sysctl --system
 | 
			
		||||