Skip to content

Commit 8c2a527

Browse files
committed
polybar and i3
1 parent d6b52a4 commit 8c2a527

File tree

3 files changed

+81
-90
lines changed

3 files changed

+81
-90
lines changed

i3/.config/polybar/config

+40-71
Original file line numberDiff line numberDiff line change
@@ -23,65 +23,58 @@ override-redirect = true
2323

2424

2525
[bar/bottom]
26-
#monitor = HDMI-1
2726
margin-top = 5
2827
padding-right = 2
2928
padding-left = 2
3029
width = 100%
3130
height = 32
32-
font-0 = Misc Ohsnap:size=14
31+
font-0 = Misc Ohsnap:size=16
3332
font-1 = icomoon:size=12
34-
font-2 = cryptocoins:style=Regular:size=12
33+
font-2 = mplus Nerd Font:style=Regular:size=14
3534
font-3 = Wuncon Siji:style=Regular:size=12
3635
bottom = true
3736
background = ${colors.background}
3837
foreground = ${colors.foreground}
3938
modules-right = mpd
4039
modules-left = crypto
40+
modules-center = date
4141

4242
[bar/top]
43-
#monitor = HDMI-1
4443
width = 100%
45-
height = 32
44+
height = 30
4645
border-size = 0
4746
border-top-size = 0
4847
border-left-size = 0
4948
border-right-size = 0
5049
border-bottom-size = 0
5150
radius = 0
5251
line-size = 0
53-
spacing = 1
52+
spacing = 0
5453
offset-x = 0
5554
offset-y = 0
5655
padding-left = 0
5756
padding-right = 2
5857

59-
font-0 = Misc Ohsnap:size=14
58+
font-0 = Misc Ohsnap:size=16
6059
font-1 = icomoon:size=12
61-
font-2 = cryptocoins:style=Regular:size=12
60+
font-2 = mplus Nerd Font:style=Regular:size=14
6261
font-3 = Wuncon Siji:style=Regular:size=12
6362

6463
background = ${colors.background}
6564
foreground = ${colors.foreground}
66-
module-margin-left = 1
65+
module-margin-left = 3
6766
module-margin-right = 0
6867
modules-left = i3
69-
modules-center = date
68+
modules-center = xwindow
7069
modules-right = volume wlan battery powermenu
71-
tray-position =
70+
tray-position = right
71+
tray-background = ${colors.background}
7272

7373
[module/crypto]
7474
type = custom/script
7575
interval = 300
7676
exec = ~/.config/polybar/crypto.py
7777

78-
[module/memory]
79-
type = internal/memory
80-
interval = 2
81-
format-prefix = ""
82-
format-prefix-foreground = ${colors.foreground}
83-
label = %percentage_used%%
84-
8578
[module/xwindow]
8679
type = internal/xwindow
8780
label = %title:0:30:...%
@@ -124,15 +117,15 @@ label-visible = %icon%
124117
label-visible-background = ${colors.background}
125118
label-visible-padding = 2
126119

127-
ws-icon-0 = 1;
128-
ws-icon-1 = 2;
129-
ws-icon-2 = 3;
130-
ws-icon-3 = 4;
131-
ws-icon-4 = 5;
132-
ws-icon-5 = 6;
133-
ws-icon-6 = 7;
134-
ws-icon-7 = 8;
135-
ws-icon-default =
120+
ws-icon-0 = 1;
121+
ws-icon-1 = 2;
122+
ws-icon-2 = 3;
123+
ws-icon-3 = 4;
124+
ws-icon-4 = 5;
125+
ws-icon-5 = 6;
126+
ws-icon-6 = 7;
127+
ws-icon-7 = 8;
128+
ws-icon-default =
136129

137130
[module/mpd]
138131
type = internal/mpd
@@ -146,11 +139,11 @@ format-online = <icon-prev> <toggle> <icon-next> <bar-progress> <label-song>
146139
label-song = %artist% - %title%
147140
label-offline = ---
148141
format-offline =
149-
icon-prev =
142+
icon-prev =
150143
icon-stop = 
151-
icon-play =
152-
icon-pause =
153-
icon-next =
144+
icon-play =
145+
icon-pause =
146+
icon-next =
154147

155148
icon-random = 
156149
icon-repeat = 
@@ -160,59 +153,35 @@ toggle-off-foreground = ${colors.foreground-alt}
160153

