Você está na página 1de 66

O guia definitivo para a personalização i3 no Linux https://itsfoss.

com/i3-customization/

Membership

1 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

r/unixporn

2 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

3 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

sudo apt install xorg lightdm lightdm-gtk-greeter i3-wm i3lock i3status i3blocks dm

sudo pacman -S xorg lightdm lightdm-gtk-greeter i3-wm i3lock i3status i3blocks dmen

sudo systemctl enable lightdm.service

sudo systemctl start lightdm.service

4 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

Enter

5 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

Win Alt
mod

Win

6 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

Mod + Enter

Mod + ←

Mod + →

Mod + ↑

Mod + ↓

7 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

Mod + Shift + ←

Mod + Shift + →

Mod + Shift + ↑

Mod + Shift + ↓

Mod + f

Mod + v

Mod + h

Mod + s

Mod + w

Mod + Shift + Space

Mod + Left-mouse-click

Mod + 0-9

Mod + Shift + 0-9

Mod + d

Mod + Shift + q

Mod + Shift + c

Mod + Shift + r

Mod + Shift + e

8 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

sudo pacman -S git

9 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

git clone https://aur.archlinux.org/yay-git.git && cd yay

makepkg -si

1024x768

xrandr --output [Display_name] --mode [resolution]

xrandr | grep -w 'connected'

Virtual-1

10 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

Virtual-1

1920*1080

xrandr --output Virtual-1 --mode 1920x1080

nano ~/.config/i3/config

Alt + /

# Display Resolution
exec_always xrandr --output [Display_name] --mode [Resolution]

Mod + Shift + r

11 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

feh

sudo pacman -S feh

sudo apt install feh

nano ~/.config/i3/config

# Display Wallpaper
exec_always feh --bg-fill /path/to/wallpaper

Downloads

12 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

Downloads

Mod + Shift + r

13 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

i3lock

i3lock-color

i3lock
i3lock-color

14 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

sudo pacman -R i3lock

sudo apt remove i3lock

i3lock-color

yay i3lock-color

mkdir ~/.config/scripts && nano ~/.config/scripts/lock

#!/bin/sh

BLANK='#00000000'
CLEAR='#ffffff22'
DEFAULT='#00897bE6'
TEXT='#00897bE6'
WRONG='#880000bb'
VERIFYING='#00564dE6'

i3lock \
--insidever-color=$CLEAR \
--ringver-color=$VERIFYING \
\

15 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

\
--insidewrong-color=$CLEAR \
--ringwrong-color=$WRONG \
\
--inside-color=$BLANK \
--ring-color=$DEFAULT \
--line-color=$BLANK \
--separator-color=$DEFAULT \
\
--verif-color=$TEXT \
--wrong-color=$TEXT \
--time-color=$TEXT \
--date-color=$TEXT \
--layout-color=$TEXT \
--keyhl-color=$WRONG \
--bshl-color=$WRONG \
\
--screen 1 \
--blur 9 \
--clock \
--indicator \
--time-str="%H:%M:%S" \
--date-str="%A, %Y-%m-%d" \
--keylayout 1 \

sudo chmod +x .config/scripts/lock

16 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

nano ~/.config/i3/config

Alt + /

# Shortcut for Lockscreen


bindsym $mod+x exec /home/$USER/.config/scripts/lock

mod + x

17 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

materia-gtk-theme papirus

sudo pacman -S materia-gtk-theme papirus-icon-theme

sudo apt install materia-gtk-theme papirus-icon-theme

18 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

sudo pacman -S lxappearance

sudo apt install lxappearance

Mod + d

Materia-dark

19 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

Icon Theme

20 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

Awesome

sudo pacman -S ttf-font-awesome

sudo apt install fonts-font-awesome

nano ~/.config/i3/config

21 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1: Terminal"
set $ws2 "2: Firefox"
set $ws3 "3: VMWare"
set $ws4 "4: Spotify"
set $ws5 "5: Shutter"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"

22 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

set $ws8 "8"


set $ws9 "9"
set $ws10 "10"

# Define names for default workspaces for which we configure key bindings later>
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1: Terminal"
set $ws2 "2: Firefox"
set $ws3 "3: VMWare"
set $ws4 "4: Spotify"
set $ws5 "5: Shutter"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"

Mod + e

23 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

sudo pacman -S ttf-ubuntu-font-family

nano ~/.config/i3/config

font pango:monospace 8

font pango:Ubuntu Regular 14

Mod + Shift + r

24 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

25 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

xprop

WM_CLASS(STRING) = "Navigator", "firefox"

