Linux i3 WM 配置

# i3 config file (v4)
# 设置mod Alt键(Mod1),Windows键(Mod4)
set $mod Mod1
set $win Mod4
#终端快捷键 mod+enter
bindsym $mod+Return exec xterm


#更改容器布局 (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split


#切换窗口
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon focus right
#方向键
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right


#移动窗口
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon move right
#方向键
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right

 

#切换窗口的全屏模式
bindsym $mod+f fullscreen toggle


# 启动程序
bindsym $mod+d exec rofi -show combi

#关闭窗口
bindsym $mod+Shift+q kill


# 定义工作空间名
set $ws1 "1:Chromium"
set $ws2 "2:Terminal"
set $ws3 "3:Subl3"
set $ws4 "4:Idea"
set $ws5 "5:Eclipse"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8:KVM"
set $ws9 "9:VBox"
set $ws10 "10:Status"

# 切换工作空间
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


#将窗口移动到工作区
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

 

# 重启 i3
bindsym $mod+Shift+r restart


# 退出i3 要在不杀死X服务器的情况下干净地退出i3,您可以使用$ mod + Shift +e。默认情况下,会出现一个对话框,要求您确认是否确实要退出
bindsym $mod+Shift+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'"

# 切换窗口的浮动模式
bindsym $mod+Shift+space floating toggle

#字体
font pango:monospace 10

#浮动修改器
floating_modifier $mod

#新工作空间的方向
#default_orientation horizo​​ntal

#新容器的布局模式
#workspace_layout default

# 窗口标题对齐 此选项确定窗口标题的文本对齐方式。默认为左
title_align center

# 新窗口的默认边框样式
default_border pixel 4
default_floating_border pixel 4

#border normal
#bindsym $mod+b border toggle

hide_edge_borders none

 

workspace_auto_back_and_forth yes

bindsym $mod+n bar mode toggle

 


# 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

 


# split in horizontal orientation
bindsym $mod+h split h

# split in vertical orientation
bindsym $mod+v split v

 

 

# 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

 

 

# reload the configuration file
bindsym $mod+Shift+c reload

 

# 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 or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}

bindsym $mod+r mode "resize"

# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {

#status_command i3blocks -c ~/.config/i3/i3blocks.conf
#status_command i3status
#status_command i3blocks
#status_command ~/.config/i3/bumblebee-status/bumblebee-status -m sensors taskwarrior uptime weather -p interval=0.3 spacer.text=":|:" weather.location="ISO 3166-2:CN" -t gruvbox-powerline

#status_command ~/.config/i3/bumblebee-status/bumblebee-status -m pasink brightness disk cpu memory battery datetime -p interval=1 -t powerline
#status_command python3 ~/.config/i3/status.py

status_command bash ~/bar.sh
mode dock
hidden_state hide
modifier $mod
position top

tray_output primary
workspace_buttons yes
font pango:DejaVu Sans Mono 10
strip_workspace_numbers no ###不显示工作区编号
binding_mode_indicator yes
colors {
background #515151
statusline #00ffFF
separator #ffffff

#<colorclass> <border> <background> <text>
focused_workspace #669933 #919191 #ffffff
#active_workspace #669933 #000000 #ffffff
inactive_workspace #669933 #515151 #ffffff
#urgent_workspace #669933 #ffffff #ffffff
}
}

bindsym $mod+Shift+x exec i3lock-fancy -gf 思源黑体-CN-Normal -t '亲,好好休息一下吧' -- scrot -z
bindsym $win+1 exec --no-startup-id chromium
bindsym $win+2 exec --no-startup-id subl3


bindsym $mod+z exec i3-msg 'workspace 10:Status'

bindsym $mod+c exec i3-msg 'workspace 9:VBox'


bindsym $win+e exec --no-startup-id Thunar

exec --no-startup-id compton -f

# class border backgr text indicator child_border
client.focused #aaaaaa #000000 #ffffff #919191 #919191
#client.focused_inactive #aaaaaa #000000 #ffffff #515151 #515151
client.unfocused #000000 #000000 #ffffff #717171 #717171
#client.urgent #000000 #900000 #ffffff #717171 #717171
#client.placeholder #000000 #000000 #ffffff #000000 #000000
client.background #000000


#assign [class="Chromium"] $ws1
#for_window [class="Chromium"] workspace $ws1
for_window [class="vlc"] floating enable
#for_window [class="konsole"] floating enable
for_window [class="Thunar"] floating enable
for_window [class="netease-cloud-music"] floating enable
for_window [class="Fcitx-config-gtk3"] floating enable
for_window [class="VirtualBox Manager"] floating enable
floating_minimum_size 175 x 100


# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec /usr/bin/pulseaudio-ctl up
bindsym $mod+Up exec /usr/bin/pulseaudio-ctl up
bindsym XF86AudioLowerVolume exec /usr/bin/pulseaudio-ctl down
bindsym XF86AudioMute exec pulseaudio-ctl mute


# Sreen brightness controls
bindsym XF86MonBrightnessUp exec sudo tee /sys/class/backlight/intel_backlight/brightness <<< `expr $(cat /sys/class/backlight/intel_backlight/brightness) + 100`
bindsym XF86MonBrightnessDown exec sudo tee /sys/class/backlight/intel_backlight/brightness <<< `expr $(cat /sys/class/backlight/intel_backlight/brightness) - 100`

#bindsym XF86TouchpadToggle exec xterm # toggle touchpad


exec_always sudo tee /sys/class/backlight/intel_backlight/brightness <<< '400'
exec_always xrandr -s 1920x1200
exec exec fcitx
#exec --no-startup-id sh ~/feh.sh ~/gw2/4k 60


gaps inner 6
gaps outer -2

转载于:https://www.cnblogs.com/ScriptXoX/p/9997596.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值