321 lines
11 KiB
Text
321 lines
11 KiB
Text
# This file has been auto-generated by i3-config-wizard(1).
|
||
# It will not be overwritten, so edit it as you like.
|
||
#
|
||
# Should you change your keyboard layout some time, delete
|
||
# this file and re-run i3-config-wizard(1).
|
||
#
|
||
|
||
# i3 config file (v4)
|
||
#
|
||
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
|
||
|
||
set $mod Mod4
|
||
|
||
# Configure border style <normal|1pixel|pixel xx|none|pixel>
|
||
new_window pixel 1
|
||
new_float normal
|
||
|
||
# Hide borders
|
||
hide_edge_borders none
|
||
|
||
# Pulse Audio controls
|
||
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer set Master 5%+ #increase sound volume
|
||
bindsym XF86AudioLowerVolume exec --no-startup-id amixer set Master 5%- #decrease sound volume
|
||
bindsym XF86AudioMute exec --no-startup-id amixer set Master toggle # mute sound
|
||
|
||
# alt+tab navi
|
||
bindsym Mod1+Tab workspace next
|
||
bindsym Mod1+Shift+Tab workspace prev
|
||
|
||
# change borders
|
||
bindsym $mod+u border none
|
||
bindsym $mod+y border pixel 1
|
||
bindsym $mod+n border normal
|
||
|
||
# Font for window titles. Will also be used by the bar unless a different font
|
||
# is used in the bar {} block below.
|
||
#font Inconsolata:monospace 8
|
||
font pango:Noto Sans Mono 10, FontAwesome 10
|
||
|
||
# This font is widely installed, provides lots of unicode glyphs, right-to-left
|
||
# text rendering and scalability on retina/hidpi displays (thanks to pango).
|
||
#font pango:DejaVu Sans Mono 8
|
||
|
||
# Before i3 v4.8, we used to recommend this one as the default:
|
||
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
|
||
# The font above is very space-efficient, that is, it looks good, sharp and
|
||
# clear in small sizes. However, its unicode glyph coverage is limited, the old
|
||
# X core fonts rendering does not support right-to-left and this being a bitmap
|
||
# font, it doesn’t scale on retina/hidpi displays.
|
||
|
||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||
floating_modifier $mod
|
||
|
||
# start a terminal
|
||
bindsym $mod+Return exec i3-sensible-terminal
|
||
|
||
# kill focused window
|
||
bindsym $mod+Shift+q kill
|
||
bindsym $mod+q kill
|
||
bindsym Mod1+F4 kill
|
||
|
||
# start dmenu (a program launcher)
|
||
#bindsym $mod+Shift+d exec dmenu_run
|
||
# There also is the (new) i3-dmenu-desktop which only displays applications
|
||
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
|
||
# installed.
|
||
#bindsym $mod+Shift+d exec --no-startup-id i3-dmenu-desktop
|
||
bindsym $mod+r exec "rofi -combi-modi window,drun,run -show combi -modi combi"
|
||
|
||
# misc app shortcuts
|
||
bindsym $mod+d exec "urxvt -title 'Hardware Diagnostics' -e hw-diags"
|
||
bindsym $mod+f exec "thunar ~"
|
||
bindsym $mod+i exec "hardinfo"
|
||
bindsym $mod+m exec "urxvt -title 'Mount All Volumes' -e mount-all-volumes gui"
|
||
bindsym $mod+s exec "urxvt -title 'Hardware Diagnostics' -e hw-diags quick"
|
||
bindsym $mod+t exec "urxvt"
|
||
bindsym $mod+v exec "urxvt -title 'Hardware Sensors' -e watch -c -n1 -t hw-sensors"
|
||
bindsym $mod+w exec "firefox"
|
||
|
||
focus_follows_mouse no
|
||
|
||
# change focus
|
||
bindsym $mod+j focus left
|
||
bindsym $mod+k focus down
|
||
bindsym $mod+l focus up
|
||
bindsym $mod+semicolon 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+Shift+j move left
|
||
bindsym $mod+Shift+k move down
|
||
bindsym $mod+Shift+l move up
|
||
bindsym $mod+Shift+semicolon move right
|
||
|
||
# alternatively, you can use the cursor keys:
|
||
bindsym $mod+Shift+Left move left
|
||
bindsym $mod+Shift+Down move down
|
||
bindsym $mod+Shift+Up move up
|
||
bindsym $mod+Shift+Right move right
|
||
|
||
# workspace back and forth (with/without active container)
|
||
workspace_auto_back_and_forth yes
|
||
bindsym $mod+b workspace back_and_forth
|
||
bindsym $mod+Shift+b move container to workspace back_and_forth; workspace back_and_forth
|
||
|
||
# split orientation
|
||
bindsym $mod+Shift+h split h
|
||
bindsym $mod+Shift+v split v
|
||
|
||
# enter fullscreen mode for the focused container
|
||
bindsym $mod+Shift+f fullscreen toggle
|
||
|
||
# change container layout (stacked, tabbed, toggle split)
|
||
bindsym $mod+Shift+s layout stacking
|
||
bindsym $mod+Shift+w layout tabbed
|
||
bindsym $mod+Shift+e layout toggle split
|
||
|
||
# toggle tiling / floating
|
||
bindsym $mod+Shift+space floating toggle
|
||
|
||
# change focus between tiling / floating windows
|
||
bindsym $mod+space focus mode_toggle
|
||
|
||
# focus the parent container
|
||
#bindsym $mod+a focus parent
|
||
|
||
# move the currently focused window to the scratchpad
|
||
bindsym $mod+Shift+minus move scratchpad
|
||
|
||
# Show the next scratchpad window or hide the focused scratchpad window.
|
||
# If there are multiple scratchpad windows, this command cycles through them.
|
||
bindsym $mod+minus scratchpad show
|
||
|
||
# focus the child container
|
||
#bindsym $mod+d focus child
|
||
|
||
# Workspace names
|
||
set $ws1 "一"
|
||
set $ws2 "二"
|
||
set $ws3 "三"
|
||
set $ws4 "四"
|
||
set $ws5 "五"
|
||
set $ws6 "六"
|
||
set $ws7 "七"
|
||
set $ws8 "八"
|
||
set $ws9 "九"
|
||
set $ws10 "十"
|
||
|
||
# switch to workspace
|
||
bindsym $mod+1 workspace $ws1
|
||
bindsym $mod+2 workspace $ws2
|
||
bindsym $mod+3 workspace $ws3
|
||
bindsym $mod+4 workspace $ws4
|
||
bindsym $mod+5 workspace $ws5
|
||
bindsym $mod+6 workspace $ws6
|
||
bindsym $mod+7 workspace $ws7
|
||
bindsym $mod+8 workspace $ws8
|
||
bindsym $mod+9 workspace $ws9
|
||
bindsym $mod+0 workspace $ws10
|
||
|
||
# move focused container to workspace
|
||
bindsym $mod+Ctrl+1 move container to workspace $ws1
|
||
bindsym $mod+Ctrl+2 move container to workspace $ws2
|
||
bindsym $mod+Ctrl+3 move container to workspace $ws3
|
||
bindsym $mod+Ctrl+4 move container to workspace $ws4
|
||
bindsym $mod+Ctrl+5 move container to workspace $ws5
|
||
bindsym $mod+Ctrl+6 move container to workspace $ws6
|
||
bindsym $mod+Ctrl+7 move container to workspace $ws7
|
||
bindsym $mod+Ctrl+8 move container to workspace $ws8
|
||
bindsym $mod+Ctrl+9 move container to workspace $ws9
|
||
bindsym $mod+Ctrl+0 move container to workspace $ws10
|
||
|
||
# move focused container to workspace and follow
|
||
bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1
|
||
bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2
|
||
bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3
|
||
bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4
|
||
bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5
|
||
bindsym $mod+Shift+6 move container to workspace $ws6; workspace $ws6
|
||
bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7
|
||
bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8
|
||
bindsym $mod+Shift+9 move container to workspace $ws9; workspace $ws9
|
||
bindsym $mod+Shift+0 move container to workspace $ws10; workspace $ws10
|
||
|
||
# Open specific applications in floating mode
|
||
for_window [class="Galculator"] floating enable border normal 5
|
||
for_window [class="Nitrogen"] floating enable sticky enable border normal 5
|
||
for_window [class="Thunar"] floating enable border normal 5
|
||
for_window [class="mpv"] floating enable border normal 5
|
||
for_window [title="Event Tester"] floating enable border normal 5
|
||
for_window [title="Firefox"] floating enable border normal 5
|
||
for_window [title="Hardware Diagnostics"] floating enable
|
||
for_window [title="Hardware Sensors"] floating enable
|
||
for_window [title="Mount All Volumes"] floating enable border normal 5
|
||
for_window [title="Network Connections"] floating enable border normal 5
|
||
for_window [title="Screen Layout Editor"] floating enable border normal 5
|
||
for_window [title="Slack"] floating enable border normal 5
|
||
for_window [title="System Information"] floating enable border normal 5
|
||
for_window [title="Volume Control"] floating enable border normal 5
|
||
for_window [title="Zenmap"] floating enable border normal 5
|
||
|
||
# switch to workspace with urgent window automatically
|
||
for_window [urgent=latest] focus
|
||
|
||
# reload the configuration file
|
||
#bindsym $mod+Shift+c reload
|
||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||
#bindsym $mod+Shift+r restart
|
||
|
||
# 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 window’s width.
|
||
# Pressing right will grow the window’s width.
|
||
# Pressing up will shrink the window’s height.
|
||
# Pressing down will grow the window’s height.
|
||
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
|
||
bindsym Return mode "default"
|
||
bindsym Escape mode "default"
|
||
}
|
||
|
||
bindsym $mod+Shift+r mode "resize"
|
||
|
||
# "System" menu
|
||
bindsym $mod+x mode "$mode_system"
|
||
set $mode_system (l)ock, (e)xit, (r)eboot, (s)hutdown, (c)onfig, (i)3
|
||
mode "$mode_system" {
|
||
bindsym l exec --no-startup-id i3lock, mode "default"
|
||
bindsym e exit, mode "default"
|
||
bindsym r exec reboot, mode "default"
|
||
bindsym s exec poweroff, mode "default"
|
||
bindsym c reload, mode "default"
|
||
bindsym i restart, mode "default"
|
||
|
||
# exit system mode: "Enter" or "Escape"
|
||
bindsym Return mode "default"
|
||
bindsym Escape mode "default"
|
||
}
|
||
|
||
#############################
|
||
### settings for i3-gaps: ###
|
||
#############################
|
||
|
||
# Set inner/outer gaps
|
||
gaps inner 10
|
||
gaps outer 4
|
||
|
||
# Additionally, you can issue commands with the following syntax. This is useful to bind keys to changing the gap size.
|
||
# gaps inner|outer current|all set|plus|minus <px>
|
||
# gaps inner all set 10
|
||
# gaps outer all plus 5
|
||
|
||
# Smart gaps (gaps used if only more than one container on the workspace)
|
||
smart_gaps on
|
||
|
||
# Smart borders (draw borders around container only if it is not the only container on this workspace)
|
||
# on|no_gaps (on=always activate and no_gaps=only activate if the gap size to the edge of the screen is 0)
|
||
smart_borders on
|
||
|
||
# Press $mod+Shift+g to enter the gap mode. Choose o or i for modifying outer/inner gaps. Press one of + / - (in-/decrement for current workspace) or 0 (remove gaps for current workspace). If you also press Shift with these keys, the change will be global for all workspaces.
|
||
set $mode_gaps Gaps: (o) outer, (i) inner
|
||
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
|
||
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
|
||
bindsym $mod+Shift+g mode "$mode_gaps"
|
||
|
||
mode "$mode_gaps" {
|
||
bindsym o mode "$mode_gaps_outer"
|
||
bindsym i mode "$mode_gaps_inner"
|
||
bindsym Return mode "default"
|
||
bindsym Escape mode "default"
|
||
}
|
||
mode "$mode_gaps_inner" {
|
||
bindsym plus gaps inner current plus 5
|
||
bindsym minus gaps inner current minus 5
|
||
bindsym 0 gaps inner current set 0
|
||
|
||
bindsym Shift+plus gaps inner all plus 5
|
||
bindsym Shift+minus gaps inner all minus 5
|
||
bindsym Shift+0 gaps inner all set 0
|
||
|
||
bindsym Return mode "default"
|
||
bindsym Escape mode "default"
|
||
}
|
||
mode "$mode_gaps_outer" {
|
||
bindsym plus gaps outer current plus 5
|
||
bindsym minus gaps outer current minus 5
|
||
bindsym 0 gaps outer current set 0
|
||
|
||
bindsym Shift+plus gaps outer all plus 5
|
||
bindsym Shift+minus gaps outer all minus 5
|
||
bindsym Shift+0 gaps outer all set 0
|
||
|
||
bindsym Return mode "default"
|
||
bindsym Escape mode "default"
|
||
}
|
||
|
||
# Start i3bar to display a workspace bar (plus the system information i3status
|
||
# finds out, if available)
|
||
bar {
|
||
position bottom
|
||
separator_symbol " "
|
||
status_command i3status
|
||
height 26
|
||
}
|