fixed media keys, added mpd to lemonbar..

This commit is contained in:
Enrico Fasoli 2015-08-26 10:42:05 +00:00
parent 1bb873a7bd
commit 5d56266be4
5 changed files with 35 additions and 24 deletions

3
config.nix Normal file
View File

@ -0,0 +1,3 @@
{
allowUnfree = true;
}

View File

@ -36,7 +36,7 @@
# Development # Development
atom git atom git
# Desktop and appliations # Desktop and appliations
sxhkd tmux htop ranger w3m rxvt_unicode chromium dmenu gnupg irssi bar sxhkd tmux htop ranger w3m rxvt_unicode chromium dmenu gnupg irssi bar bc
# Games # Games
minecraft minecraft
# Media # Media

View File

@ -6,6 +6,7 @@ echo "Installing dotfiles"
sudo cp configuration.nix /etc/nixos/ sudo cp configuration.nix /etc/nixos/
echo "Activating NixOS configuration" echo "Activating NixOS configuration"
sudo nixos-rebuild switch sudo nixos-rebuild switch
cp config.nix ~/.nixpkgs/
# Custom Binaries # Custom Binaries

View File

@ -1,25 +1,29 @@
buildClock() { buildClock() {
echo -n $(date "+%A, %e %B, %k:%M:%S") echo -n $(date "+%A, %e %B, %k:%M:%S")
} }
getVolume() { getVolume() {
echo -n "|Vol| $(amixer get Master | sed -n 's/^.*\[\([0-9]\+\)%.*$/\1/p' | uniq)%%" echo -n "$(amixer get Master | sed -n 's/^.*\[\([0-9]\+\)%.*$/\1/p' | uniq)%%"
} }
getRAM(){ getMPD(){
echo -n "free -m | awk 'NR == 2 {gsub(/%/,''); print }'" echo -n "♫ "
if [ "$(mpc | wc -l)" -gt 1 ]; then
echo -n "$(mpc | cut -d$'\n' -f1) | $(mpc | cut -d$'\n' -f2)"
fi
} }
getCPU(){ getNET(){
echo -n "grep 'cpu ' /proc/stat | awk '{usage=(+)*100/(++)} END {print usage}'" echo -n "$(curl -s http://canihazip.com/s)"
} }
buildBar () { buildBar () {
while true while true
do do
echo "$(getVolume)%{c}$(buildClock)%{r}|IP| $(curl -s http://canihazip.com/s)" echo "$(getVolume) $(getMPD) %{c}$(buildClock)%{r}$(getNET)"
sleep 1 sleep 1
done done
} }
buildBar | lemonbar -p -g "1872x20+24+8" -B "#181b20" -F "#9b9081" -f -gohu-gohufont-medium-r-normal--14-100-100-100-c-80-iso10646-1 buildBar | lemonbar -p -g "1872x20+24+8" -B "#181b20" -F "#9b9081" -f -gohu-gohufont-medium-r-normal--14-100-100-100-c-80-iso10646-1

35
sxhkdrc
View File

@ -4,7 +4,7 @@
super + alt + Escape super + alt + Escape
for id in $(bspc query -W); do bspc window $id -c; done; \ for id in $(bspc query -W); do bspc window $id -c; done; \
bspc quit && shutdown bspc quit
super + w super + w
bspc window -c bspc window -c
@ -88,23 +88,26 @@ super + space
#super + Escape #super + Escape
# pkill -USR1 -x sxhkd # pkill -USR1 -x sxhkd
# # media
# my stuff XF86AudioRaiseVolume
#
# volume controls
F9
amixer set Master 3- unmute
F10
amixer set Master 3+ unmute amixer set Master 3+ unmute
F11 XF86AudioLowerVolume
amixer set Master 0 amixer set Master 3- unmute
XF86AudioMute
amixer set Master mute
XF86AudioPlay
amixer set Master unmute
XF86HomePage
chromium
XF86Calculator
urxvt -e bc
XF86Mail
chromium --app=https://inbox.google.com
# turn screen off # lock
F12
lock; sleep 2; xset dpms force off XF86Sleep
alt + F12 lock
lock
# screenshots # screenshots
Print Print