firefox

26 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

nano ~/.config/i3/config

Alt + /

# Allocate applications to workspaces


for_window [class="class_name"] move to workspace $[workspace_variable]

sudo pacman -S picom

27 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

sudo pacman -S picom

sudo apt install picom

nano ~/.config/i3/config

# Transparency with picom compositor


exec_always picom -f

-f

Mod + Shift + r

Transparent background

28 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

/etc/i3status.conf

.config

mkdir .config/i3status

29 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

sudo cp /etc/i3status.conf ~/.config/i3status/i3status.conf

sudo chown $USER:$USER ~/.config/i3status/i3status.conf

nano ~/.config/i3/config

status_command i3status

bar {
status_command i3status -c /home/$USER/.config/i3status/i3status.conf
}

30 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

nano .config/i3status/i3status.conf

ipv6

wireless _first_

battery all load

#order += "ipv6"
#order += "wireless _first_"
order += "ethernet _first_"
#order += "battery all"
order += "disk /"
#order += "load"
order += "memory"
order += "tztime local"

31 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

nano ~/.config/i3/config

Alt + /

32 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

# Color shemes for windows


set $bgcolor #523d64
set $in-bgcolor #363636
set $text #ffffff
set $u-bgcolor #ff0000
set $indicator #a8a3c1
set $in-text #969696
# border background text indicator (
client.focused $bgcolor $bgcolor $text $indicator
client.unfocused $in-bgcolor $in-bgcolor $in-text $in-bgcolor
client.focused_inactive $in-bgcolor $in-bgcolor $in-text $in-bgcolor
client.urgent $u-bgcolor $u-bgcolor $text $u-bgcolor

• bgcolor

• in-bgcolor

• text

• u-bgcolor

• indicator

• in-text

• client.focused

• client.unfocused

• client.focused_inactive

• client.urgent

33 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

Mod + Shift +
r

bar {...}

nano ~/.config/i3/config

34 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

bar {...}

bar {
status_command i3status -c /home/$USER/.config/i3status/i3status.conf
colors {
background $bgcolor
separator #191919
# border background text
focused_workspace $bgcolor $bgcolor $text
inactive_workspace $in-bgcolor $in-bgcolor $text
urgent_workspace $u-bgcolor $u-bgcolor $text

}
}

focused_workspace

inactive_workspace
urgent_workspace

35 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

sudo pacman -S ttf-droid

sudo apt install fonts-droid-fallback

nano ~/.config/i3/config

bar {...}

font pango: Droid Sans Mono 11

36 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

nano ~/.config/i3/config

set $bgcolor #523d6499


set $in-bgcolor #3636364D

99 60%
4D 30%

set $focused-ws #523d6480


set $bar-color #523d640D

bar {...}

i3bar_command i3bar --transparency


tray_output none

tray_output none

37 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

38 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

/etc/i3blocks.conf

39 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

mkdir ~/.config/i3blocks

sudo cp /etc/i3blocks.conf ~/.config/i3blocks/

sudo chown $USER:$USER ~/.config/i3blocks/i3blocks.conf

nano ~/.config/i3/config

bar {...}
i3blocks

Mod + Shift + r

40 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

nano ~/.config/scripts/disk

#!/usr/bin/env sh
DIR="${DIR:-$BLOCK_INSTANCE}"
DIR="${DIR:-$HOME}"
ALERT_LOW="${ALERT_LOW:-$1}"
ALERT_LOW="${ALERT_LOW:-10}" # color will turn red under this value (default: 10%)

LOCAL_FLAG="-l"
if [ "$1" = "-n" ] || [ "$2" = "-n" ]; then
LOCAL_FLAG=""
fi

df -h -P $LOCAL_FLAG "$DIR" | awk -v label="$LABEL" -v alert_low=$ALERT_LOW '


/\/.*/ {
# full text
print label $4
# short text
print label $4
use=$5
# no need to continue parsing
exit 0
}
END {
gsub(/%$/,"",use)
if (100 - use < alert_low) {
# color

41 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

print "#FF0000"
}
}
'

sudo chmod +x ~/.config/scripts/disk

nano ~/.config/i3blocks/i3blocks.conf

[disk]
command=/home/$USER/.config/scripts/disk
LABEL=
#DIR=$HOME
#ALERT_LOW=10
interval=30

Mod + Shift + r

42 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

nano ~/.config/scripts/memory

#!/usr/bin/env sh
TYPE="${BLOCK_INSTANCE:-mem}"
PERCENT="${PERCENT:-true}"