161154
bar-progress-width = 30
162155
bar-progress-format = %{A4:mpdseek+2: A5:mpdseek-2:}%fill%%indicator%%empty%%{A A}
163-
bar-progress-indicator = |
156+
bar-progress-indicator = >
164157
bar-progress-indicator-foreground = ${colors.foreground}
165-
bar-progress-fill =
158+
bar-progress-fill = -
166159
bar-progress-fill-foreground = ${colors.foreground}
167-
bar-progress-empty =
160+
bar-progress-empty = -
168161
bar-progress-empty-foreground = ${colors.foreground}
169162

170-
[module/xbacklight]
171-
type = internal/xbacklight
172-
173-
format = <label> <bar>
174-
label = ""
175-
176-
bar-width = 10
177-
bar-indicator = |
178-
bar-indicator-foreground = #ff
179-
bar-fill = ─
180-
bar-fill-foreground = #9f78e1
181-
bar-empty = ─
182-
bar-empty-foreground = ${colors.foreground}
183-
184-
185-
[module/cpu]
186-
type = internal/cpu
187-
interval = 2
188-
format-prefix = ""
189-
format-prefix-foreground = ${colors.foreground}
190-
label = %percentage%%
191-
192163
[module/wlan]
193164
type = internal/network
194165
interface = wlp2s0
195166
interval = 3.0
196167

197-
format-connected = <ramp-signal> <label-connected>
168+
format-connected = <label-connected>
198169

199-
label-connected = %essid%
170+
label-connected = %essid% %local_ip%
200171
label-disconnected = %ifname% disconnected
201-
label-disconnected-foreground = ${colors.foreground}
202172

203-
ramp-signal-0 =
204-
ramp-signal-1 =
205-
ramp-signal-2 =
206-
ramp-signal-3 =
207-
ramp-signal-4 =
208-
ramp-signal-foreground = ${colors.foreground}
173+
ramp-signal-0 =""
174+
ramp-signal-1 =""
175+
ramp-signal-2 =""
176+
ramp-signal-3 =""
177+
ramp-signal-4 =""
209178

210179
[module/eth]
211180
type = internal/network
212181
interface = sit0
213182
interval = 3.0
214183

215-
format-connected-prefix = " "
184+
format-connected-prefix = " "
216185
format-connected-foreground-foreground = ${colors.foreground-alt}
217186
label-connected = %local_ip%
218187

@@ -236,13 +205,13 @@ type = internal/volume
236205

237206
format-volume = <ramp-volume><label-volume>
238207
label-volume = "%percentage%"
239-
ramp-volume-0 =" "
240-
ramp-volume-1 =" "
241-
ramp-volume-2 =" "
242-
ramp-volume-3 =" "
208+
ramp-volume-0 =" "
209+
ramp-volume-1 =" "
210+
ramp-volume-2 =" "
211+
ramp-volume-3 =" "
243212
label-volume-foreground = ${colors.foreground}
244213

245-
format-muted-prefix = " "
214+
format-muted-prefix = " "
246215
format-muted-foreground = ${colors.foreground}
247216
label-muted = muted
248217
label-muted-foreground = ${colors.foreground}

i3/.i3/config

+37-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
font pango:Hack Nerd Font 13
1+
font pango:Misc Ohsnap 14
22

33
# Alt key
44
set $mod Mod1
55
#set $monitor eDP1 # my laptop's internal screen
66
set $monitor HDMI1 # external screen, they are set here to make it easier to move to new setups
77

