-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
335 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,302 @@ | ||
############################# 工作区 ############################### | ||
# => 设定mod键与工作区名 | ||
set $mod Mod4 | ||
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 $WS0 0: | ||
|
||
exec_always xrandr --output Virtual-1 --mode 3840x2160 | ||
|
||
# => 工作区切换 | ||
# 自动切换到新打开的窗口 | ||
focus_on_window_activation smart | ||
# 重复切换到当前工作区时会返回上一个所在工作区 | ||
workspace_auto_back_and_forth yes | ||
|
||
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, exec --no-startup-id ~/program/scripts/st zeal | ||
bindsym $mod+6 workspace $WS6 | ||
bindsym $mod+7 workspace $WS7, exec --no-startup-id ~/program/scripts/st virtualbox | ||
bindsym $mod+8 workspace $WS8 | ||
bindsym $mod+9 workspace $WS9, exec --no-startup-id ~/program/scripts/st xfce4-taskmanager | ||
bindsym $mod+0 workspace $WS0 | ||
|
||
# => 移动窗口到另一个工作区 | ||
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 $WS0, workspace $WS0 | ||
|
||
assign [class="(?i)firefox"] → $WS2 | ||
assign [class="(?i)chrome"] → $WS2 | ||
assign [class="(?i)idea"] → $WS3 | ||
assign [class="(?i)code"] → $WS4 | ||
assign [class="(?i)gvim"] → $WS4 | ||
assign [class="(?i)qtcreator"] → $WS3 | ||
assign [class="(?i)spotify"] → $WS6 | ||
assign [class="(?i)virtualbox"] → $WS7 | ||
assign [class="(?i)zeal"] → $WS5 | ||
assign [class="(?i)xfce4-taskmanager"] → $WS9 | ||
assign [class="(?i)electronic-wechat"] → $WS0 | ||
assign [class="(?i)wezterm"] → $WS1 | ||
|
||
|
||
|
||
|
||
|
||
#set $monitor_left DP-1-1-8 | ||
#set $monitor_right eDP-1-1 | ||
|
||
|
||
# switch to output | ||
# bindsym $mod+shift+w focus output $monitor_left | ||
# bindsym $mod+shift+c focus output $monitor_right | ||
|
||
bindsym mod1+Left move workspace to output $monitor_left | ||
bindsym mod1+Right move workspace to output $monitor_right | ||
|
||
|
||
# workspace $WS1 output $monitor_left | ||
# workspace $WS2 output $monitor_right | ||
# workspace $WS3 output $monitor_right | ||
# workspace $WS4 output $monitor_left | ||
# workspace $WS5 output $monitor_left | ||
# workspace $WS6 output $monitor_right | ||
# workspace $WS7 output $monitor_right | ||
# workspace $WS8 output $monitor_left | ||
# workspace $WS9 output $monitor_left | ||
# workspace $WS0 output $monitor_left | ||
|
||
|
||
|
||
############################# 窗口管理 ############################### | ||
|
||
# => 自定义窗口(支持定义边框类型,窗口布局,大小调整,自动归类工作区等等,多个定义用,隔开) | ||
for_window [class="(?i)thunar"] layout tabbed | ||
for_window [class="(?i)idea"] layout tabbed | ||
for_window [class="(?i)google-chrome"] layout tabbed | ||
|
||
#弹出的窗口统一设置成浮动类型 | ||
for_window [window_role="pop-up"] floating enable | ||
for_window [window_role="task_dialog"] floating enable | ||
|
||
# => 窗口边框类型(边框类型有normal正常/none无边框/pixel 1 自定义宽度) | ||
# 默认普通窗口的边框类型 | ||
new_window none | ||
# 默认浮动窗口的边框类型 | ||
new_float normal | ||
# 取消工作区边缘的边框 | ||
hide_edge_borders both | ||
# 在三种边框类型中切换 | ||
bindsym $mod+b border toggle | ||
|
||
# => 新建窗口的分割方向 | ||
bindsym $mod+Shift+h split h | ||
bindsym $mod+Shift+v split v | ||
|
||
# => 移动窗口 | ||
bindsym $mod+Left move left | ||
bindsym $mod+Down move down | ||
bindsym $mod+Up move up | ||
bindsym $mod+Right move right | ||
|
||
# => 调整窗口大小 | ||
bindsym $mod+Shift+Left resize shrink width 10 px or 1 ppt | ||
bindsym $mod+Shift+Down resize grow height 10 px or 1 ppt | ||
bindsym $mod+Shift+Up resize shrink height 10 px or 1 ppt | ||
bindsym $mod+Shift+Right resize grow width 10 px or 1 ppt | ||
|
||
# => 关闭窗口 | ||
bindsym $mod+Shift+k kill | ||
|
||
# => 焦点切换 | ||
# 焦点跟随鼠标移动 | ||
# focus_follows_mouse yes | ||
no_focus [window_role="pop-up"] | ||
# 焦点切换到父窗口 | ||
bindsym $mod+p focus parent | ||
# 焦点切换回子窗口 | ||
bindsym $mod+Shift+p focus child | ||
# 焦点切换到浮动窗口 | ||
bindsym $mod+Shift+space focus mode_toggle | ||
|
||
# 窗口聚焦 | ||
bindsym $mod+h focus left | ||
bindsym $mod+j focus down | ||
bindsym $mod+k focus up | ||
bindsym $mod+l focus right | ||
#聚焦到urgent窗口 | ||
bindsym $mod+u [urgent=latest] | ||
|
||
|
||
#窗口拖拽 alt+鼠标 | ||
floating_modifier Mod1 | ||
|
||
# 切换到堆叠布局 | ||
# bindsym $mod+z layout stacking | ||
# 切换到标签布局 | ||
# bindsym $mod+x layout tabbed | ||
# 切换到平铺布局(竖直/水平) | ||
# bindsym $mod+c layout toggle split | ||
|
||
# 在所有布局中轮回切换 | ||
bindsym $mod+x layout toggle all | ||
# 窗口切换到全屏 | ||
bindsym $mod+f fullscreen toggle | ||
# 窗口切换到浮动 | ||
bindsym $mod+space floating toggle | ||
# 窗口切换为粘滞 | ||
bindsym $mod+g sticky toggle | ||
|
||
# => 暂存窗口(额外的可隐藏浮动窗口,取消浮动还原成普通窗口) | ||
# 转换普通窗口为暂存窗口 | ||
bindsym $mod+Shift+minus move scratchpad | ||
# 呼出/隐藏暂存窗口 | ||
bindsym $mod+minus scratchpad show | ||
|
||
|
||
|
||
|
||
############################# 快捷键 ############################### | ||
|
||
# => 重新载入(更改配置文件后只须重载即可生效,不包含自启部分) | ||
bindsym $mod+Shift+r restart | ||
|
||
# bindsym $mod+Tab exec rofi -show window -lines 3 -font "Roboto 14" -hide-scrollbar -opacity "50" -separator-style "none" -line-margin 7 -padding 340 -width 100 | ||
bindsym $mod+Tab workspace next | ||
bindsym $mod+Shift+Tab workspace prev | ||
|
||
# bindsym $mod+F12 workspace back_and_forth | ||
|
||
#程序启动 | ||
bindsym $mod+Return exec --no-startup-id xfce4-terminal | ||
bindsym $mod+e exec --no-startup-id ranger | ||
bindsym $mod+c exec --no-startup-id google-chrome | ||
bindsym $mod+z exec --no-startup-id zeal | ||
bindsym $mod+Delete exec --no-startup-id gnome-system-monitor | ||
bindsym $mod+d exec rofi -show run | ||
|
||
|
||
#锁屏 | ||
bindsym mod1+l exec i3lock-next | ||
|
||
############################# 主题相关 ############################### | ||
|
||
# 字体 | ||
font pango:Noto Sans 12 | ||
#font pango:hack 11 | ||
# 窗口颜色 边框 背景 文字 提示 | ||
client.focused #333333 #333333 #FFFFFF #333333 | ||
client.focused_inactive #999999 #999999 #FFFFFF #3399FF | ||
client.unfocused #999999 #999999 #FFFFFF #3399FF | ||
client.urgent #990000 #990000 #FFFFFF #990000 | ||
client.placeholder #000000 #000000 #FFFFFF #000000 | ||
client.background #FFFFFF | ||
|
||
# i3bar | ||
# bindsym $mod+m bar mode toggle | ||
|
||
bar { | ||
font pango:Noto Sans CJK SC 12 | ||
i3bar_command i3bar -t | ||
height 26 | ||
#禁止systemtray | ||
tray_output none | ||
# i3bar调用 | ||
status_command ~/.config/i3/jconky | ||
# 显示位置top/bottom | ||
position top | ||
# 是否隐藏 | ||
#mode hide | ||
# 拆解工作区名(隐藏前面的1:2:3:……) | ||
strip_workspace_numbers no | ||
# 定义分隔符∥ | ||
separator_symbol " > " | ||
|
||
colors { | ||
background #10101000 | ||
statusline #FFFFFF | ||
separator #3399FF | ||
# 工作区颜色 边框 背景 文字 | ||
focused_workspace #3297FD #11111100 #FFFFFF | ||
active_workspace #FFFFFF #FFFFFF00 #FFFFFF | ||
inactive_workspace #111111 #11111100 #FFFFFF | ||
urgent_workspace #990000 #11111100 #FFFFFF | ||
binding_mode #990000 #99000000 #FFFFFF | ||
} | ||
} | ||
|
||
############################# 开机启动 ############################### | ||
exec --no-startup-id feh --bg-fill /home/hank.zhao/wallpaper/fav.jpg | ||
#exec --no-startup-id nitrogen --restore | ||
exec --no-startup-id compton -CGb | ||
#exec --no-startup-id xfce4-panel | ||
# exec --no-startup-id tint2 | ||
#exec --no-startup-id ss-qt5 | ||
#exec --no-startup-id albert | ||
#exec --no-startup-id volumeicon | ||
#exec --no-startup-id nm-applet | ||
#exec --no-startup-id xfce4-power-manager | ||
#exec --no-startup-id shutter --min_at_startup | ||
#exec --no-startup-id ~/program/XX-Net-2.7.3/start.sh | ||
exec --no-startup-id xset r rate 300 45 | ||
exec --no-startup-id xset dpms 600 | ||
|
||
|
||
############################ i3-gaps ################################# | ||
gaps inner 15 | ||
gaps outer 3 | ||
smart_gaps on | ||
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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
out_to_x no | ||
out_to_console yes | ||
background no | ||
double_buffer no | ||
update_interval 1 | ||
total_run_times 0 | ||
override_utf8_locale no | ||
short_units yes | ||
if_up_strictness address | ||
cpu_avg_samples 2 | ||
|
||
TEXT | ||
[ | ||
#{ "full_text" : "\uf17c", "color": "\#BADA55"}, | ||
#{ "full_text" : "\uf2be ${exec uname -n}", "color": "\#BADA55"}, | ||
#{ "full_text": " ${exec curl -s www.icanhazip.com}"}, | ||
{ "full_text" : ${if_up enp0s25}" ${upspeed enp0s25}/s _ ${downspeed enp0s25}/s"${else}""${endif}, "color" : "\#94F397" }, | ||
{ "full_text" : ${if_up wlp3s0}"\uf1eb ${wireless_link_qual_max wlp3s0}%[${wireless_essid wlp3s0}][${addr wlp3s0}]\uf0aa ${upspeed wlp3s0}/s \uf0ab ${downspeed wlp3s0}/s"${else}""${endif}, "color" : "\#94F397" }, | ||
{ "full_text" : "\uf17b ${cpu cpu0}%" , "color" : "\#8BC3E7" }, | ||
{ "full_text" : "\uf145 ${mem}" , "color" : "\#B987D9" }, | ||
# { "full_text" : "\uf0a0 ${fs_used_perc /}%" , "color" : "\#FF9D17" }, | ||
|
||
{ "full_text" : " ${time %Y/%m/%d %a}" , "color" : "\#ff797b" }, | ||
{ "full_text" : "\uf017 ${time %H:%M:%S}" , "color" : "\#8BADF9" }, | ||
{"full_text":"${if_match "${exec ps -ef | grep sslocal | wc -l}"=="3"}\uf1d8","color":"\#0048ff"},\ | ||
{"full_text":"${else}"}, | ||
{"full_text":"${if_match "${exec ps -ef | grep sslocal | wc -l}"=="2"}\uf1d9","color":"\#0048ff"}, | ||
{"full_text":"${endif}"}, | ||
|
||
{"full_text":"${if_match ${exec checkupdates | wc -l}>0} ${exec checkupdates | wc -l}","color":"\#66ff66","separator":false,"separator_block_width":6},\ | ||
{"full_text":"${endif}"} | ||
], | ||
|