Skip to content

Commit

Permalink
polybar and i3
Browse files Browse the repository at this point in the history
  • Loading branch information
edbizarro committed Apr 4, 2018
1 parent d6b52a4 commit 8c2a527
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 90 deletions.
111 changes: 40 additions & 71 deletions i3/.config/polybar/config
Original file line number Diff line number Diff line change
Expand Up @@ -23,65 +23,58 @@ override-redirect = true


[bar/bottom]
#monitor = HDMI-1
margin-top = 5
padding-right = 2
padding-left = 2
width = 100%
height = 32
font-0 = Misc Ohsnap:size=14
font-0 = Misc Ohsnap:size=16
font-1 = icomoon:size=12
font-2 = cryptocoins:style=Regular:size=12
font-2 = mplus Nerd Font:style=Regular:size=14
font-3 = Wuncon Siji:style=Regular:size=12
bottom = true
background = ${colors.background}
foreground = ${colors.foreground}
modules-right = mpd
modules-left = crypto
modules-center = date

[bar/top]
#monitor = HDMI-1
width = 100%
height = 32
height = 30
border-size = 0
border-top-size = 0
border-left-size = 0
border-right-size = 0
border-bottom-size = 0
radius = 0
line-size = 0
spacing = 1
spacing = 0
offset-x = 0
offset-y = 0
padding-left = 0
padding-right = 2

font-0 = Misc Ohsnap:size=14
font-0 = Misc Ohsnap:size=16
font-1 = icomoon:size=12
font-2 = cryptocoins:style=Regular:size=12
font-2 = mplus Nerd Font:style=Regular:size=14
font-3 = Wuncon Siji:style=Regular:size=12

background = ${colors.background}
foreground = ${colors.foreground}
module-margin-left = 1
module-margin-left = 3
module-margin-right = 0
modules-left = i3
modules-center = date
modules-center = xwindow
modules-right = volume wlan battery powermenu
tray-position =
tray-position = right
tray-background = ${colors.background}

[module/crypto]
type = custom/script
interval = 300
exec = ~/.config/polybar/crypto.py

[module/memory]
type = internal/memory
interval = 2
format-prefix = ""
format-prefix-foreground = ${colors.foreground}
label = %percentage_used%%

[module/xwindow]
type = internal/xwindow
label = %title:0:30:...%
Expand Down Expand Up @@ -124,15 +117,15 @@ label-visible = %icon%
label-visible-background = ${colors.background}
label-visible-padding = 2

ws-icon-0 = 1;
ws-icon-1 = 2;
ws-icon-2 = 3;
ws-icon-3 = 4;
ws-icon-4 = 5;
ws-icon-5 = 6;
ws-icon-6 = 7;
ws-icon-7 = 8;
ws-icon-default =
ws-icon-0 = 1;
ws-icon-1 = 2;
ws-icon-2 = 3;
ws-icon-3 = 4;
ws-icon-4 = 5;
ws-icon-5 = 6;
ws-icon-6 = 7;
ws-icon-7 = 8;
ws-icon-default =

[module/mpd]
type = internal/mpd
Expand All @@ -146,11 +139,11 @@ format-online = <icon-prev> <toggle> <icon-next> <bar-progress> <label-song>
label-song = %artist% - %title%
label-offline = ---
format-offline =
icon-prev =
icon-prev =
icon-stop = 
icon-play =
icon-pause =
icon-next =
icon-play =
icon-pause =
icon-next =

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

bar-progress-width = 30
bar-progress-format = %{A4:mpdseek+2: A5:mpdseek-2:}%fill%%indicator%%empty%%{A A}
bar-progress-indicator = |
bar-progress-indicator = >
bar-progress-indicator-foreground = ${colors.foreground}
bar-progress-fill =
bar-progress-fill = -
bar-progress-fill-foreground = ${colors.foreground}
bar-progress-empty =
bar-progress-empty = -
bar-progress-empty-foreground = ${colors.foreground}

[module/xbacklight]
type = internal/xbacklight

format = <label> <bar>
label = ""

bar-width = 10
bar-indicator = |
bar-indicator-foreground = #ff
bar-fill = ─
bar-fill-foreground = #9f78e1
bar-empty = ─
bar-empty-foreground = ${colors.foreground}


[module/cpu]
type = internal/cpu
interval = 2
format-prefix = ""
format-prefix-foreground = ${colors.foreground}
label = %percentage%%

[module/wlan]
type = internal/network
interface = wlp2s0
interval = 3.0

format-connected = <ramp-signal> <label-connected>
format-connected = <label-connected>

label-connected = %essid%
label-connected = %essid% %local_ip%
label-disconnected = %ifname% disconnected
label-disconnected-foreground = ${colors.foreground}

ramp-signal-0 =
ramp-signal-1 =
ramp-signal-2 =
ramp-signal-3 =
ramp-signal-4 =
ramp-signal-foreground = ${colors.foreground}
ramp-signal-0 =""
ramp-signal-1 =""
ramp-signal-2 =""
ramp-signal-3 =""
ramp-signal-4 =""

[module/eth]
type = internal/network
interface = sit0
interval = 3.0

format-connected-prefix = " "
format-connected-prefix = " "
format-connected-foreground-foreground = ${colors.foreground-alt}
label-connected = %local_ip%

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

