Skip to content

Commit

Permalink
[i3] Update configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
fifthdrew committed Jul 15, 2024
1 parent 7cb60f7 commit 5669baf
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 66 deletions.
44 changes: 19 additions & 25 deletions i3/.config/i3/config.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,13 @@ set $small 800px 600px

# TODO: get this colors directly from .Xresources
# using this 'set_from_resource $white color7'
# Colors X
# Custom colors X
set $black #000000
set $black_b #333333
set $red #bb0000
set $red_b #ff3333
set $green #00bb00
set $green_b #33ff33
set $yellow #bbbb00
set $blue #0000bb
set $yellow_b #ffff33
set $blue_b #3333ff
set $magenta #bb00bb
set $magenta_b #ff33ff
set $cyan #00bbbb
set $cyan_b #33ffff
set $white #bbbbbb
set $white_b #ffffff

# Colors i3
# i3wm default colors
set $gray #484E50
set $gray_1 #888888
set $gray_2 #292D2E
Expand All @@ -54,8 +42,7 @@ set $red_1 #900000
set $black_1 #222222

# Font for window titles
font pango:M PLUS 1 Code 4
#font pango:Monospace 6
font pango:MPLUS1Code 4

# Windows and workspaces colors
client.background $white_b
Expand Down Expand Up @@ -213,9 +200,10 @@ bindsym $super+Shift+c reload
bindsym $super+Shift+r restart

# Pulse Audio controls
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 XF86AudioRaiseVolume exec --no-startup-id pactl -- set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86AudioLowerVolume exec --no-startup-id pactl -- set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle

