158 lines
4.2 KiB
Plaintext
158 lines
4.2 KiB
Plaintext
####################################
|
|
# I3 CONFIGURATION BY NASR #
|
|
####################################
|
|
|
|
# Set the mod key
|
|
set $mod Mod4
|
|
|
|
# Defining the colors
|
|
set $bg #2f343f
|
|
set $fg #404552
|
|
set $hi #fce94f
|
|
set $ac #4084d6
|
|
set $tx #2d323d
|
|
set $ia #9e9e9e
|
|
set $be #8faf9f
|
|
set $yw #f8f893
|
|
set $gn #81c181
|
|
set $rd #bf9b76
|
|
set $id #f9f8ff
|
|
set $ce #ceecee
|
|
set $sl #7f7f7f
|
|
|
|
# Align the title to the center
|
|
title_align center
|
|
|
|
# Default window orientation and border
|
|
default_orientation auto
|
|
default_border pixel 5
|
|
|
|
# Execute programs
|
|
bindsym $mod+g exec firefox
|
|
bindsym $mod+o exec code
|
|
|
|
exec --no-startup-id dex --autostart --environment i3
|
|
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
|
|
exec --no-startup-id nm-applet
|
|
|
|
# Start a terminal
|
|
bindsym $mod+Return exec alacritty
|
|
|
|
# Kill focused window
|
|
bindsym $mod+q kill
|
|
|
|
# Start dmenu (a program launcher)
|
|
bindsym $mod+d exec --no-startup-id dmenu_run
|
|
|
|
# Change focus
|
|
bindsym $mod+j focus left
|
|
bindsym $mod+k focus down
|
|
bindsym $mod+l focus up
|
|
bindsym $mod+semicolon focus right
|
|
|
|
# Move focused window
|
|
bindsym $mod+Shift+j move left
|
|
bindsym $mod+Shift+k move down
|
|
bindsym $mod+Shift+l move up
|
|
bindsym $mod+Shift+semicolon move right
|
|
|
|
# Split in horizontal orientation
|
|
bindsym $mod+h split h
|
|
|
|
# Split in vertical orientation
|
|
bindsym $mod+v split v
|
|
|
|
# Enter fullscreen mode for the focused container
|
|
bindsym $mod+f fullscreen toggle
|
|
|
|
# Window colors
|
|
client.focused $bg $ac $id $ac $gn
|
|
client.focused_inactive $bg $ia $id $ia $ia
|
|
client.unfocused $bg $be $sl $be $be
|
|
client.urgent $bg $rd $id $rd $rd
|
|
client.placeholder $bg $tx $id $bg $tx
|
|
client.background $id
|
|
|
|
# Define names for default workspaces for which we configure key bindings later on
|
|
set $ws1 "DEV"
|
|
set $ws2 "WEB"
|
|
set $ws3 "CLI"
|
|
set $ws4 "SOFTWARE"
|
|
|
|
# Switch to workspace
|
|
bindsym $mod+1 workspace $ws1
|
|
bindsym $mod+2 workspace $ws2
|
|
bindsym $mod+3 workspace $ws3
|
|
bindsym $mod+4 workspace $ws4
|
|
|
|
# Move focused container to workspace
|
|
bindsym $mod+Shift+1 move container to workspace $ws1
|
|
bindsym $mod+Shift+2 move container to workspace $ws2
|
|
bindsym $mod+Shift+3 move container to workspace $ws3
|
|
bindsym $mod+Shift+4 move container to workspace $ws4
|
|
|
|
# Reload i3
|
|
bindsym $mod+Shift+c reload
|
|
# Restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
|
bindsym $mod+Shift+r restart
|
|
# Exit i3 (logs you out of your X session)
|
|
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'This will end the session' -B 'Yes, exit i3' 'i3-msg exit'"
|
|
|
|
# Resize window (you can also use the mouse for that)
|
|
bindsym $mod+r mode "resize"
|
|
|
|
mode "resize" {
|
|
# Resizing keybindings
|
|
bindsym j resize shrink width 10 px or 10 ppt
|
|
bindsym k resize grow height 10 px or 10 ppt
|
|
bindsym l resize shrink height 10 px or 10 ppt
|
|
bindsym semicolon resize grow width 10 px or 10 ppt
|
|
|
|
# Same bindings, but for the arrow keys
|
|
bindsym Left resize shrink width 10 px or 10 ppt
|
|
bindsym Down resize grow height 10 px or 10 ppt
|
|
bindsym Up resize shrink height 10 px or 10 ppt
|
|
bindsym Right resize grow width 10 px or 10 ppt
|
|
|
|
# Back to normal: Enter or Escape or $mod+r
|
|
bindsym Return mode "default"
|
|
bindsym Escape mode "default"
|
|
bindsym $mod+r mode "default"
|
|
}
|
|
|
|
# Gaps between the windows
|
|
gaps inner 7
|
|
gaps outer 7
|
|
|
|
# Start i3bar to display a workspace bar
|
|
bar {
|
|
status_command i3status
|
|
position bottom
|
|
padding 2px
|
|
separator_symbol " | "
|
|
tray_output primary
|
|
colors {
|
|
background $bg
|
|
statusline $id
|
|
separator $rd
|
|
|
|
focused_workspace $fg $hi $fg
|
|
active_workspace $hi $hi $hi
|
|
inactive_workspace $bg $bg $id
|
|
urgent_workspace $bg $rd $id
|
|
binding_mode $bg $rd $id
|
|
}
|
|
workspace_min_width 100
|
|
|
|
font pango:0xMono Nerd Font 15
|
|
|
|
# Disable clicking on the bar and enable middle button click screenshots
|
|
bindsym button1 nop
|
|
bindsym --release button3 exec --no-startup-id import ~/latest-screenshot.png
|
|
}
|
|
|
|
# Display resolution and wallpaper and keyboard speed
|
|
exec_always xrandr --output HDMI-2 --mode 1920x1080 --rate 120
|
|
exec_always feh --bg-fill ~/.config/wp.jpeg
|
|
exec --no-startup-id xset r rate 250 20
|