# Window and Color client.focused #121212 #101010 #9e8a8e client.focused_inactive #101010 #191919 #999999 client.unfocused #101010 #191919 #999999 client.urgent #cd989a #cd989a #2e3436 client.background #1d1d1d hide_edge_borders smart new_window pixel 4 new_float pixel 4 # Gapps smart_gaps on smart_borders on # i3 config file (v4) # # Please see https://i3wm.org/docs/userguide.html for a complete reference! set $mod Mod4 # Font for window titles. Will also be used by the bar unless a different font # is used in the bar {} block below. font pango:Ubuntu Mono 12 font pango:Noto Mono 12 #font pango:WenQuanYi Zen Hei 12 # 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 termite # kill focused window bindsym $mod+Shift+q kill # start dmenu (a program launcher) #bindsym $mod+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+d exec --no-startup-id i3-dmenu-desktop bindsym $mod+d exec --no-startup-id rofi -show run -display-run "" # 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 # 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+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 # focus the child container #bindsym $mod+d focus child #切换工作区 bindsym $mod+1 workspace 1 Terminal bindsym $mod+2 workspace 2 Chromium bindsym $mod+3 workspace 3 Code bindsym $mod+4 workspace 4 Chat bindsym $mod+5 workspace 5 File bindsym $mod+6 workspace 6 Media bindsym $mod+7 workspace 7 Download bindsym $mod+8 workspace 8 Game bindsym $mod+9 workspace 9 Trash bindsym $mod+0 workspace 0 Main #移动工作区 bindsym $mod+Shift+1 move container to workspace 1 Terminal bindsym $mod+Shift+2 move container to workspace 2 Chromium bindsym $mod+Shift+3 move container to workspace 3 Code bindsym $mod+Shift+4 move container to workspace 4 Chat bindsym $mod+Shift+5 move container to workspace 5 File bindsym $mod+Shift+6 move container to workspace 6 Media bindsym $mod+Shift+7 move container to workspace 7 Download bindsym $mod+Shift+8 move container to workspace 8 Game bindsym $mod+Shift+9 move container to workspace 9 Trash bindsym $mod+Shift+0 move container to workspace 0 Main #重载配置 bindsym $mod+Shift+c reload #重启i3 bindsym $mod+Shift+r restart #退出动作 bindsym $mod+Shift+e exec "i3-nagbar -t warning -m '干啥?' -b '锁屏' 'dm-tool lock' -b '退出' 'i3-msg exit' -b '休眠' 'dm-tool lock&&sudo pm-hibernate' -b '关机' 'sudo shutdown -h now' -b '重启' 'sudo reboot'" bindsym mod1+l exec lock #音量 bindsym XF86AudioRaiseVolume exec "amixer -c 1 sset 'Master' 5%+" bindsym XF86AudioLowerVolume exec "amixer -c 1 sset 'Master' 5%-" bindsym XF86AudioMute exec amixer -q set Master toggle #键盘背光 bindsym XF86KbdBrightnessDown exec "sudo echo 0 > /sys/class/leds/asus::kbd_backlight/brightness" bindsym XF86KbdBrightnessUp exec "sudo echo 1 > /sys/class/leds/asus::kbd_backlight/brightness" #屏幕亮度 bindsym XF86MonBrightnessUp exec /usr/bin/xbacklight -inc 5 bindsym XF86MonBrightnessDown exec /usr/bin/xbacklight -dec 10 #截图 bindsym 0xff61 exec scrot ~/Pictures/Screenshot/%Y_%m_%d_%H_%M_%S.png #调整窗口大小 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+r mode "resize" #状态栏 bar { position bottom status_command i3blocks -c ~/.config/i3/i3blocks.conf # i3bar_command i3bar -t # status_command i3status # font pango:Ubuntu Mono 13 font pango:Noto Sans 12 strip_workspace_numbers yes separator_symbol "//" height 24 colors { # background #1d2021A0 background #282828 statusline #DDDDDD separator #7addda focused_workspace #2B83A6 #2B83A6 #DDDDDD active_workspace #212121 #212121 #DDDDDD inactive_workspace #212121 #212121 #DDDDDD urgent_workspace #D64E4E #D64E4E #DDDDDD } } #指定工作区,通过xprop命令查看名称 assign [class="Chromium"] 2 Chromium assign [class="Code"] 3 Code assign [class="Telegram"] 4 Chat assign [class="Evolution"] 4 Chat assign [class="Pcmanfm"] 5 File #assign [class=""] 6 Media assign [class="Steam"] 8 Game assign [class="qBittorrent"] 7 Download # 悬浮窗口 #for_window [class="Termite"] floating enable, resize set 700 600, move position center # 自启 exec --no-startup-id fcitx exec --no-startup-id compton -cb exec --no-startup-id feh -Z --bg-scale /home/mame/Pictures/Backgrounds/Mame/blade.jpg exec --no-startup-id xautolock -time 10 -locker "lock" exec --no-startup-id sudo chmod 666 /sys/class/leds/asus\:\:kbd_backlight/brightness exec --no-startup-id termite exec --no-startup-id chromium exec --no-startup-id visual-studio-code exec --no-startup-id telegram-desktop #exec --no-startup-id evolution exec --no-startup-id sleep 3&&i3-msg "workspace 4 Chat; exec termite -e weechat; workspace 1 Terminal" exec --no-startup-id pcmanfm exec --no-startup-id pcmanfm exec --no-startup-id i3-msg "workspace 6 Media; exec termite -e cmus; workspace 1 Terminal" exec --no-startup-id steam exec --no-startup-id qbittorrent