awk -v type=$TYPE -v percent=$PERCENT '


/^MemTotal:/ {
mem_total=$2
}
/^MemFree:/ {

43 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

/^MemFree:/ {
mem_free=$2
}
/^Buffers:/ {
mem_free+=$2
}
/^Cached:/ {
mem_free+=$2
}
/^SwapTotal:/ {
swap_total=$2
}
/^SwapFree:/ {
swap_free=$2
}
END {
if (type == "swap") {
free=swap_free/1024/1024
used=(swap_total-swap_free)/1024/1024
total=swap_total/1024/1024
} else {
free=mem_free/1024/1024
used=(mem_total-mem_free)/1024/1024
total=mem_total/1024/1024
}
pct=0
if (total > 0) {
pct=used/total*100
}
# full text
if (percent == "true" ) {
printf("%.1fG/%.1fG (%.f%%)\n", used, total, pct)
} else {
printf("%.1fG/%.1fG\n", used, total)
}
# short text
printf("%.f%%\n", pct)
# color
if (pct > 90) {
print("#FF0000")
} else if (pct > 80) {

44 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

} else if (pct > 80) {


print("#FFAE00")
} else if (pct > 70) {
print("#FFF600")
}
}
' /proc/meminfo

sudo chmod +x ~/.config/scripts/memory

nano ~/.config/i3blocks/i3blocks.conf

[memory]
command=/home/$USER/.config/scripts/memory
label=
interval=30

45 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

sudo pacman -S pacman-contrib

nano ~/.config/scripts/arch-update

#!/usr/bin/env python3
import subprocess
from subprocess import check_output
import argparse
import os
import re

def create_argparse():
def _default(name, default='', arg_type=str):
val = default
if name in os.environ:
val = os.environ[name]
return arg_type(val)

strbool = lambda s: s.lower() in ['t', 'true', '1']


strlist = lambda s: s.split()

parser = argparse.ArgumentParser(description='Check for pacman updates')


parser.add_argument(
'-b',
'--base_color',
default = _default('BASE_COLOR', 'green'),
help='base color of the output(default=green)'
)

46 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

)
parser.add_argument(
'-u',
'--updates_available_color',
default = _default('UPDATE_COLOR', 'yellow'),
help='color of the output, when updates are available(default=yellow)'
)
parser.add_argument(
'-a',
'--aur',
action = 'store_const',
const = True,
default = _default('AUR', 'False', strbool),
help='Include AUR packages. Attn: Yaourt must be installed'
)
parser.add_argument(
'-y',
'--aur_yay',
action = 'store_const',
const = True,
default = _default('AUR_YAY', 'False', strbool),
help='Include AUR packages. Attn: Yay must be installed'
)
parser.add_argument(
'-q',
'--quiet',
action = 'store_const',
const = True,
default = _default('QUIET', 'False', strbool),
help = 'Do not produce output when system is up to date'
)
parser.add_argument(
'-w',
'--watch',
nargs='*',
default = _default('WATCH', arg_type=strlist),
help='Explicitly watch for specified packages. '
'Listed elements are treated as regular expressions for matching.'
)
return parser.parse_args()

47 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

def get_updates():
output = ''
try:
output = check_output(['checkupdates']).decode('utf-8')
except subprocess.CalledProcessError as exc:
# checkupdates exits with 2 and no output if no updates are available.
# we ignore this case and go on
if not (exc.returncode == 2 and not exc.output):
raise exc
if not output:
return []

updates = [line.split(' ')[0]


for line in output.split('\n')
if line]

return updates

def get_aur_yaourt_updates():
output = ''
try:
output = check_output(['yaourt', '-Qua']).decode('utf-8')
except subprocess.CalledProcessError as exc:
# yaourt exits with 1 and no output if no updates are available.
# we ignore this case and go on
if not (exc.returncode == 1 and not exc.output):
raise exc
if not output:
return []

aur_updates = [line.split(' ')[0]


for line in output.split('\n')
if line.startswith('aur/')]

return aur_updates

def get_aur_yay_updates():
output = check_output(['yay', '-Qua']).decode('utf-8')

48 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

if not output:
return []

aur_updates = [line.split(' ')[0] for line in output.split('\n') if line]

return aur_updates

def matching_updates(updates, watch_list):


matches = set()
for u in updates:
for w in watch_list:
if re.match(w, u):
matches.add(u)

return matches

label = os.environ.get("LABEL","")
message = "{0}<span color='{1}'>{2}</span>"
args = create_argparse()