8-
# i3-gapszz stuff :)
8+
########## i3-gaps integration ##########
9+
10+
for_window [class="^.*"] border pixel 0
11+
for_window [window_role="pop-up"] floating enable
12+
for_window [window_role="task_dialog"] floating enable
13+
for_window [title="Preferences$"] floating enable
14+
915
gaps inner 15
1016
gaps outer 5
1117
smart_borders on
@@ -119,26 +125,51 @@ mode "resize" {
119125

120126
bindsym $mod+r mode "resize"
121127

128+
########## Styling ##########
129+
###--- i3 coloring ---###
130+
# Make it clear when failed using red - otherwise set i3 colors with wal from xresources
131+
set_from_resource $bg i3wm.color3 #ff0000
132+
set_from_resource $bg-alt i3wm.color0 #ff0000
133+
set_from_resource $fg i3wm.color15 #ff0000
134+
set_from_resource $fg-alt i3wm.color2 #ff0000
135+
set_from_resource $hl i3wm.color4 #ff0000
136+
137+
# class border backgr. text indicator child_border
138+
client.focused $fg-alt $bg $fg $fg-alt $hl
139+
client.focused_inactive $bg $bg-alt $fg $bg $bg
140+
client.unfocused $bg $bg-alt $fg $bg $bg
141+
client.urgent $bg $bg-alt $fg $bg $bg
142+
client.placeholder $bg $bg-alt $fg $bg $bg
143+
144+
client.background $bg
145+
146+
147+
122148
bindsym $mod+Ctrl+l exec --no-startup-id $HOME/.dotfiles/i3/.i3/scripts/i3lock.sh
123149

124150
# Start-up programs
125151
# exec_always --no-startup-id xrandr --output eDP-1 --primary --preferred
126152
# exec_always --no-startup-id xrandr --output HDMI-1 --primary --preferred --left-of eDP-1
153+
154+
exec --no-startup-id $HOME/.i3/startup/mons.sh
127155
exec_always --no-startup-id $HOME/.i3/startup/polybar.sh
128156
exec_always --no-startup-id $HOME/.i3/startup/compton.sh
129-
exec --no-startup-id $HOME/.i3/startup/mopidy.sh
130-
exec --no-startup-id $HOME/.i3/startup/mons.sh
131157
exec --no-startup-id dunst -config $HOME/.config/dunst/dunstrc
132-
# exec_always --no-startup-id feh --bg-scale ~/Imagens/wallpapers/fon_polosy_linii_svet_1920x1080.jpg
158+
exec --no-startup-id $HOME/.i3/startup/mopidy.sh
159+
exec_always --no-startup-id wal -i ~/Imagens/Wallpapers -q -a "95" -g
133160
exec_always --no-startup-id xrdb ~/.Xresources
134-
exec_always --no-startup-id wal -i ~/Imagens/Wallpapers -q -a "95"
161+
exec --no-startup-id xset -dpms
162+
exec --no-startup-id xset s off
163+
bindsym $mod+Shift+a exec --no-startup-id wal -i ~/Imagens/Wallpapers -q -a "95" -g
164+
135165

136166
# Rofi
137167
bindsym $mod+d exec --no-startup-id rofi -monitor -1 -show run -display-run " "
138168
bindsym $mod+Shift+d exec --no-startup-id rofi -monitor -1 -show window -display-window " "
139169

140170
#Screenshot
141171
bindsym $mod+Shift+s exec --no-startup-id "scrot -q 90 ~/Imagens/Screenshot%Y-%m-%d%H:%M:%S.png"
172+
bindsym Print exec --no-startup-id "scrot -q 90 ~/Imagens/Screenshot%Y-%m-%d%H:%M:%S.png"
142173

143174
# Volume controls
144175
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +10%

xresources/.Xresources

+4-13
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ rofi.color-window: argb:DA222222, argb:DA222222, argb:00222222
1212
rofi.color-normal: argb:00000000, #e8e8e8, argb:00000000, argb:00000000, #e29a49
1313
rofi.color-urgent: argb:00000000, #f43753, argb:00000000, argb:00000000, #e29a49
1414
rofi.color-active: argb:00000000, #49bbfb, argb:00000000, argb:00000000, #e29a49
15-
rofi.font: Misc Ohsnap 18
15+
rofi.font: mplus Nerd Font 18
1616
rofi.eh: 1
1717
rofi.separator-style: solid
1818
rofi.hide-scrollbar: true
@@ -41,7 +41,7 @@ Xft.hintstyle: hintfull
4141
!-------------------------------------------------------------------------------
4242
URxvt.modifier: mod1
4343
URxvt*loginShell: true
44-
URxvt.borderless: false
44+
URxvt.borderless: true
4545
URxvt*dynamicColors: on
4646
URxvt.geometry: 90x20
4747
URxvt.internalBorder: 3
@@ -64,19 +64,10 @@ URxvt.perl-ext-common:
6464

6565

6666
!! Fonts
67-
#define fonts xft:xos4 Terminus:size=16,\
68-
xft:xos4 Terminus:size=16,\
69-
xft:DejaVu Sans Mono Nerd Font:size=16,\
70-
xft:lucy tewi:size=16,\
71-
xft:Wuncon Siji:size=16
72-
73-
! Fonts
67+
URxvt.font: xft:xos4 Terminus:size=16
68+
URxvt*boldFont: xft:xos4 Terminus:size=16
7469
URxvt.allow_bold: false
75-
URxvt*font: fonts
7670
URxvt*boldMode: true
77-
URxvt*boldFont: fonts
78-
79-
8071
! Fix font space
8172
URxvt*letterSpace: -1
8273

0 commit comments

Comments
 (0)