Added tasks and mail to lemonbar

This commit is contained in:
Carolyn Saunders 2016-12-16 13:06:16 -08:00
parent d3179d9345
commit 93fba2472f
16 changed files with 503 additions and 17 deletions

View file

@ -1,5 +1,5 @@
[admiral] [admiral]
items = ["left", "padding", "workspaces", "right", "network", "padding", "volume", "padding", "battery", "padding", "clock", "padding"] items = ["left", "padding", "workspaces", "padding", "title", "padding", "right", "tasks", "padding", "mail", "padding", "cpu", "padding", "memory", "padding", "battery", "padding", "clock", "padding"]
[left] [left]
path = "echo '%{l}'" path = "echo '%{l}'"
@ -18,23 +18,31 @@ path = "echo ' '"
static = true static = true
[battery] [battery]
path = "./battery.sh" path = "$HOME/.scripts/battery.sh"
reload = 3 reload = 3
[network] [mail]
path = "$HOME/.scripts/networkname.sh" path = "$HOME/.scripts/mail.sh"
reload = 5 reload = 5
[volume]
path = "./volume.sh"
reload = 0.05
[workspaces] [workspaces]
path = "./bspwm_workspaces.sh" path = "$HOME/.scripts/workspaces.sh"
[title] [title]
path = "xtitle -s | scroller -o -l 60" path = "xtitle -s | roller -t 50"
[clock] [clock]
path = "date '+%D %H:%M' " path = "date '+%m/%d %H:%M' "
reload = 1 reload = 1
[memory]
path = "$HOME/.scripts/memory.sh"
reload = 0.05
[cpu]
path = "$HOME/.scripts/cpu.sh"
reload = 0.05
[tasks]
path= "$HOME/.scripts/tasks.sh | grep /"
reload = 5

27
.config/bspwm/bspwmrc Executable file
View file

@ -0,0 +1,27 @@
#!/bin/bash
sxhkd &
bspc config border_width 3
bspc config window_gap 20
bspc config top_padding 50
bspc config right_padding 0
bspc config bottom_padding 0
bspc config left_padding 0
bspc config split_ratio 0.50
bspc config focus_follows_pointer true
bspc config pointer_follows_monitor true
bspc config focused_border_color "#7986cb"
bspc config active_border_color "#7986cb"
bspc config normal_border_color "#121315"
bspc config presel_feedback_color "#181818"
bspc monitor -d I II III IV V VI
xsetroot -cursor_name left_ptr
~/.scripts/fehbg.sh
~/.scripts/bar.sh
compton &

View file

@ -0,0 +1,7 @@
#!/bin/sh
# Initial import
notmuch new
# Tagging
notmuch tag -inbox +archive folder:Archive

141
.config/sxhkd/sxhkd/sxhkdrc Normal file
View file

@ -0,0 +1,141 @@
#
# wm independent hotkeys
#
# increase / decrease volume
XF86Audio{Raise,Lower}Volume
amixer -q sset Master {2%+,2%-} unmute
# Mute volume
XF86AudioMute
amixer -q sset Master toggle
# brightness
XF86MonBrightness{Up,Down}
xbacklight -time 1 -steps 1 -{inc,dec} 5
# terminal emulator
super + Return
st
# program launcher
super + space
rofi -show run -m -1 -padding 20 -width 30 -lines 5 -color-window "#111314, #7986cb, #7986cb" -color-normal "#111314, #7986cb, #111314, #7986cb, #111314" -color-active "#111314, #7986cb, #111314, #7986cb, #111314" -location 0 -font "Inconsolata 17" -bc "#7986cb" -bw 2 -opacity 100 -regex
# window management
super + shift + space
rofi -show window -m -1 -padding 20 -width 30 -lines 5 -color-window "#111314, #7986cb, #7986cb" -color-normal "#111314, #7986cb, #111314, #7986cb, #111314" -color-active "#111314, #7986cb, #111314, #7986cb, #111314" -location 0 -font "Inconsolata 17" -bc "#7986cb" -bw 2 -opacity 100
# make sxhkd reload its configuration files:
super + Escape
pkill -USR1 -x sxhkd
#
# bspwm hotkeys
#
# quit bspwm normally
super + alt + Escape
bspc quit
# close and kill
super + {_,shift + }w
bspc node -{c,k}
# 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}
bspc {desktop -f,node -d} '^{1-9}'
#
# 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 {@west -r -10,@south -r +10,@north -r -10,@east -r +10}
# contract a window by moving one of its side inward
super + alt + shift + {h,j,k,l}
bspc node {@east -r -10,@north -r +10,@south -r -10,@west -r +10}
# move a floating window
super + {Left,Down,Up,Right}
xdo move {-x -20,-y +20,-y -20,-x +20}