updates = get_updates()
if args.aur:
updates += get_aur_yaourt_updates()
elif args.aur_yay:
updates += get_aur_yay_updates()

update_count = len(updates)
if update_count > 0:
if update_count == 1:
info = str(update_count) + ' update available'
short_info = str(update_count) + ' update'
else:
info = str(update_count) + ' updates available'
short_info = str(update_count) + ' updates'

matches = matching_updates(updates, args.watch)


if matches:
info += ' [{0}]'.format(', '.join(matches))

49 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

short_info += '*'
print(message.format(label, args.updates_available_color, info))
print(message.format(label, args.updates_available_color, short_info))
elif not args.quiet:
print(message.format(label, args.base_color, 'system up to date'))

sudo chmod +x ~/.config/scripts/arch-update

nano ~/.config/i3blocks/i3blocks.conf

[arch-update]
command=/home/$USER/.config/scripts/arch-update
interval=3600
markup=pango
LABEL=

50 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

sudo pacman -S pulseaudio-alsa pulseaudio-bluetooth pulseaudio-equalizer pulseaudio

sudo apt install pulseaudio-module-bluetooth pulseaudio-equalizer pulseaudio-module

nano ~/.config/i3/config

# Key bindings for Media control keys


bindsym XF86AudioPlay exec playerctl play
bindsym XF86AudioPause exec playerctl pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous

51 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

nano ~/.config/scripts/volume

#!/usr/bin/env bash
if [[ -z "$MIXER" ]] ; then
MIXER="default"
if command -v pulseaudio >/dev/null 2>&1 && pulseaudio --check ; then
# pulseaudio is running, but not all installations use "pulse"
if amixer -D pulse info >/dev/null 2>&1 ; then
MIXER="pulse"
fi
fi
[ -n "$(lsmod | grep jack)" ] && MIXER="jackplug"
MIXER="${2:-$MIXER}"
fi
if [[ -z "$SCONTROL" ]] ; then
SCONTROL="${BLOCK_INSTANCE:-$(amixer -D $MIXER scontrols |
sed -n "s/Simple mixer control '\([^']*\)',0/\1/p" |
head -n1
)}"
fi

# The first parameter sets the step to change the volume by (and units to display)
# This may be in in % or dB (eg. 5% or 3dB)
if [[ -z "$STEP" ]] ; then
STEP="${1:-5%}"
fi

NATURAL_MAPPING=${NATURAL_MAPPING:-0}
if [[ "$NATURAL_MAPPING" != "0" ]] ; then
AMIXER_PARAMS="-M"
fi

#------------------------------------------------------------------------

52 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

capability() { # Return "Capture" if the device is a capture device


amixer $AMIXER_PARAMS -D $MIXER get $SCONTROL |
sed -n "s/ Capabilities:.*cvolume.*/Capture/p"
}

volume() {
amixer $AMIXER_PARAMS -D $MIXER get $SCONTROL $(capability)
}

nano ~/.config/i3blocks/i3blocks.conf

[volume]
command=/home/$USER/.config/scripts/volume
LABEL=♪
#LABEL=VOL
interval=1
signal=10
#STEP=5%
MIXER=default
#SCONTROL=[determined automatically]
#NATURAL_MAPPING=0

systemctl --user
disable --now pipewire.{socket,service} && systemctl

53 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

disable --now pipewire.{socket,service} && systemctl


--user mask pipewire.socket

nano ~/.config/scripts/spotify.py

#!/usr/bin/python

import dbus
import os
import sys

