i3 config and updates

This commit is contained in:
Antonin Ruan
2025-09-27 15:18:59 +02:00
parent ba845c0675
commit cb5df40b40
5 changed files with 232 additions and 1 deletions

115
.config/i3/config Normal file
View File

@@ -0,0 +1,115 @@
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
font pango:monospace 10
set $wallpaper ~/Pictures/backgrounds/clair-obscur-expedition-33-4k-p8.png
set $lockscreen ~/Pictures/backgrounds/co-lockscreen.png
exec --no-startup-id numlockx
exec --no-startup-id feh --bg-scale $wallpaper
# Start XDG autostart .desktop files using dex. See also
# https://wiki.archlinux.org/index.php/XDG_Autostart
exec --no-startup-id dex --autostart --environment i3
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
# Workspace config
include ./workspace.conf
# Use Mouse+$mod to drag floating windows to their wanted position
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
# start kitty
bindsym $mod+Return exec kitty
# kill focused window
bindsym $mod+q kill
# start rofi
bindsym $mod+r exec --no-startup-id rofi -show drun
# rofi spotify
bindsym $mod+m exec --no-startup-id /home/womax/.config/scripts/rofi_spotify.sh
# change focus
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+h focus left
bindsym $mod+l focus right
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Left focus left
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+h move left
bindsym $mod+Shift+l move right
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+g split h
# split in vertical orientation
bindsym $mod+v split v
# change container layout (stacked/tabbed/toggle split)
workspace_layout tabbed
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# hides border
hide_edge_borders smart
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# reload configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace
bindsym $mod+Shift+x restart
# lock screen
bindsym $mod+Control+l exec --no-startup-id "i3lock -kti $lockscreen && sleep 1"
# exit i3 (logout)
bindsym $mod+Shift+e exec --no-startup-id i3-msg exit
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
status_command i3status
}
exec --no-startup-id /usr/bin/dunst
exec kitty
exec emacs
exec firefox
exec discord
exec spotify-launcher

59
.config/i3/workspace.conf Normal file
View File

@@ -0,0 +1,59 @@
# Define names for default workspaces for which we configure key bindings later on
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
# switch to workspace
bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9
bindsym $mod+0 workspace number $ws10
# move focused container to worksapce
bindsym $mod+Shift+1 move container to workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5
bindsym $mod+Shift+6 move container to workspace number $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9
bindsym $mod+Shift+0 move container to workspace number $ws10
# Make DP-0 primary monitor
exec --no-startup-id xrandr --output "DP-0" --primary
# bind workspace 1 and 3 to primary monitor (DP-0)
workspace $ws1 output DP-0
workspace $ws3 output DP-0
# bind worksapce 2 and 4 to secondary monitor (HDMI-0)
workspace $ws2 output HDMI-0
workspace $ws4 output HDMI-0
# assign kitty, emacs to ws1
assign [class="kitty"] $ws1
assign [class="emacs"] $ws1
# assign firefox to ws2
assign [class="firefox"] $ws2
# assign spotify to ws3
assign [class="spotify"] $ws3
# assign discord to ws4
assign [class="discord"] $ws4

53
.config/i3status/config Normal file
View File

@@ -0,0 +1,53 @@
# i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
colors = true
interval = 5
}
# order += "ipv6"
# order += "wireless _first_"
order += "ethernet _first_"
# order += "battery all"
order += "disk /"
# order += "load"
order += "memory"
order += "tztime local"
wireless _first_ {
format_up = "W: (%quality at %essid) %ip"
format_down = "W: down"
}
ethernet _first_ {
format_up = "E: %ip (%speed)"
format_down = "E: down"
}
battery all {
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"
}

3
.emacs
View File

@@ -431,11 +431,12 @@
python-mode python-mode
tsx-ts-mode tsx-ts-mode
typescript-ts-mode typescript-ts-mode
) . lsp-deferred) ))
:custom :custom
(lsp-keymap-prefix "s-i") (lsp-keymap-prefix "s-i")
(lsp-keep-workspace-alive nil) (lsp-keep-workspace-alive nil)
(lsp-enable-xref t) (lsp-enable-xref t)
(lsp-enable-on-type-formatting nil)
) )
;;; zoxide ;;; zoxide

View File

@@ -2,9 +2,12 @@
.emacs.local|symlink| .emacs.local|symlink|
.emacs.rc|symlink| .emacs.rc|symlink|
.config/kitty|symlink| .config/kitty|symlink|
.config/i3|symlink|
.config/i3status|symlink|
.config/rofi|symlink| .config/rofi|symlink|
.config/kanata|symlink| .config/kanata|symlink|
.config/kanata-tray|symlink| .config/kanata-tray|symlink|
.config/scripts|symlink|
.zshrc|symlink| .zshrc|symlink|
.p10k.omp.yml|symlink| .p10k.omp.yml|symlink|
.zsh|symlink| .zsh|symlink|