feat(i3): Add i3 config

feat(alacritty): Migrate to toml
This commit is contained in:
Quentin Godefroid 2024-01-02 17:56:07 +01:00
parent a3331c0e51
commit aa55391311
Signed by: hactario
GPG key ID: 688E98939E5CBE8D
7 changed files with 70 additions and 45 deletions

View file

@ -1,4 +1,4 @@
import = ["/home/hactario/.config/alacritty/dracula.toml", "/home/hactario/.config/alacritty/qgodefro.toml"] import = ["~/.config/alacritty/dracula.toml", "~/.config/alacritty/qgodefro.toml"]
[env] [env]
TERM = "xterm-256color" TERM = "xterm-256color"

View file

@ -59,12 +59,18 @@ text = "CellForeground"
cursor = "CellForeground" cursor = "CellForeground"
text = "CellBackground" text = "CellBackground"
[bell]
color = "0xf8f8f2"
[font]
size = 10.0
[font.bold] [font.bold]
family = "monospace" family = "Hack Nerd Font Mono"
style = "Bold" style = "Bold"
[font.normal] [font.normal]
family = "monospace" family = "Hack Nerd Font Mono"
style = "Regular" style = "Regular"
[font.offset] [font.offset]

View file

@ -1,15 +1,21 @@
live_config_reload = true live_config_reload = true
[window]
dynamic_padding = true
decorations = 'None'
opacity = 0.8
dynamic_title = true
[bell] [bell]
animation = "EaseOutExpo" animation = "EaseOutQuad"
duration = 2 duration = 150
[colors] [colors]
draw_bold_text_with_bright_colors = true draw_bold_text_with_bright_colors = true
[scrolling] [scrolling]
history = 10000 history = 100000
multiplier = 1 multiplier = 3
[selection] [selection]
save_to_clipboard = true save_to_clipboard = true

View file

@ -49,23 +49,8 @@ bindsym XF86AudioPrev exec "spotifycli --prev && spotifycli --statusshort > /var
# Use Mouse+$mod to drag floating windows to their wanted position # Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod floating_modifier $mod
# move tiling windows via drag & drop by left-clicking into the title bar,
# or left-clicking anywhere into the window while holding the floating modifier.
tiling_drag modifier titlebar tiling_drag modifier titlebar
bindsym $mod+Return exec alacritty
# start a terminal
bindsym $mod+Return exec /etc/profiles/per-user/hactario/bin/alacritty
# kill focused window
bindsym $mod+Shift+a kill
# start dmenu (a program launcher)
# bindsym $mod+d exec --no-startup-id dmenu_run
# A more modern dmenu replacement is rofi:
# bindcode $mod+40 exec "rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a
# .desktop file. It is a wrapper around dmenu, so you need that installed.
# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop
bindsym $mod+d exec "dmenu_run -nf '#F8F8F2' -nb '#282A36' -sb '#6272A4' -sf '#F8F8F2' -fn 'Hack-10.5' -l 5 -p '  '" bindsym $mod+d exec "dmenu_run -nf '#F8F8F2' -nb '#282A36' -sb '#6272A4' -sf '#F8F8F2' -fn 'Hack-10.5' -l 5 -p '  '"
# change focus # change focus
@ -170,12 +155,14 @@ workspace $ws8 output $monitor_vertical
workspace $ws9 output $monitor_integrated workspace $ws9 output $monitor_integrated
workspace $ws10 output $monitor_integrated workspace $ws10 output $monitor_integrated
bindsym $mod+x [urgent=latest] focus
# reload the configuration file # reload the configuration file
bindsym $mod+Shift+c reload bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session) # exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
# resize window (you can also use the mouse for that) # resize window (you can also use the mouse for that)
mode "resize" { mode "resize" {
@ -206,6 +193,26 @@ bindsym $mod+r mode "resize"
include ~/.config/i3/config.d/*.conf include ~/.config/i3/config.d/*.conf
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
font pango:Hack Nerd Font Mono, FontAwesome 8
status_command i3status ~/.config/i3status-rust/config.toml
position bottom
workspace_buttons yes
tray_output none
colors {
background #282A36
statusline #F8F8F2
separator #44475A
focused_workspace #44475A #44475A #F8F8F2
active_workspace #282A36 #44475A #F8F8F2
inactive_workspace #282A36 #282A36 #BFBFBF
urgent_workspace #FF5555 #FF5555 #F8F8F2
binding_mode #FF5555 #FF5555 #F8F8F2
}
bindsym --release button3 exec --no-startup-id import ~/screenshot-$(date +%F-%T).png
}
client.focused #6272A4 #6272A4 #F8F8F2 #6272A4 #6272A4 client.focused #6272A4 #6272A4 #F8F8F2 #6272A4 #6272A4
client.focused_inactive #44475A #44475A #F8F8F2 #44475A #44475A client.focused_inactive #44475A #44475A #F8F8F2 #44475A #44475A
@ -214,20 +221,6 @@ client.urgent #44475A #FF5555 #F8F8F2 #FF5555 #FF5555
client.placeholder #282A36 #282A36 #F8F8F2 #282A36 #282A36 client.placeholder #282A36 #282A36 #F8F8F2 #282A36 #282A36
client.background #F8F8F2 client.background #F8F8F2
bar {
font pango:'Hack Nerd Font Regular' 12
position bottom
status_command i3status ~/.config/i3status-rust/config.toml
colors {
background #282A36
statusline #F8F8F2
separator #44475A
focused_workspace #44475A #44475A #F8F8F2
active_workspace #282A36 #44475A #F8F8F2
inactive_workspace #282A36 #282A36 #BFBFBF
urgent_workspace #FF5555 #FF5555 #F8F8F2
binding_mode #FF5555 #FF5555 #F8F8F2
}
}
exec --no-startup-id feh --bg-fill ~/.dotfiles/i3/.wallpapers/mr-robot-hacker-10000x5625-15768.png exec --no-startup-id feh --bg-fill ~/.dotfiles/i3/.wallpapers/mr-robot-hacker-10000x5625-15768.png

View file

@ -1,9 +1,9 @@
general { general {
// output_format = "i3bar" // output_format = "i3bar"
colors = true colors = true
color_good = "#50FA7B" color_good = "#a3be8c"
color_degraded = "#F1FA8C" color_degraded = "#ebcb8b"
color_bad = "#FF5555" color_bad = "#bf616a"
interval = 5 interval = 5
separator = "󰭆" separator = "󰭆"
} }
@ -133,4 +133,24 @@ volume master {
read_file spotify { read_file spotify {
format = "🔊%content" format = "🔊%content"
path = "~/.config/i3status/spotify.log" path = "~/.config/i3status/spotify.log"
format = "%status %percentage %remaining"
}
disk "/" {
format = "%avail"
}
load {
format = "%1min"
}
memory {
format = "%used | %available"
threshold_degraded = "1G"
format_degraded = "MEMORY < %available"
}
tztime local {
format = "%Y-%m-%d %H:%M:%S"
} }

View file

@ -19,7 +19,7 @@ base=(
polybar polybar
puppet puppet
ssh ssh
sway i3
terminfo terminfo
tmux tmux
vim vim