245 lines
8.9 KiB
Plaintext
245 lines
8.9 KiB
Plaintext
# font for window titles and bar
|
|
# font pango:Source Sans Pro 10
|
|
# refence docs: https://i3wm.org/docs/
|
|
# refence video : https://www.youtube.com/watch?v=8-S0cWnLBKg&list=RDCMUCcQsDUZiK1GWDcP7BpVO_kw&start_radio=1&rv=8-S0cWnLBKg
|
|
|
|
font pango:Noto Sans 10
|
|
# use win key
|
|
set $mod Mod4
|
|
|
|
# 1. download awesome font: https://fontawesome.com/?utm_source=v4_homepage&utm_medium=display&utm_campaign=fa5_released&utm_content=banner
|
|
# 2. just copy paste from: https://fontawesome.com/v4/cheatsheet/
|
|
# define names for workspaces
|
|
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 "0"
|
|
|
|
# multi screen setting
|
|
workspace 1 output HDMI-0
|
|
workspace 2 output DP-1
|
|
workspace 3 output HDMI-0
|
|
workspace 4 output DP-1
|
|
workspace 5 output HDMI-0
|
|
workspace 6 output DP-1
|
|
workspace 7 output HDMI-0
|
|
workspace 8 output DP-1
|
|
workspace 9 output HDMI-0
|
|
workspace 10 output DP-1
|
|
|
|
# floating window u can use mouse left drag or right drag move or scale
|
|
# use $mod+Mouse to drag floating windows to their wanted position
|
|
floating_modifier $mod
|
|
|
|
# control focused window when follows the mouse movements
|
|
focus_follows_mouse no
|
|
|
|
# window border settings
|
|
#1default_border none
|
|
default_border pixel 1
|
|
#default_border none
|
|
default_floating_border pixel 1
|
|
|
|
# smart_borders on
|
|
|
|
# hiding borders adjacent to the screen edges
|
|
hide_edge_borders both
|
|
|
|
# set popups during fullscreen mode
|
|
popup_during_fullscreen smart
|
|
|
|
# start a terminal
|
|
# jump to wind1 then open terminal
|
|
# bindsym $mod+Return workspace $ws1; exec --no-startup-id terminator
|
|
bindsym $mod+Return exec --no-startup-id terminator
|
|
|
|
bindsym $mod+w exec --no-startup-id rofi -show drun
|
|
|
|
# bindsym $mod+b exec --no-startup-id dmenu-bluetooth
|
|
bindsym $mod+b exec --no-startup-id rofi-bluetooth
|
|
# switching window with win+tab
|
|
bindsym $mod+Tab exec --no-startup-id rofi -show window
|
|
|
|
|
|
bindsym $mod+n exec --no-startup-id networkmanager_dmenu
|
|
# show_marks yes
|
|
# kill focused window
|
|
bindsym $mod+q kill
|
|
|
|
# alternatively, you can use the cursor keys:
|
|
bindsym $mod+h focus left
|
|
bindsym $mod+j focus down
|
|
bindsym $mod+k focus up
|
|
bindsym $mod+l focus right
|
|
|
|
# alternatively, you can use the cursor keys:
|
|
bindsym $mod+Shift+h move left
|
|
bindsym $mod+Shift+j move down
|
|
bindsym $mod+Shift+k move up
|
|
bindsym $mod+Shift+l move right
|
|
|
|
|
|
# change container layout
|
|
# bindsym $mod+s layout stacking
|
|
bindsym $mod+d layout tabbed
|
|
bindsym $mod+e layout toggle split
|
|
bindsym $mod+a split v
|
|
bindsym $mod+s split h
|
|
# enter fullscreen mode for the focused container
|
|
bindsym $mod+f fullscreen toggle
|
|
# toggle tiling / floating
|
|
bindsym $mod+space floating toggle
|
|
|
|
# change focus between tiling / floating windows
|
|
bindsym $mod+Shift+space focus mode_toggle
|
|
|
|
# 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
|
|
bindsym $mod+minus scratchpad show
|
|
|
|
# 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+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
|
|
bindsym $mod+Shift+5 move container to workspace $ws5
|
|
bindsym $mod+Shift+6 move container to workspace $ws6
|
|
bindsym $mod+Shift+7 move container to workspace $ws7
|
|
bindsym $mod+Shift+8 move container to workspace $ws8
|
|
bindsym $mod+Shift+9 move container to workspace $ws9
|
|
bindsym $mod+Shift+0 move container to workspace $ws10
|
|
|
|
|
|
# bindsym $mod+l exec --no-startup-id "sh ~/.config/i3/lock.sh"
|
|
bindsym $mod+Shift+Ctrl+l exec --no-startup-id "sh ~/.config/rofi/powermenu.sh"
|
|
bindsym $mod+p exec --no-startup-id "flameshot gui"
|
|
# volume
|
|
bindsym $mod+i exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -2%
|
|
bindsym $mod+o exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +2%
|
|
# bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -2%
|
|
# bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +2%
|
|
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
|
|
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
|
|
|
bindsym XF86MonBrightnessUp exec --no-startup-id light -A 2
|
|
bindsym XF86MonBrightnessDown exec --no-startup-id light -U 2
|
|
|
|
# reload the configuration file
|
|
bindsym $mod+Shift+r reload
|
|
|
|
# resize window
|
|
bindsym $mod+r mode " "
|
|
mode " " {
|
|
bindsym h resize shrink width 4 px or 4 ppt
|
|
bindsym j resize grow height 4 px or 4 ppt
|
|
bindsym k resize shrink height 4 px or 4 ppt
|
|
bindsym l resize grow width 4 px or 4 ppt
|
|
|
|
# back to normal: Enter or win+r
|
|
bindsym Return mode "default"
|
|
bindsym $mod+r mode "default"
|
|
}
|
|
|
|
# set specific windows to floating mode
|
|
for_window [window_role="app"] floating enable
|
|
for_window [window_role="pop-up"] floating enable
|
|
for_window [window_role="task_dialog"] floating enable
|
|
for_window [title="Preferences$"] floating enable
|
|
|
|
# class border backgr. text indicator child_border
|
|
# set specific windows to floating mode
|
|
for_window [window_role="app"] floating enable
|
|
for_window [window_role="pop-up"] floating enable
|
|
for_window [window_role="task_dialog"] floating enable
|
|
for_window [title="Preferences$"] floating enable
|
|
|
|
# #546735 -> #81a1c1
|
|
# class border backgr. text indicator child_border
|
|
client.focused #81a1c1 #81a1c1 #F8F8F2 #81a1c1 #81a1c1
|
|
client.focused_inactive #2E3440 #2E3440 #F8F8F2 #2E3440 #2E3440
|
|
client.unfocused #2E3440 #2E3440 #BFBFBF #2E3440 #2E3440
|
|
client.urgent #2E3440 #FF5555 #F8F8F2 #FF5555 #FF5555
|
|
client.placeholder #2E3440 #2E3440 #F8F8F2 #2E3440 #2E3440
|
|
client.background #F8F8F2
|
|
|
|
# 设置程序为浮动窗口调用一下命令 然后点击鼠标即可获得信息, 注意是第二个名字
|
|
# xprop | grep "WM_CLASS"
|
|
for_window [class="xdman-Main"] floating enable
|
|
for_window [class="java-lang-Thread"] floating enable
|
|
for_window [class="VirtualBox Manager"] floating enable
|
|
for_window [class="Qq"] floating enable
|
|
for_window [class="Lxappearance"] floating enable
|
|
for_window [class="Qalculate-gtk"] floating enable
|
|
for_window [class="Nitrogen"] floating enable
|
|
for_window [class="Steam"] floating enable
|
|
for_window [class="steam"] floating enable
|
|
for_window [class="words-picker"] floating enable
|
|
for_window [class="icalingua"] floating enable
|
|
for_window [class="stacer"] floating enable
|
|
for_window [class="Virt-manager"] floating enable
|
|
for_window [class="TelegramDesktop"] floating enable
|
|
for_window [class="Quickgui"] floating enable
|
|
for_window [class="R_x11"] floating enable
|
|
for_window [class="Pavucontrol"] floating enable
|
|
for_window [class="Geph"] floating enable
|
|
for_window [class="kdeconnect-app"] floating enable
|
|
for_window [class="KDE_Connect"] floating enabl
|
|
for_window [class="mpv"] floating enable
|
|
for_window [class="NewsFlashGTK"] floating enable
|
|
for_window [class="PrismLauncher"] floating enable
|
|
for_window [class="zoom"] floating enable
|
|
for_window [class="wemeetapp"] floating enable
|
|
for_window [class="fsearch"] floating enable
|
|
for_window [class="Fsearch"] floating enable
|
|
for_window [class="kvantummanager"] floating enable
|
|
for_window [class="Kvantum Manager"] floating enable
|
|
for_window [class="cmake-gui"] floating enable
|
|
for_window [class="CMakeSetup"] floating enable
|
|
for_window [class="feh"] floating enable
|
|
for_window [class="Tlp-UI"] floating enable
|
|
for_window [class="steamwebhelper"] floating enable
|
|
|
|
# for_window [class="Godot_ProjectList"] floating enable
|
|
# for_window [class="Godot_Engine"] floating enable
|
|
for_window [class="WorldTree"] floating enable
|
|
|
|
# 设置程序为某个workspace
|
|
# assign [class="Godot"] $ws1
|
|
|
|
# exec 代表 login时执行
|
|
# exec_always 代表 login和reload i3时 都会执行
|
|
# local config file
|
|
# startup applications
|
|
# exec --no-startup-id xautolock -time 5 -locker '~/.config/i3/lock.sh'
|
|
exec --no-startup-id ~/Software/Clash/cfw
|
|
exec --no-startup-id dunst
|
|
# exec --no-startup-id bash ~/.config/i3/gummy.sh
|
|
# exec --no-startup-id gummy start
|
|
#exec --no-startup-id sh ~/.config/i3/mon.sh
|
|
exec_always --no-startup-id feh --bg-fill ~/Pictures/wallpapers/archlinux.png
|
|
#exec_always --no-startup-id sh ~/.config/i3/start.sh
|
|
exec_always --no-startup-id picom --config ~/.config/picom/picom.sample.conf
|
|
exec_always --no-startup-id fcitx5
|
|
exec_always --no-startup-id sh ~/.config/polybar/polybar.sh
|
|
#exec_always --no-startup-id copyq
|