try:
bus = dbus.SessionBus()
spotify = bus.get_object("org.mpris.MediaPlayer2.spotify", "/org/mpris/MediaPla

if os.environ.get('BLOCK_BUTTON'):
control_iface = dbus.Interface(spotify, 'org.mpris.MediaPlayer2.Player')
if (os.environ['BLOCK_BUTTON'] == '1'):
control_iface.Previous()
elif (os.environ['BLOCK_BUTTON'] == '2'):
control_iface.PlayPause()
elif (os.environ['BLOCK_BUTTON'] == '3'):
control_iface.Next()

spotify_iface = dbus.Interface(spotify, 'org.freedesktop.DBus.Properties')


props = spotify_iface.Get('org.mpris.MediaPlayer2.Player', 'Metadata')

54 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

props = spotify_iface.Get('org.mpris.MediaPlayer2.Player', 'Metadata')

if (sys.version_info > (3, 0)):


print(str(props['xesam:artist'][0]) + " - " + str(props['xesam:title']))
else:
print(props['xesam:artist'][0] + " - " + props['xesam:title']).encode('utf-
exit
except dbus.exceptions.DBusException:
exit

sudo chmod +x ~/.config/scripts/spotify.py

nano ~/.config/i3blocks/i3blocks.conf

[spotify]
label=
command=/home/$USER/.config/scripts/spotify.py
color=#81b71a
interval=5

55 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

i3gaps
I3gaps

nano ~/.config/i3/config

56 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

# default gaps
gaps inner 15
gaps outer 5

# gaps
set $mode_gaps Gaps: (o)uter, (i)nner, (h)orizontal, (v)ertical, (t)op, (r)ight, (b
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
set $mode_gaps_horiz Horizontal Gaps: +|-|0 (local), Shift + +|-|0 (global)
set $mode_gaps_verti Vertical Gaps: +|-|0 (local), Shift + +|-|0 (global)
set $mode_gaps_top Top Gaps: +|-|0 (local), Shift + +|-|0 (global)
set $mode_gaps_right Right Gaps: +|-|0 (local), Shift + +|-|0 (global)
set $mode_gaps_bottom Bottom Gaps: +|-|0 (local), Shift + +|-|0 (global)
set $mode_gaps_left Left 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 h mode "$mode_gaps_horiz"
bindsym v mode "$mode_gaps_verti"
bindsym t mode "$mode_gaps_top"
bindsym r mode "$mode_gaps_right"
bindsym b mode "$mode_gaps_bottom"
bindsym l mode "$mode_gaps_left"
bindsym Return mode "$mode_gaps"
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 "$mode_gaps"

57 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

bindsym Return mode "$mode_gaps"


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 "$mode_gaps"


bindsym Escape mode "default"
}
mode "$mode_gaps_horiz" {
bindsym plus gaps horizontal current plus 5
bindsym minus gaps horizontal current minus 5
bindsym 0 gaps horizontal current set 0

bindsym Shift+plus gaps horizontal all plus 5


bindsym Shift+minus gaps horizontal all minus 5
bindsym Shift+0 gaps horizontal all set 0

bindsym Return mode "$mode_gaps"


bindsym Escape mode "default"
}
mode "$mode_gaps_verti" {
bindsym plus gaps vertical current plus 5
bindsym minus gaps vertical current minus 5
bindsym 0 gaps vertical current set 0

bindsym Shift+plus gaps vertical all plus 5


bindsym Shift+minus gaps vertical all minus 5
bindsym Shift+0 gaps vertical all set 0

bindsym Return mode "$mode_gaps"


bindsym Escape mode "default"
}
mode "$mode_gaps_top" {
bindsym plus gaps top current plus 5

58 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

bindsym plus gaps top current plus 5


bindsym minus gaps top current minus 5
bindsym 0 gaps top current set 0

bindsym Shift+plus gaps top all plus 5


bindsym Shift+minus gaps top all minus 5
bindsym Shift+0 gaps top all set 0

bindsym Return mode "$mode_gaps"


bindsym Escape mode "default"
}
mode "$mode_gaps_right" {
bindsym plus gaps right current plus 5
bindsym minus gaps right current minus 5
bindsym 0 gaps right current set 0

bindsym Shift+plus gaps right all plus 5


bindsym Shift+minus gaps right all minus 5
bindsym Shift+0 gaps right all set 0

bindsym Return mode "$mode_gaps"


bindsym Escape mode "default"
}
mode "$mode_gaps_bottom" {
bindsym plus gaps bottom current plus 5
bindsym minus gaps bottom current minus 5
bindsym 0 gaps bottom current set 0

bindsym Shift+plus gaps bottom all plus 5


bindsym Shift+minus gaps bottom all minus 5
bindsym Shift+0 gaps bottom all set 0

bindsym Return mode "$mode_gaps"


bindsym Escape mode "default"
}
mode "$mode_gaps_left" {
bindsym plus gaps left current plus 5
bindsym minus gaps left current minus 5
bindsym 0 gaps left current set 0

bindsym Shift+plus gaps left all plus 5

59 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

bindsym Shift+plus gaps left all plus 5


bindsym Shift+minus gaps left all minus 5
bindsym Shift+0 gaps left all set 0

bindsym Return mode "$mode_gaps"


bindsym Escape mode "default"
}

Mod + Shift + r

Mod + Shift + g

+ -

Esc

60 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

61 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

62 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

63 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

64 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

65 of 66 15/05/2023, 07:33
O guia definitivo para a personalização i3 no Linux https://itsfoss.com/i3-customization/

66 of 66 15/05/2023, 07:33

Você também pode gostar