1
0
Fork 0
mirror of https://github.com/pnx/dotfiles synced 2026-06-16 19:30:01 +02:00
dotfiles/i3/config

244 lines
7.9 KiB
Text
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
# Variables
set_from_resource $color_bg i3wm.background #111111
set_from_resource $color_fg i3wm.foreground #f1f1f1
set_from_resource $color_red i3wm.color1 #cc817f
set_from_resource $color_green i3wm.color2 #7ccfaf
set_from_resource $color_yellow i3wm.color3 #ffcc99
set_from_resource $color_blue i3wm.color4 #8ac6f2
set_from_resource $color_magenta i3wm.color5 #9999cc
set_from_resource $color_gray0 i3wm.colorGray0 #383a43
set_from_resource $color_gray1 i3wm.colorGray1 #404754
set_from_resource $color_win_focus_fg i3wm.foreground #f1f1f1
set_from_resource $color_win_focus_bg i3wm.colorGray1 #404754
set_from_resource $color_win_unfocus_fg i3wm.foreground #f1f1f1
set_from_resource $color_win_unfocus_bg i3wm.colorGray0 #383a43
set_from_resource $color_win_urgent_fg i3wm.foreground #f1f1f1
set_from_resource $color_win_urgent_bg i3wm.color1 #cc817f
set $mod Mod4
set $super Shift
set $ws1 "1:main "
set $ws2 "2:www "
set $ws3 "3:code "
set $ws4 "4"
set $ws5 "5"
set $ws6 "6:chat"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
#set $second_monitor eDP-1
## Startup programs
exec --no-startup-id dex-autostart --autostart --environment i3
#exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock -c $color_bg --nofork
#exec --no-startup-id xautolock -time 1 -locker ~/.config/i3/blurlock.sh
#exec --no-startup-id xset dpms 300 # Turn of monitors after 5 min
#exec --no-startup-id nm-applet
## Config
font pango:FontAwesome, DejaVu Sans Mono 11
# 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 a terminal
bindsym $mod+Return exec urxvt -e fish
# kill focused window
bindsym $mod+x kill
# start rofi
bindsym $mod+d exec "rofi -show drun"
# lock screen
bindsym $mod+$super+f exec "xautolock -locknow"
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+odiaeresis focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+$super+j move left
bindsym $mod+$super+k move down
bindsym $mod+$super+l move up
bindsym $mod+$super+odiaeresis move right
# alternatively, you can use the cursor keys:
bindsym $mod+$super+Left move left
bindsym $mod+$super+Down move down
bindsym $mod+$super+Up move up
bindsym $mod+$super+Right 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
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+$super+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
# Workspace settings
workspace $ws1 output primary
workspace $ws2 output primary
workspace $ws3 output primary
workspace $ws4 output primary
workspace $ws5 output primary
#for second screen
#workspace $ws6 output $second_monitor gaps inner 0
workspace $ws6 output primary
# 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 workspace
bindsym $mod+$super+1 move container to workspace number $ws1
bindsym $mod+$super+2 move container to workspace number $ws2
bindsym $mod+$super+3 move container to workspace number $ws3
bindsym $mod+$super+4 move container to workspace number $ws4
bindsym $mod+$super+5 move container to workspace number $ws5
bindsym $mod+$super+6 move container to workspace number $ws6
bindsym $mod+$super+7 move container to workspace number $ws7
bindsym $mod+$super+8 move container to workspace number $ws8
bindsym $mod+$super+9 move container to workspace number $ws9
bindsym $mod+$super+0 move container to workspace number $ws10
# reload the configuration file
bindsym $mod+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+$super+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+$super+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'"
# Assignments
assign [class="^Vivaldi"] $ws2
assign [class="^Code$"] $ws3
assign [class="^Telegram"] $ws6
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
bindsym j resize shrink width 10 px
bindsym k resize grow height 10 px
bindsym l resize shrink height 10 px
bindsym odiaeresis resize grow width 10 px
bindsym Shift+j resize shrink width 25 px
bindsym Shift+k resize grow height 25 px
bindsym Shift+l resize shrink height 25 px
bindsym Shift+odiaeresis resize grow width 25 px
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px
bindsym Down resize grow height 10 px
bindsym Up resize shrink height 10 px
bindsym Right resize grow width 10 px
# back to normal: Enter or Escape or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
bindsym $mod+r mode "resize"
default_border normal 1
hide_edge_borders vertical
# COLORS
client.background $color_bg
# class border bground text indicator child_border
client.focused $color_win_focus_bg $color_win_focus_bg $color_win_focus_fg $color_win_focus_bg $color_win_focus_bg
client.focused_inactive $color_win_unfocus_bg $color_win_unfocus_bg $color_win_unfocus_fg $color_win_unfocus_bg $color_win_unfocus_bg
client.unfocused $color_win_unfocus_bg $color_win_unfocus_bg $color_win_unfocus_fg $color_win_unfocus_bg $color_win_unfocus_bg
client.urgent $color_win_urgent_bg $color_win_urgent_bg $color_win_urgent_fg $color_win_urgent_bg $color_win_urgent_bg
client.placeholder $color_bg $color_bg $color_fg $color_bg $color_bg
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
output primary
status_command i3status
separator_symbol " | "
padding 4 0
tray_padding 4
font pango:DejaVu Sans Mono, FontAwesome 14
strip_workspace_numbers no
strip_workspace_name no
workspace_min_width 50
colors {
background $color_bg
statusline $color_white
separator $color_gray
focused_workspace $color_gray1 $color_gray1 $color_fg
active_workspace $color_yellow $color_yellow $color_bg
inactive_workspace $color_bg $color_bg $color_fg
urgent_workspace $color_red $color_red $color_bg
binding_mode $color_magenta $color_magenta $color_bg
}
}