Skip to content

Instantly share code, notes, and snippets.

@maisieccino
Created November 23, 2015 20:42
Show Gist options
  • Save maisieccino/e8324077bcb482a917cd to your computer and use it in GitHub Desktop.
Save maisieccino/e8324077bcb482a917cd to your computer and use it in GitHub Desktop.
christmas dotfiles
Xft.dpi: 96
Xft.antialias: true
Xft.hinting: true
Xft.rgba: rgb
Xft.autohint: false
Xft.hintstyle: hintslight
Xft.lcdfilter: lcddefault
URxvt.scrollBar: false
URxvt*transparent: false
URxvt*shading: 20
URxvt*blurRadius: 20
URxvt*fading: 20
URxvt*saveLines: 1000
URxvt*buffered: false
URxvt.keysym.M-C-c: perl:clipboard:copy
URxvt.keysym.M-C-v: perl:clipboard:paste
URxvt.font: -*-tewi-medium-*-*-*-11-150-*-*-*-*-*-*,\
-wuncon-siji-medium-r-normal--10-100-75-75-c-80-iso10646-1
URxvt*letterSpace: 0
!URxvt*borderColor: #151515
!URxvt*borderColor: #77c3a9
URxvt*borderLess: false
URxvt*colorBD: #ffffff
!! CHRISTMAS THEME
! special
*foreground: #B37E5F
*background: #200002
*cursorColor: #e7e5e5
! black
*color0: #410a0b
*color8: #1B1818
! red
*color1: #754b3a
*color9: #8E4837
! green
*color2: #653B21
*color10: #7A4026
! yellow
*color3: #BE4000
*color11: #D68F2B
! blue
*color4: #20271c
*color12: #1c3706
! magenta
*color5: #c81717
*color13: #d1424d
! cyan
*color6: #DA4195
*color14: #983480
! white
*color7: #D8C2B5
*color15: #d7bf94
! !! DRIFT THEME
! ! special
! *.foreground: #e8dfd6
! !*.background: #021b21
! *.background: #0c1115
! *.cursorColor: #e8dfd6
!
! ! black
! *color0: #032c36
! *color8: #065f73
!
! ! red
! *color1: #c2454e
! *color9: #ef5847
!
! ! green
! *color2: #7cbf9e
! *color10: #a2d9b1
!
! ! yellow
! *color3: #8a7a63
! *color11: #beb090
!
! ! blue
! *color4: #2e3340
! *color12: #61778d
!
! ! magenta
! *color5: #ff5879
! *color13: #ff99a1
!
! ! cyan
! *color6: #44b5b1
! *color14: #9ed9d8
!
! ! white
! *color7: #f2f1b9
! *color15: #f6f6c9
rofi.terminal: urxvt
rofi.lines: 10
rofi.eh: 1
rofi.width: 100
rofi.padding: 480
rofi.opacity: 95
rofi.bw: 0
rofi.bc: #be4000
rofi.bg: #531e11
rofi.fg: #754b3a
rofi.hlbg: #531e11
rofi.hlfg: #d8c2b5
rofi.font: Tewi 8
#!/bin/zsh
# Color directory
CD="$HOME/.Xresources"
# Fetch the Colors
#BG=$(cat ${CD} | grep -i background | tail -c 8)
BG="#0C1115"
FG=$(cat ${CD} | grep -i foreground | tail -c 8)
BLACK=$(cat ${CD} | egrep "^\*color8" | tail -c 8)
RED=$(cat ${CD} | egrep "^\*color9" | tail -c 8)
GREEN=$(cat ${CD} | egrep "^\*color10" | tail -c 8)
YELLOW=$(cat ${CD} | egrep "^\*color11" | tail -c 8)
BLUE=$(cat ${CD} | egrep "^\*color12" | tail -c 8)
MAGENTA=$(cat ${CD} | egrep "^\*color13" | tail -c 8)
CYAN=$(cat ${CD} | egrep "^\*color14" | tail -c 8)
WHITE=$(cat ${CD} | egrep "^\*color15" | tail -c 8)
# Fonts
FONT1="-gohu-gohufont-medium-r-normal--11-80-100-100-c-60-iso8859-1"
FONT2="-*-tewi-medium-*-*-*-11-150-*-*-*-*-*-*"
FONT3="-wuncon-siji-medium-r-normal--10-100-75-75-c-80-iso10646-1"
FONT4="-benis-lemon-medium-r-normal--10-110-75-75-m-50-iso8859-1"
FONT5="-nil-profont-medium-r-normal--10-110-72-72-c-60-iso8859-1"
FONT6="-kakwa-kakwafont-medium-r-normal--12-120-72-72-c-60-iso8859-1"
FONT7="-*-inputmonocondensed-medium-r-*-*-*-*-*-*-*-*-*-*"
# Panel
PW=1880
PH=20
PX=20
PY=15
#Actions
VOLT="amixer sset Master toggle"
VOLU="amixer sset Master 2%+"
VOLD="amixer sset Master 2%-"
TMUS="mpc toggle"
NMUS="mpc next"
POW="~/scripts/power"
# Functions
#Workspace number
ws(){
ws=$(i3-msg -t get_outputs | sed 's/.*"current_workspace":"\([^"]*\)".*/\1/')
echo "%{F$WHITE}${ws}"
}
music() {
music=$(n=$(mpc current); if [ -z "$n" ] ; then echo; else echo " $n"; fi)
echo "%{F$CYAN}${music}"
}
cpu(){
cpu=$(mpstat -P ALL 1 1 | awk '(NR>11) {print $3+$5}' | paste -d " " - - - -)
echo "%{F$YELLOW} ${cpu}"
}
net(){
ip=$(ifconfig enp3s0 | awk '/inet /{print substr($2,1)}' | head -n 1)
if [ ! "$ip" ]; then ip=$(echo "No Connection");fi
# ip=$(ip=$(/sbin/ifconfig | grep wlan0 -A 5 | sed '/inet\ addr/!d;s/.*addr:\([0-9.]*\).*/\1/'); if [ ! -z $ip ]; then echo $ip ;else ip=$(/sbin/ifconfig | grep eth0 -A 5 | sed '/inet addr:/!d;s/.*addr:\([0-9.]*\).*/\1/'); if [ ! -z "$ip" ]; then echo "$ip"; else echo "No ip";fi;fi)
ping=$(pn=$(timeout .8 ping 185.40.64.65 -c 1 -s 24 | sed '2!d;s/.*time=\([0-9]*\).*/\1/'); if [ -z $pn ] ; then echo "No Connection"; else echo "${pn}ms"; fi)
echo "%{F$GREEN} ${ip}"
}
mail() {
mailcount=$(~/scripts/getmail.sh)
echo "%{F$YELLOW} ${mailcount}"
}
ram(){
ram=$(free -h | awk '/\-\/+/ {print $3}')
echo "%{F$YELLOW} ${ram}"
}
temp(){
temp=$(sensors | grep temp1 | sed '1d;s/.*+\([0-9]*\).*/\1/')
echo "%{F$YELLOW} ${temp}C"
}
clock(){
clock=$(date "+%d %b %Y %H:%M")
echo "%{F$RED}${clock}"
}
xmas() {
xmasday=$(date -d "Dec 25 2015" +%s)
now=$(date +%s)
expr="(${xmasday} - ${now}) / 86400"
daysuntil=$(echo ${expr} | bc)
echo "%{F$MAGENTA} ${daysuntil} sleeps until xmas!"
}
vol(){
vol=$(amixer get 'Master' | grep Mono: | sed 's/ *Mono: .* \[\([^ ]*\)\] \[[^ ]*\] \[\([^ ]*\)\]/\1 \2/;s/.*off/off/;s/\([^ ]*\).*/\1/')
echo "%{F$YELLOW} ${vol}"
}
pow(){
FOLD="/sys/class/power_supply"
val=$(if [ -d $FOLD/BAT0 ]; then cat $FOLD/BAT0/capacity; fi)
pow=$(if [ $(cat $FOLD/AC0/online) = 1 ]; then if [ ! -d $FOLD/BAT0 ]; then echo ""; else echo "";fi; else if [[ $val < 12 ]]; then echo ""; else if [[ $val > 90 ]]; then echo ""; else echo "";fi; fi;fi)
echo "%{F$YELLOW}${pow}"
}
while :; do
echo " $(ws) %{c}%{A1:$TMUS:}%{A3:$NMUS:}$(music)%{A}%{A} %{r}$(xmas) $(mail) $(net) %{A:$VOLT:}%{A4:$VOLU:}%{A5:$VOLD:}$(vol) %{A}%{A}%{A} $(clock) %{A:$POW:}  %{A} "
sleep .5
done | lemonbar -g ${PW}x${PH}+${PX}+${PY} -f "$FONT3" -f "$FONT1" -B "$BG" -F "$FG" -p -d | \
while :; do read line; eval $line; done &
set $background #0e0c0a
set $foreground #d9cdbb
set $black #282828
set $darkgrey #928374
set $darkred #cc241d
set $red #fb4934
set $darkgreen #98971a
set $green #b8bb26
set $darkyellow #d79921
set $yellow #fabd2f
set $darkblue #458588
set $blue #83a598
set $darkmagenta #b16286
set $magenta #d3869b
set $darkcyan #689d6a
set $cyan #8ec07c
set $lightgrey #a89984
set $white #ebdbb2
set $FOCUS #bf8f7c
set $UNFOCUS #8f4343
set $BORDERF #6b363a
set $BORDERU #200002
set $float exec --no-startup-id ~/.config/shadow_work_around.sh, floating toggle
# 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:Tewi Regular 8
#font pango:Input Mono 8
font pango:FontAwesome 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 Sans 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
#Wallpaper
exec --no-startup-id feh --bg-fill --no-xinerama ~/Pictures/Wallpapers/Christmas-background-1355304958_61.jpg
#Compton
exec --no-startup-id compton -o 0.3 --backend glx --vsync opengl -b -i 1.0 --config ~/.config/compton.conf
#Gaps
gaps inner 10
gaps outer 10
# borders
#for_window [class="^.*"] border pixel 0
for_window [class="^.*"] border pixel 4
#new_window pixel 3
#new_float pixel 3
# start a terminal
bindsym $mod+Return exec urxvt #-lsp 1
# kill focused window
bindsym $mod+Shift+q kill
# Menu
bindsym $mod+d exec rofi -show run
#bindsym $mod+d exec dmenu_run
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon focus right
# 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 left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon move right
# 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+h 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
bindsym $mod+Shift+space $float
# 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
# MEDIA KEYS
bindsym --release $mod+p exec mpc toggle
bindsym --release $mod+Shift+period exec mpc next
bindsym --release $mod+Shift+comma exec mpc prev
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 -- +10% && killall -SIGUSR1 i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -- -10% && killall -SIGUSR1 i3status
# 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 j resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink height 10 px or 10 ppt
bindsym semicolon 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)
# colours border bg text indicator
client.focused $FOCUS $BORDERF $FOCUS $BORDERF
client.focused_inactive $UNFOCUS $UNFOCUS $UNFOCUS $UNFOCUS
client.unfocused $UNFOCUS $BORDERU $UNFOCUS $BORDERU
client.urgent $FOCUS $FOCUS $FOCUS $FOCUS
client.background $UNFOCUS
#bar {
# status_command conky -c /home/mbell/.config/conky/bar
# position top
# colors {
# background #222222
# statusline #7dc1cf
# separator #7A9388
# # colors outline background number
# focused_workspace #7dc1cf #7dc1cf #222222
# active_workspace #4e9fb1 #4e9fb1 #382d1c
# inactive_workspace #1c2023 #1c2023 #7dc1cf
# urgent_workspace #d23d3d #d23d3d #dddddd
# }
#}
#BAR
exec --no-startup-id conky -c ~/.config/conky/blank
exec ~/.config/lemon/bar
#DUNST
exec dunst
#XSCREENSAVER
exec xscreensaver
set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown
mode "$mode_system" {
bindsym l exec --no-startup-id lock, mode "default"
bindsym e exec --no-startup-id i3-msg exit, mode "default"
bindsym s exec --no-startup-id lock && systemctl suspend, mode "default"
bindsym h exec --no-startup-id lock && systemctl hibernate, mode "default"
bindsym r exec --no-startup-id systemctl reboot, mode "default"
bindsym Shift+s exec --no-startup-id systemctl poweroff -i, mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
#bindsym $mod+Pause mode "$mode_system"
bindsym $mod+Pause exec --no-startup-id ~/scripts/power
#screenshots
bindsym Print exec --no-startup-id scrot '/home/[username]/Documents/scrots/auto/%Y-%m-%d_%H%M%S_scrot.png' -e 'notify-send "scrot" "Screenshot saved as $n"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment