guest@dotshare [~/groups/wms/i3] $ ls Archi3lemonbar/ | cat

Arch.i3.lemonbar (scrot)

okubax Sep 16, 2016 (wms/i3)

config(raw, dl)

SCROT

  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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
# i3 config file

# June 26 2016 - okubax https://okubax.co.uk



#.......
# Font
#.......
font pango:monospace 8
# See xmodmap

#..........
# Look
#..........
new_window pixel 3
focus_follows_mouse  yes

for_window [class="^.*"] border pixel 0

# gaps
#gaps inner 7
#gaps outer 0

# gaps
gaps inner 20
gaps outer 20

client.focused #292929 #292929 #292929 #292929
client.unfocused #262626 #5a5349 #5a5349 #a8bac4
client.focused_inactive #26262626 #262626 #262626 #262626
client.urgent #CCE8D4 #CCE8D4 #CCE8D4 #CCE8D4

#client.focused #292929 #292929 #292929 #292929
#client.unfocused #262626 #262626 #262626 #262626
#client.focused_inactive #26262626 #262626 #262626 #262626
#client.urgent #CCE8D4 #CCE8D4 #CCE8D4 #CCE8D4

#..........
# Applications
#..........

# Using bindcode for compatibility

# Principal mod key (Super = Win key)
# mod1 = Alt (xmodmap to show)
# mod4 = Winkey (xmodmap to show)
set $mod Mod4

# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod

# HANDLE POPUPS
popup_during_fullscreen smart

# take screenshot
bindsym Print exec $HOME/bin/screen root
bindsym Mod1+Print exec $HOME/bin/screen active

# change wallpaper
bindsym $mod+ctrl+w exec change_wallpaper

# key bindings
bindsym $MOD+Return exec --no-startup-id urxvt
bindsym $MOD+SHIFT+f exec thunar
bindsym $mod+w exec qutebrowser
bindsym Mod1+w exec chromium
bindsym $mod+b exec $HOME/downloads/tor-browser_en-US/Browser/start-tor-browser
bindsym $mod+e exec geany
bindsym Mod1+l exec i3lock -i $HOME/.Xresources.d/gqYvlhK.png
bindsym Mod1+m exec claws-mail
bindsym Mod1+e exec urxvt -e mutt
bindsym $mod+i exec urxvt -e irssi
bindsym mod1+i exec urxvt -e weechat
bindsym $mod+c exec gsimplecal
bindsym Mod1+c exec galculator
bindsym $MOD+SHIFT+t exec urxvt -e htop
bindsym $MOD+SHIFT+x exec $HOME/bin/i3_session
bindsym $MOD+SHIFT+a exec $HOME/downloads/android-dev/android-studio/bin/studio.sh
bindsym $mod+Shift+b bar mode toggle
## KEY BINDINGS
bindsym $MOD+Tab focus right
# SCRATCHPAD CREATE
bindsym $MOD+SHIFT+plus move scratchpad
# Maim
bindsym --release $mod+s exec --no-startup-id "maim -s -c 1,0,0,0.6 -p 10"
# SCRATCHPAD SHOW
bindsym $MOD+plus scratchpad show
# start dmenu (a program launcher)
bindsym $mod+p exec --no-startup-id j4-dmenu-desktop --term urxvt --display-binar --dmenu "dmenu -b -sb '#b7a462' -sf '#1b1b1b' -nb '#1b1b1b' -nf '#6fa6ab' -nf '#839496' -fn 'Tewi-9'"

# multimedia keys
bindsym XF86AudioPlay exec "mpc toggle"
bindsym XF86AudioStop exec "mpc stop"
bindsym XF86AudioNext exec "mpc next"
bindsym XF86AudioPrev exec "mpc prev"

# brightness
bindsym XF86MonBrightnessUp exec "xbacklight +10"
bindsym XF86MonBrightnessDown exec "xbacklight -10"

# Move to workspace
assign [instance="xfce4-terminal|urxvt"] $WS1
assign [instance="Navigator|Dialog"] $WS2
assign [class="chromium|jetbrains-android-studio|Firefox|qutebrowser"] $WS2
assign [class="Atom|sublime_text|Brackets"] $WS3
assign [instance="mousepad|leafpad|geany"] $WS3
assign [instance="shotwell|simple-scan|brasero|devede|imagination|picard|wxcam|google-musicmanager|goobox"] $WS4
assign [class="Gthumb|MPlayer|Rhythmbox|mpv|Xfburn|Pitivi|Popcorntime|Gmusicbrowser|Ogmrip|Spotify|Blender"] $WS4
assign [class="kdenlive|Kamoso|digikam"] $WS4
assign [class="Thunar|Eclipse|Pinta|Blender|Catfish|Codeblocks"] $WS5
assign [class="VirtualBox|Qemu-system-x86_64|Gnome-disks|Gnome-boxes|qemu-system-x86_64|Spicy"] $WS6
assign [instance="syncbackup|bleachbit|gparted|hardinfo|truecrypt"] $WS6
assign [instance="VCLSalFrame|libreoffice"] $WS7
assign [class="libreoffice*|Zathura|libreoffice-writer"] $WS7
assign [class="Claws-mail"] $WS8
assign [class="Wine|Steam|dontstarve"] $WS9

# Layout
for_window [class="xpad" instance="scratchpad"] move scratchpad
for_window [class="MPlayer|Galculator|Gsimplecal|Viewnior|Alarm-clock|Skype|xpad|Java|Clamtk|Blueman-manager|Spotify|Google-musicmanager"] floating enable
for_window [class="File-roller|Lxappearance|Nitrogen|Arandr|Caffeine|Pavucontrol|emulator64-arm|Transmission-gtk|Kamoso|Cheese|PkgBrowser|Seahorse"] floating enable
for_window [class="Gimp|Filezilla|Gnome-multi-writer|Rhythmbox|Main.py|Imagewriter|qemu-system-x86_64|Blueberry.py|libprs500"] floating enable
for_window [title="Xfce-notifyd|TrueCrypt|Catfish|Google Keep|Xarchiver"] floating enable
for_window [title="File Operation Progress" class="Thunar"] floating enable
#for_window [title="Share a link on Twitter - Mozilla Firefox" class="Firefox"] floating enable
#for_window [title="Press This - Mozilla Firefox" class="Firefox"] floating enable
for_window [window_role="pop-up"] floating enable,move absolute center

#...........
# Keybinds i3
#...........

# Back and Forth
workspace_auto_back_and_forth yes

# kill focused window
bindsym $mod+q kill

# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right

# move focused window
bindsym $mod+Shift+H move left
bindsym $mod+Shift+J move down
bindsym $mod+Shift+K move up
bindsym $mod+Shift+L move right

# split in horizontal orientation
bindsym $mod+bar split h

# split in vertical orientation
bindsym $mod+underscore split v

# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen

# change container layout (stacked, tabbed, default)
bindsym $mod+s layout stacking
bindsym $mod+x layout tabbed
bindsym $mod+z layout default

# 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

# assign workspace variables
set $WS1 I
set $WS2 II
set $WS3 III
set $WS4 IV
set $WS5 V
set $WS6 VI
set $WS7 VII
set $WS8 VIII
set $WS9 IX
set $WS10 X

# switch to workspace
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+7 workspace $WS7
bindsym $mod+8 workspace $WS8
bindsym $mod+9 workspace $WS9
bindsym $mod+0 workspace $WS10

# move focused container to workspace
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+Shift+7 move container to workspace $WS7
bindsym $mod+Shift+8 move container to workspace $WS8
bindsym $mod+Shift+9 move container to workspace $WS9
bindsym $mod+Shift+0 move container to workspace $WS10

# 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 exit

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"

#bar
bar {
  i3bar_command ~/.i3/bar/bar.sh
}

#i3bar -- for when a system tray is needed
#bar {
#    mode hide
#    hidden_state hide
#    modifier Mod1
#    position bottom
#    workspace_buttons no
#}

# autostart
exec --no-startup-id sh conky_displays
exec sh random-color-picker
#exec sh ~/.i3/bar/bar.sh
#exec --no-startup-id sh ~/.fehbg
#exec --no-startup-id xpad

CLICK TO VIEW

x

bar.sh(raw, dl)

 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
#!/bin/bash
HIGHLIGHT="#ffffff"
clock() {
	TIME=$(date "+%H:%M")
	DATE=$(date "+%a %D")
	echo -n "%{F$HIGHLIGHT}$(printf '%b' "\ue016")%{F-} $TIME  %{F$HIGHLIGHT}$(printf '%b' "\ue26a")%{F-} $DATE"
}
volume() {
	VOL=$(amixer get Master | grep % | sed -n 1p | awk -F '[' '{print $2}' | awk -F ']' '{print $1}')
	if [ $VOL = '0%' ]; then
		echo -n "%{F$HIGHLIGHT}$(printf '%b' "\ue04f")%{F-} Mute"
	else
		echo -n "%{F$HIGHLIGHT}$(printf '%b' "\ue050")%{F-} $VOL"
	fi
}
wifi() {
    echo -e "%{F$HIGHLIGHT} \ue1af %{F-}$(iw wlp3s0 link | grep 'SSID' | cut -c 8-)"
}
mail() {
	# grabs new email # from offlineimap
		echo -e "%{F$HIGHLIGHT} \ue070 %{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' "\ue05c")%{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#3b3b4b}%{A:i3-msg workspace &:}  &  %{A}%{F#A0A0A0}/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/BAT1/status)
    capacity=$(cat /sys/class/power_supply/BAT1/capacity)

    if [ "$status" == "Charging" ]; then
        echo -e "%{F$HIGHLIGHT} \ue23a %{F-}$capacity%"
    elif (($capacity == 100)); then
        echo -e "%{F$HIGHLIGHT} \ue238 %{F-}$capacity%"
    elif (($capacity > 82)); then
        echo -e "%{F$HIGHLIGHT} \ue238 %{F-}$capacity%"
    elif (($capacity > 62)); then
        echo -e "%{F$HIGHLIGHT} \ue237 %{F-}$capacity%"
    elif (($capacity > 32)); then
        echo -e "%{F$HIGHLIGHT} \ue237 %{F-}$capacity%"
    elif (($capacity > 12)); then
        echo -e "%{F$HIGHLIGHT} \ue236 %{F-}$capacity%"
    else
        echo -e "%{F$HIGHLIGHT} \ue239 %{F-}$capacity%"
    fi
}
while true; do
	echo "%{B#c0303048} $(clock) $(volume) $(mail) $(bat) $(wifi) %{B-}%{c} $(workspace) %{r}%{B-} %{B#5d6383}$(music)%{B#c0303048} $(windowtitle) %{B-}"
	sleep 2;
done |
#old one was '-g 1280x20+45'
lemonbar -p -d -B#c0262626 -F#A0A0A0 -g 1280x20+45+0\
 -f '-xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso10646-1'\
 -f '-wuncon-siji-medium-r-normal--10-100-75-75-c-80-iso10646-1'\
 | bash
 

x

Notes

wm: i3-gaps
bar: lemonbar
font: tewi

dotfiles: https://github.com/okubax/dotfiles