141
.config/sxhkd/sxhkdrc Executable file
View file

@ -0,0 +1,141 @@
#
# wm independent hotkeys
#
# increase / decrease volume
XF86Audio{Raise,Lower}Volume
amixer -q sset Master {2%+,2%-} unmute
# Mute volume
XF86AudioMute
amixer -q sset Master toggle
# brightness
XF86MonBrightness{Up,Down}
xbacklight -time 1 -steps 1 -{inc,dec} 5
# terminal emulator
super + Return
st
# program launcher
super + p
rofi -show run -m -1 -padding 20 -width 30 -lines 5 -color-window "#111314, #7986cb, #7986cb" -color-normal "#111314, #7986cb, #111314, #7986cb, #111314" -color-active "#111314, #7986cb, #111314, #7986cb, #111314" -location 0 -font "Inconsolata 17" -bc "#7986cb" -bw 2 -opacity 100 -regex
# window management
super + shift + p
rofi -show window -m -1 -padding 20 -width 30 -lines 5 -color-window "#111314, #7986cb, #7986cb" -color-normal "#111314, #7986cb, #111314, #7986cb, #111314" -color-active "#111314, #7986cb, #111314, #7986cb, #111314" -location 0 -font "Inconsolata 17" -bc "#7986cb" -bw 2 -opacity 100
# make sxhkd reload its configuration files:
super + Escape
pkill -USR1 -x sxhkd
#
# bspwm hotkeys
#
# quit bspwm normally
super + alt + Escape
bspc quit
# close and kill
super + {_,shift + }w
bspc node -{c,k}
# 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}
bspc {desktop -f,node -d} '^{1-9}'
#
# 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 {@west -r -10,@south -r +10,@north -r -10,@east -r +10}
# contract a window by moving one of its side inward
super + alt + shift + {h,j,k,l}
bspc node {@east -r -10,@north -r +10,@south -r -10,@west -r +10}
# move a floating window
super + {Left,Down,Up,Right}
xdo move {-x -20,-y +20,-y -20,-x +20}

98
.notmuch-config Normal file
View file