format-volume = <ramp-volume><label-volume>
label-volume = "%percentage%"
ramp-volume-0 =" "
ramp-volume-1 =" "
ramp-volume-2 =" "
ramp-volume-3 =" "
ramp-volume-0 =" "
ramp-volume-1 =" "
ramp-volume-2 =" "
ramp-volume-3 =" "
label-volume-foreground = ${colors.foreground}

format-muted-prefix = " "
format-muted-prefix = " "
format-muted-foreground = ${colors.foreground}
label-muted = muted
label-muted-foreground = ${colors.foreground}
Expand Down
43 changes: 37 additions & 6 deletions i3/.i3/config
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
font pango:Hack Nerd Font 13
font pango:Misc Ohsnap 14

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

# i3-gapszz stuff :)
########## i3-gaps integration ##########

for_window [class="^.*"] border pixel 0
for_window [window_role="pop-up"] floating enable
for_window [window_role="task_dialog"] floating enable
for_window [title="Preferences$"] floating enable

gaps inner 15
gaps outer 5
smart_borders on
Expand Down Expand Up @@ -119,26 +125,51 @@ mode "resize" {

bindsym $mod+r mode "resize"

########## Styling ##########
###--- i3 coloring ---###
# Make it clear when failed using red - otherwise set i3 colors with wal from xresources
set_from_resource $bg i3wm.color3 #ff0000
set_from_resource $bg-alt i3wm.color0 #ff0000
set_from_resource $fg i3wm.color15 #ff0000
set_from_resource $fg-alt i3wm.color2 #ff0000
set_from_resource $hl i3wm.color4 #ff0000

# class border backgr. text indicator child_border
client.focused $fg-alt $bg $fg $fg-alt $hl
client.focused_inactive $bg $bg-alt $fg $bg $bg
client.unfocused $bg $bg-alt $fg $bg $bg
client.urgent $bg $bg-alt $fg $bg $bg
client.placeholder $bg $bg-alt $fg $bg $bg

client.background $bg



bindsym $mod+Ctrl+l exec --no-startup-id $HOME/.dotfiles/i3/.i3/scripts/i3lock.sh

# Start-up programs
# exec_always --no-startup-id xrandr --output eDP-1 --primary --preferred
# exec_always --no-startup-id xrandr --output HDMI-1 --primary --preferred --left-of eDP-1

exec --no-startup-id $HOME/.i3/startup/mons.sh
exec_always --no-startup-id $HOME/.i3/startup/polybar.sh
exec_always --no-startup-id $HOME/.i3/startup/compton.sh
exec --no-startup-id $HOME/.i3/startup/mopidy.sh
exec --no-startup-id $HOME/.i3/startup/mons.sh
exec --no-startup-id dunst -config $HOME/.config/dunst/dunstrc
# exec_always --no-startup-id feh --bg-scale ~/Imagens/wallpapers/fon_polosy_linii_svet_1920x1080.jpg
exec --no-startup-id $HOME/.i3/startup/mopidy.sh
exec_always --no-startup-id wal -i ~/Imagens/Wallpapers -q -a "95" -g
exec_always --no-startup-id xrdb ~/.Xresources
exec_always --no-startup-id wal -i ~/Imagens/Wallpapers -q -a "95"
exec --no-startup-id xset -dpms
exec --no-startup-id xset s off
bindsym $mod+Shift+a exec --no-startup-id wal -i ~/Imagens/Wallpapers -q -a "95" -g


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

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

# Volume controls
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +10%
Expand Down
17 changes: 4 additions & 13 deletions xresources/.Xresources
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ rofi.color-window: argb:DA222222, argb:DA222222, argb:00222222
rofi.color-normal: argb:00000000, #e8e8e8, argb:00000000, argb:00000000, #e29a49
rofi.color-urgent: argb:00000000, #f43753, argb:00000000, argb:00000000, #e29a49
rofi.color-active: argb:00000000, #49bbfb, argb:00000000, argb:00000000, #e29a49
rofi.font: Misc Ohsnap 18
rofi.font: mplus Nerd Font 18
rofi.eh: 1
rofi.separator-style: solid
rofi.hide-scrollbar: true
Expand Down Expand Up @@ -41,7 +41,7 @@ Xft.hintstyle: hintfull
!-------------------------------------------------------------------------------
URxvt.modifier: mod1
URxvt*loginShell: true
URxvt.borderless: false
URxvt.borderless: true
URxvt*dynamicColors: on
URxvt.geometry: 90x20
URxvt.internalBorder: 3
Expand All @@ -64,19 +64,10 @@ URxvt.perl-ext-common:


!! Fonts
#define fonts xft:xos4 Terminus:size=16,\
xft:xos4 Terminus:size=16,\
xft:DejaVu Sans Mono Nerd Font:size=16,\
xft:lucy tewi:size=16,\
xft:Wuncon Siji:size=16

! Fonts
URxvt.font: xft:xos4 Terminus:size=16
URxvt*boldFont: xft:xos4 Terminus:size=16
URxvt.allow_bold: false
URxvt*font: fonts
URxvt*boldMode: true
URxvt*boldFont: fonts


! Fix font space
URxvt*letterSpace: -1

Expand Down

0 comments on commit 8c2a527

Please sign in to comment.