# Screen brightness controls
#bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl set +5%
Expand Down Expand Up @@ -271,11 +259,13 @@ mode "$mode_gaps_size" {
bindsym $super+g mode "$mode_gaps_size"

# Exit i3 modes
set $mode_exit_i3 Exit: [l]ogout, [r]eboot, [s]hutdown, loc[k]
set $mode_exit_i3 Exit: [l]ogout, [r]eboot, [s]uspend, [h]ibernate, [p]oweroff, loc[k]
mode "$mode_exit_i3" {
bindsym l exec i3-msg exit
bindsym r exec systemctl reboot
bindsym s exec systemctl poweroff
bindsym s exec systemctl suspend
bindsym h exec systemctl hibernate
bindsym p exec systemctl poweroff
bindsym k exec --no-startup-id i3lock -i $wallpaper, mode "default"

bindsym Escape mode "default"
Expand All @@ -287,8 +277,14 @@ bindsym $super+x mode "$mode_exit_i3"
exec xset r rate 200 50
exec xset b off

# Network Manager gui
exec --no-startup-id nm-applet

# Locks the screen when it goes to sleep
exec xautolock -time 5 -locker '$lock_screen'
exec --no-startup-id xss-lock --transfer-sleep-lock -- '$lock_screen' --nofork

# Locks the screen when it goes inactive
exec --no-startup-id xautolock -time 5 -locker '$lock_screen'

# Add shadows and transparence effects
#exec --no-startup-id compiz --replace
Expand All @@ -300,11 +296,9 @@ exec_always --no-startup-id feh --bg-fill $wallpaper
# Start i3bar to display a workspace bar
bar {
# Set status bar font
font pango:M PLUS 1 Code 5
#font pango:Monospace 7
font pango:MPLUS1Code 5

# Set status bar infos
#status_command python3 ~/.config/i3status/config.py
status_command i3status

# Set character showed between infos
Expand Down
50 changes: 22 additions & 28 deletions i3/.config/i3/config.laptop
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,13 @@ set $small 600px 400px

# TODO: get this colors directly from .Xresources
# using this 'set_from_resource $white color7'
# Colors X
# Custom colors X
set $black #000000
set $black_b #333333
set $red #bb0000
set $red_b #ff3333
set $green #00bb00
set $green_b #33ff33
set $yellow #bbbb00
set $blue #0000bb
set $yellow_b #ffff33
set $blue_b #3333ff
set $magenta #bb00bb
set $magenta_b #ff33ff
set $cyan #00bbbb
set $cyan_b #33ffff
set $white #bbbbbb
set $white_b #ffffff

# Colors i3
# i3wm default colors
set $gray #484E50
set $gray_1 #888888
set $gray_2 #292D2E
Expand All @@ -54,8 +42,7 @@ set $red_1 #900000
set $black_1 #222222

# Font for window titles
font pango:M PLUS 1 Code 6
#font pango:Monospace 6
font pango:MPLUS1Code 4

# Windows and workspaces colors
client.background $white_b
Expand Down Expand Up @@ -95,7 +82,7 @@ floating_minimum_size $min_window_size
#for_window [class=".*"] title_format "%class"
for_window [class=".*"] title_format "<big>%title</big>"
for_window [all] title_window_icon on
for_window [all] title_window_icon padding 0px
for_window [all] title_window_icon padding 1px

# Start a terminal
#bindsym $super+Return exec i3-sensible-terminal
Expand Down Expand Up @@ -213,9 +200,10 @@ bindsym $super+Shift+c reload
bindsym $super+Shift+r restart

# Pulse Audio controls
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 XF86AudioRaiseVolume exec --no-startup-id pactl -- set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86AudioLowerVolume exec --no-startup-id pactl -- set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle

# Screen brightness controls
#bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl set +5%
Expand Down Expand Up @@ -271,11 +259,13 @@ mode "$mode_gaps_size" {
bindsym $super+g mode "$mode_gaps_size"

# Exit i3 modes
set $mode_exit_i3 Exit: [l]ogout, [r]eboot, [s]hutdown, loc[k]
set $mode_exit_i3 Exit: [l]ogout, [r]eboot, [s]uspend, [h]ibernate, [p]oweroff, loc[k]
mode "$mode_exit_i3" {
bindsym l exec i3-msg exit
bindsym r exec systemctl reboot
bindsym s exec systemctl poweroff
bindsym s exec systemctl suspend
bindsym h exec systemctl hibernate
bindsym p exec systemctl poweroff
bindsym k exec --no-startup-id i3lock -i $wallpaper, mode "default"

bindsym Escape mode "default"
Expand All @@ -287,8 +277,14 @@ bindsym $super+x mode "$mode_exit_i3"
exec xset r rate 200 50
exec xset b off

# Network Manager gui
exec --no-startup-id nm-applet

# Locks the screen when it goes to sleep
exec xautolock -time 5 -locker '$lock_screen'
exec --no-startup-id xss-lock --transfer-sleep-lock -- '$lock_screen' --nofork

# Locks the screen when it goes inactive
exec --no-startup-id xautolock -time 5 -locker '$lock_screen'

# Add shadows and transparence effects
#exec --no-startup-id compiz --replace
Expand All @@ -300,18 +296,16 @@ exec_always --no-startup-id feh --bg-fill $wallpaper
# Start i3bar to display a workspace bar
bar {
# Set status bar font
font pango:M PLUS 1 Code 7
#font pango:Monospace 7
font pango:MPLUS1Code 5

# Set status bar infos
status_command python3 ~/.config/i3/status.py
#status_command i3status
status_command i3status

# Set character showed between infos
separator_symbol " "

# Set padding for i3bar
padding -2px 0 -2px 0
padding -1px 0 -1px 0

# Set padding for tray icons
tray_padding 0
Expand Down
29 changes: 16 additions & 13 deletions i3/.config/i3status/config
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
# If the above line is not correctly displayed, fix your editor first!

general {
colors = true
interval = 1
colors = true
color_good="#00bb00"
color_degraded="#bbbb00"
color_bad="#bb0000"
}

# Shows CPU usage %
Expand Down Expand Up @@ -69,20 +72,20 @@ ethernet _first_ {

order += "battery all"
battery all {
# format = "BAT: %status %percentage %remaining %emptytime"
format = "BAT: %remaining [%status]"
format_down = ""
status_chr = "chr"
status_bat = "bat"
status_unk = "unk"
status_full = "full"
# status_idle = "idle"
path = "/sys/class/power_supply/BAT%d/uevent"
low_threshold = 10
# format = "BAT: %status %percentage %remaining %emptytime"
format = "BAT: %remaining [%status]"
format_down = ""
status_chr = "chr"
status_bat = "bat"
status_unk = "unk"
status_full = "full"
# status_idle = "idle"
path = "/sys/class/power_supply/BAT%d/uevent"
low_threshold = 10
}

order += "tztime local"
tztime local {
# format = "%d-%m-%Y %H:%M:%S "
format="%a %-d %b %X "
# format = "%d-%m-%Y %H:%M:%S "
format="%a %-d %b %X "
}

0 comments on commit 5669baf

Please sign in to comment.