@ -0,0 +1,98 @@
# .notmuch-config - Configuration file for the notmuch mail system
#
# For more information about notmuch, see http://notmuchmail.org
# Database configuration
#
# The only value supported here is 'path' which should be the top-level
# directory where your mail currently exists and to where mail will be
# delivered in the future. Files should be individual email messages.
# Notmuch will store its database within a sub-directory of the path
# configured here named ".notmuch".
#
[database]
path=/home/gigavinyl/mail
# User configuration
#
# Here is where you can let notmuch know how you would like to be
# addressed. Valid settings are
#
# name Your full name.
# primary_email Your primary email address.
# other_email A list (separated by ';') of other email addresses
# at which you receive email.
#
# Notmuch will use the various email addresses configured here when
# formatting replies. It will avoid including your own addresses in the
# recipient list of replies, and will set the From address based on the
# address to which the original email was addressed.
#
[user]
name=Carolyn Saunders
primary_email=gigavinyl@gmail.com
other_email=timandmoby@gmail.com;600006667@fjuhsd.org;
# Configuration for "notmuch new"
#
# The following options are supported here:
#
# tags A list (separated by ';') of the tags that will be
# added to all messages incorporated by "notmuch new".
#
# ignore A list (separated by ';') of file and directory names
# that will not be searched for messages by "notmuch new".
#
# NOTE: *Every* file/directory that goes by one of those
# names will be ignored, independent of its depth/location
# in the mail store.
#
[new]
tags=unread;inbox;
ignore=
# Search configuration
#
# The following option is supported here:
#
# exclude_tags
# A ;-separated list of tags that will be excluded from
# search results by default. Using an excluded tag in a
# query will override that exclusion.
#
[search]
exclude_tags=deleted;spam;
# Maildir compatibility configuration
#
# The following option is supported here:
#
# synchronize_flags Valid values are true and false.
#
# If true, then the following maildir flags (in message filenames)
# will be synchronized with the corresponding notmuch tags:
#
# Flag Tag
# ---- -------
# D draft
# F flagged
# P passed
# R replied
# S unread (added when 'S' flag is not present)
#
# The "notmuch new" command will notice flag changes in filenames
# and update tags, while the "notmuch tag" and "notmuch restore"
# commands will notice tag changes and update flags in filenames
#
[maildir]
synchronize_flags=true
# Cryptography related configuration
#
# The following option is supported here:
#
# gpg_path
# binary name or full path to invoke gpg.
#
[crypto]
gpg_path=gpg

23
.offlineimaprc Normal file
View file

@ -0,0 +1,23 @@
[general]
accounts = gigavinyl
pythonfile = ~/.offlineimappass.py
[Account gigavinyl]
localrepository = gigavinyl-local
remoterepository = gigavinyl-remote
postsynchook = ~/.config/offlineimap/hooks/postsync_gigavinyl
[Repository gigavinyl-local]
type = Maildir
localfolders = ~/mail/gigavinyl
[Repository gigavinyl-remote]
type = Gmail
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
remotehost = imap.gmail.com
remoteport = 993
remoteusereval = "gigavinyl@gmail.com"
remotepasseval = get_pass("gigavinyl")
nametrans = lambda folder: {'[Gmail]/All Mail': 'archive',
}.get(folder, folder)
folderfilter = lambda folder: folder == '[Gmail]/All Mail'

View file

@ -2,7 +2,7 @@
pkill admiral pkill admiral
font="Gohufont:size=10" font="GohuFont:style=Regular:size=9"
fallback_font="FontAwesome:size=8" fallback_font="FontAwesome:size=8"
background="#cc111314" background="#cc111314"
foreground="#bcbdc3" foreground="#bcbdc3"

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
status="$(cat /sys/class/power_supply/BAT0/status)" status="$(acpi | awk '{orint $3;}' | sed 's/,//g')"
capacity="$(cat /sys/class/power_supply/BAT0/capacity)" capacity=$(acpi | awk '{print $4;}' | sed 's/%//g' | sed 's/,//g')
color=false color=false
echo -n "%{F#e5c078}" echo -n "%{F#e5c078}"
if [[ $status == "Charging" ]]; then if [[ $status == "Charging" ]]; then
@ -19,7 +19,7 @@ elif [[ $capacity -ge "0" ]]; then
fi fi
echo -n "%{F-}" echo -n "%{F-}"
echo -n "Bat: $capacity%" echo -n "Bat: $capacity% [$(spark $capacity)]"
if [[ color ]]; then if [[ color ]]; then
echo "%{F-}" echo "%{F-}"

6
.scripts/cpu.sh Executable file
View file

@ -0,0 +1,6 @@
#!/bin/bash
percent=$(top -bn1 | grep "Cpu(s)" | \
sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | \
awk '{print 100 - $1}')
sparks=$(spark 0 $percent 100)
echo "CPU: $(echo "$percent% [${sparks:1:1}]")"

