1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | #okubax
#.......
# Settings
#.......
font pango:Consolas 8
set $ws1
set $ws2
set $ws3
set $ws4
set $ws5
set $ws6
set $mod Mod4
gaps inner 20
gaps outer 20
popup_during_fullscreen smart
floating_modifier $mod
focus_follows_mouse yes
for_window [class=".*"] border pixel 2
set_from_resource $fg color7 #f0f0f0
set_from_resource $bg color0 #f0f0f0
set_from_resource $bg1 color10 #f0f0f0
# class border backgr. text indicator child_border
client.focused $bg $fg $bg $bg $bg
client.focused_inactive $bg $bg $fg $bg $bg
client.unfocused $bg $bg $fg $bg $bg
client.urgent $fg $bg1 $fg $bg $bg
client.placeholder $bg $bg $fg $bg $bg
client.background $bg
#
# i3+lemonbar keybindings
#
bindsym $mod+Shift+C reload
bindsym $mod+Shift+R restart
bindsym $mod+q kill
bindsym $mod+Shift+E exit
bindsym mod1+j exec $HOME/.config/i3/bar | zsh
bindsym mod1+k exec pkill lemonbar
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+Tab workspace back_and_forth
bindsym $mod+Shift+1 move container to workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6
bindsym $mod+s layout stacking
bindsym $mod+x layout tabbed
bindsym $mod+z layout default
bindsym $mod+f fullscreen
bindsym $mod+Shift+space floating toggle
bindsym $mod+space focus mode_toggle
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
bindsym $mod+Shift+H move left
bindsym $mod+Shift+J move down
bindsym $mod+Shift+K move up
bindsym $mod+Shift+L move right
bindsym $mod+bar split h
bindsym $mod+underscore split v
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
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
# arrow keys #
# bindsym 113 right
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
#
# misc keybindings
#
bindsym $MOD+Return exec --no-startup-id urxvt
bindsym $mod+p exec --no-startup-id j4-dmenu-desktop --term urxvt --display-binar --dmenu "dmenu -b -sb '$bg1' -sf '$fg' -nb '$fg' -nf '$bg' -fn 'Consolas-8'"
bindsym XF86AudioPlay exec "mpc toggle"
bindsym XF86AudioStop exec "mpc stop"
bindsym XF86AudioNext exec "mpc next"
bindsym XF86AudioPrev exec "mpc prev"
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5%
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5%
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle
bindsym mod1+a exec playerctl play
bindsym mod1+s exec playerctl pause
bindsym mod1+x exec playerctl next
bindsym mod1+z exec playerctl previous
#bindsym XF86MonBrightnessUp exec "xbacklight +10"
#bindsym XF86MonBrightnessDown exec "xbacklight -10"
bindsym Mod1+d exec --no-startup-id sudo bright_down
bindsym Mod1+i exec --no-startup-id sudo bright_up
bindsym Print exec $HOME/bin/screen root
bindsym Mod1+p exec $HOME/bin/screen active
bindsym $MOD+SHIFT+f exec thunar
bindsym $mod+w exec qutebrowser --backend webengine
bindsym Mod1+w exec chromium
bindsym $Mod+Shift+w exec firefox
bindsym $mod+b exec $HOME/downloads/tor-browser_en-US/Browser/start-tor-browser
bindsym $mod+e exec $HOME/.VSCode-linux-x64/bin/code
bindsym Mod1+l exec i3lock -i $HOME/.Xresources.d/lock.png
bindsym Mod1+e exec urxvt -e mutt
bindsym $mod+i exec urxvt -e weechat
bindsym $mod+c exec gsimplecal
bindsym Mod1+Shift+c exec galculator
bindsym $MOD+SHIFT+t exec urxvt -e htop
bindsym $MOD+SHIFT+x exec $HOME/bin/i3_session
bindsym $mod+Shift+b bar mode toggle
bindsym $MOD+SHIFT+plus move scratchpad
bindsym $MOD+plus scratchpad show
#
# i3wm layout
#
for_window [class="xpad" instance="scratchpad"] move scratchpad
for_window [class="MPlayer|Galculator|Gsimplecal|Viewnior|xpad|calibre|Java|Spotify|Google-musicmanager|File-roller|Lxappearance|Arandr|Pavucontrol|emulator64-arm|Kamoso|PkgBrowser|URxvt|Gimp|Main.py|qemu-system-x86_64|Pinentry"] floating enable
for_window [class="URxvt"] resize set 820 480
for_window [title="TrueCrypt|Google Keep"] floating enable
for_window [title="File Operation Progress" class="Thunar"] floating enable
for_window [window_role="pop-up"] floating enable,move absolute center
assign [instance="Navigator|Dialog"] → $ws1
assign [class="Chromium|Firefox|qutebrowser"] → $ws1
assign [instance="code|geany"] → $ws2
assign [class="Thunar|Bleachbit|GParted"] → $ws3
assign [class="Qemu-system-x86_64"] → $ws4
assign [class="Zathura|Soffice|calibre|libreoffice-writer|libreoffice-calc"] → $ws5
assign [instance="libreoffice"] → $ws5
assign [class="Wine|Steam|dontstarve"] → $ws6
#
# i3bar
#
#bar {
# mode hide
# hidden_state hide
# modifier Mod1
# position bottom
# workspace_buttons no
#}
#
# exec
#
exec --no-startup-id sh conky_displays
exec_always --no-startup-id killall lemonbar; sh ~/.config/i3/bar &
exec --no-startup-id sh ~/.fehbg
#exec --no-startup-id xpad
|
x
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | #!/bin/bash
. "${HOME}/.Xresources.d/colors/colors.sh"
HIGHLIGHT="$color0"
clock() {
TIME=$(date "+%H:%M")
DATE=$(date "+%a, %b %d ")
echo -n "%{F$HIGHLIGHT}$(printf '%b' "\uf017")%{F-} $TIME %{F$HIGHLIGHT}$(printf '%b' "\uf073")%{F-} $DATE"
}
volume() {
VOL=$(amixer get Master | grep % | sed -n 1p | awk -F '[' '{print $2}' | awk -F ']' '{print $1}')
# VOL=$(pactl list sinks | grep "Volume: front-left" | cut -d " " -f6)
if [ $VOL = '0%' ]; then
echo -n "%{F$HIGHLIGHT}$(printf '%b' "\uf026")%{F-} Mute"
else
echo -n "%{F$HIGHLIGHT}$(printf '%b' "\uf028")%{F-} $VOL"
fi
}
wifi() {
echo -e "%{F$HIGHLIGHT} \uf1eb %{F-}$(iw wlp1s0 link | grep 'SSID' | cut -c 8-)"
}
mail() {
# grabs new email # from offlineimap
echo -e "%{F$HIGHLIGHT} \uf0e0 %{F-}$(ls /home/ajibola/mail/Gmail/INBOX/new | wc -l)"
}
music() {
SONG=$(mpc current)
if [ -n $SONG ]; then
echo -n ""
else
echo -n " %{F$HIGHLIGHT}$(printf '%b' "\uf144")%{F-} $SONG "
fi
}
#Copied from /u/Dylan112
workspace() {
workspacenext="A4:i3-msg workspace next_on_output:"
workspaceprevious="A5:i3-msg workspace prev_on_output:"
wslist=$(\
wmctrl -d \
| awk '/ / {print $2 $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20}' ORS=''\
| sed -e 's/\s* //g' \
-e 's/\*[ 0-9A-Za-z]*[^ -~]*/ & /g' \
-e 's/\-[ 0-9A-Za-z]*[^ -~]*/%{F'$color10'}%{A:i3-msg workspace &:} & %{A}%{F'$color0'}/g' \
-e 's/\*//g' \
-e 's/ -/ /g' \
)
echo -n "%{$workspacenext}%{$workspaceprevious}$wslist%{A}%{A}"
}
windowtitle(){
# Grabs focused window's title
# The echo "" at the end displays when no windows are focused.
TITLE=$(xdotool getactivewindow getwindowname 2>/dev/null | sed -n 1p || echo "")
TITLECUT=$(xdotool getactivewindow getwindowname 2>/dev/null | sed -n 1p | sed 's/\///g;s/-//g;s/ /\\/g' | cut -c 1-6 || echo "")
if [ "$TITLECUT" = "glenn@" ]; then
echo "$(printf '%b' "\ue1d9") $(echo "$TITLE" | cut -c 15-50)"
else
echo "$TITLE" | cut -c 1-50
fi
}
bat() {
status=$(cat /sys/class/power_supply/BAT0/status)
capacity=$(cat /sys/class/power_supply/BAT0/capacity)
if [ "$status" == "Charging" ]; then
echo -e "%{F$HIGHLIGHT} \uf240 %{F-}$capacity%"
elif (($capacity == 100)); then
echo -e "%{F$HIGHLIGHT} \uf240 %{F-}$capacity%"
elif (($capacity > 82)); then
echo -e "%{F$HIGHLIGHT} \uf241 %{F-}$capacity%"
elif (($capacity > 62)); then
echo -e "%{F$HIGHLIGHT} \uf241 %{F-}$capacity%"
elif (($capacity > 32)); then
echo -e "%{F$HIGHLIGHT} \uf242 %{F-}$capacity%"
elif (($capacity > 0)); then
echo -e "%{F$HIGHLIGHT} \uf243 %{F-}$capacity%"
else
echo -e "%{F$HIGHLIGHT} \uf240 %{F-}$capacity%"
fi
}
while true; do
echo "%{B$color7} $(clock) $(volume) $(mail) $(bat) $(wifi) %{B-}%{c} $(workspace) %{r}%{B-} %{B$color15}$(music)%{B$color7} $(windowtitle) %{B-}"
sleep 2;
done |
lemonbar -p -d -B "$color7" -F "$color0" -g 1834x24+45+0\
-f Consolas:size=8\
-f FontAwesome:size=9\
eDP-1\
| zsh
|
x
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # Special
background='#002b36'
foreground='#839496'
# Colors
color0='#073642'
color1='#dc322f'
color2='#67A9B1'
color3='#859900'
color4='#268bd2'
color5='#d33682'
color6='#2aa198'
color7='#eee8d5'
color8='#002b36'
color9='#cb4b16'
color10='#586e75'
color11='#657b83'
color12='#839496'
color13='#6c71c4'
color14='#93a1a1'
color15='#fdf6e3'
|
x
Notes
wm: i3(i3-gaps)
bar: lemonbar
font: consolas
full dotfiles on github