Sneakydog-demo / sneakydog-demo.github.io

Sneakydog-demo
http://myhxh.xyz
0 stars 0 forks source link

debain11 install i3-gaps #8

Open fuzhoudong opened 2 years ago

fuzhoudong commented 2 years ago

First install the dependencies

apt install meson dh-autoreconf libxcb-keysyms1-dev libpango1.0-dev libxcb-util0-dev xcb libxcb1-dev libxcb-icccm4-dev libyajl-dev libev-dev libxcb-xkb-dev libxcb-cursor-dev libxkbcommon-dev libxcb-xinerama0-dev libxkbcommon-x11-dev libstartup-notification0-dev libxcb-randr0-dev libxcb-xrm0 libxcb-xrm-dev libxcb-shape0 libxcb-shape0-dev

build install i3-gaps

git clone https://github.com/Airblader/i3 i3-gaps

cd i3-gaps

mkdir -p build && cd build

meson --prefix /usr/local

ninja

sudo ninja install

i3-gaps config

# gaps
# disable window titlebars
for_window [class="^.*"] border pixel 0

gaps inner 6
gaps outer 2

bindsym $mod+Shift+g gaps inner all set 6; gaps outer all set 2
bindsym $mod+Shift+n gaps inner all set 0; gaps outer all set 0

# Only enable gaps on a workspace when there is at least one container
smart_gaps on

# Activate smart borders (always)
#smart_borders on

# Activate smart borders (only when there are effectively no gaps)
#smart_borders no_gaps

# Hide edge borders only if there is one window with no gaps
hide_edge_borders smart_no_gaps

# What follows here is optional and defines a mode that allows you to resize the gaps on the fly.
# Press $mod1+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 $mod1+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"
}