2
.scripts/fehbg.sh Executable file
View file

@ -0,0 +1,2 @@
#!/bin/bash
feh --randomize --bg-fill ~/Wallpapers/*

3
.scripts/mail.sh Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
NEWEMAILS=$(ls $HOME/mail/**/archive/new | wc -l)
echo "Mail: $NEWEMAILS"

4
.scripts/memory.sh Executable file
View file

@ -0,0 +1,4 @@
#!/bin/bash
used=$(free | grep Mem | awk '{print $3/$2 * 100.0}')
sparks=$(spark 0 $used 100)
echo "Mem: $(echo "($used+0.5)/1" | bc)% [${sparks:1:1}]"

18
.scripts/offlineimap-notify.sh Executable file
View file

@ -0,0 +1,18 @@
#!/bin/sh
#run OfflineIMAP once, with quiet interface
offlineimap -o -q -u quiet
count new mail for every maildir
#maildirnew="$HOME/mail/*/*/new/"
#new="$(find $maildirnew -type f | wc -l)"
count old mail for every maildir
#maildirold="$HOME/mail/*/*/cur/"
#old="$(find $maildirold -type f | wc -l)"
#if [ $new -gt 0 ]
#then
#export DISPLAY=:0; export XAUTHORITY=~/.Xauthority;
#notify-send -a "OfflineIMAP" "New mail! New: $new Old: $old"
#fi

4
.scripts/tasks.sh Executable file
View file

@ -0,0 +1,4 @@
#!/bin/sh
today="$(task list due:today | grep tasks | awk '{print $1;}')"
total="$(task list | grep tasks | awk '{print $1;}')"
echo "Tasks: $today/$total"

8
.zshrc
View file

@ -22,9 +22,10 @@ bindkey "^[[B" down-line-or-beginning-search # Down
source ~/.zplug/init.zsh source ~/.zplug/init.zsh
zplug "plugins/git", from:oh-my-zsh, nice:10 zplug "plugins/git", from:oh-my-zsh, defer:3
zplug "plugins/sudo", from:oh-my-zsh zplug "plugins/sudo", from:oh-my-zsh
zplug "lib/theme-and-appearance", from:oh-my-zsh zplug "lib/theme-and-appearance", from:oh-my-zsh
zplug "plugins/taskwarrior", from:oh-my-zsh
zplug "zsh-users/zsh-syntax-highlighting" zplug "zsh-users/zsh-syntax-highlighting"
zplug "zsh-users/zsh-history-substring-search" zplug "zsh-users/zsh-history-substring-search"
zplug "zsh-users/zsh-completions" zplug "zsh-users/zsh-completions"
@ -45,11 +46,14 @@ export EDITOR="nvim"
eval "$(hub alias -s)" eval "$(hub alias -s)"
alias vi="nvim" alias vi="nvim"
alias vim="nvim" alias vim="nvim"
alias cl="clear && neofetch" alias cl="clear && neofetch --ascii_distro Gentoo && task list"
alias prm=". $HOME/.prm/prm.sh" alias prm=". $HOME/.prm/prm.sh"
alias bar=". $HOME/.scripts/bar.sh"
. $HOME/.asdf/asdf.sh . $HOME/.asdf/asdf.sh
. $HOME/.asdf/completions/asdf.bash . $HOME/.asdf/completions/asdf.bash
export PATH="$HOME/.apps/Elm-Platform/0.18/.cabal-sandbox/bin/":$PATH export PATH="$HOME/.apps/Elm-Platform/0.18/.cabal-sandbox/bin/":$PATH
export PATH="$HOME/.apps/admiral/target/release/":$PATH export PATH="$HOME/.apps/admiral/target/release/":$PATH
export PATH="$HOME/.apps/roller/target/release":$PATH export PATH="$HOME/.apps/roller/target/release":$PATH
task list