Skip to content

Instantly share code, notes, and snippets.

@syuntoku14
Last active May 18, 2022 12:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save syuntoku14/a44bcd403368488e30a65d31349e90dc to your computer and use it in GitHub Desktop.
Save syuntoku14/a44bcd403368488e30a65d31349e90dc to your computer and use it in GitHub Desktop.
i3 config
export DefaultImModule=fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
# set modifier
set $super Mod4
set $alt Mod1
# set font
font pango: Noto Sans 12
# Use Mouse+$super to drag floating windows to their wanted position
floating_modifier $super
#autostart
exec_always xrandr --output eDP-1 --mode 2048x1152
exec --no-startup-id feh --bg-scale ~/.wallpaper.png
exec --no-startup-id xsettingsd &
exec --no-startup-id compton -b
# start a terminal
bindsym $super+Return exec i3-sensible-terminal
# start dmenu (a program launcher)
bindsym $super+Shift+d exec i3-dmenu-desktop --dmenu="dmenu -i -fn 'Noto Sans:size=8'"
bindsym $super+d exec rofi -lines 12 -padding 18 -width 60 -location 0 -show drun -sidebar-mode -columns 3 -font 'Noto Sans 12'
# common apps keybinds
#interactive screenshot by pressing printscreen
bindsym Print exec gnome-screenshot -i
#crop-area screenshot
bindsym --release Shift+Print exec gnome-screenshot -a
bindsym $super+l exec i3lock -i ~/.wallpaper.png
bindsym $super+Shift+l exec systemctl suspend
bindsym $super+Shift+w exec firefox
bindsym $super+Shift+f exec thunar;workspace 3;focus
bindsym $super+Shift+g exec geany
#change volume
bindsym XF86AudioRaiseVolume exec amixer -q set Master 5%+
bindsym XF86AudioLowerVolume exec amixer -q set Master 5%-
bindsym XF86AudioMute exec amixer -D pulse set Master 1+ toggle
# music control
bindsym XF86AudioNext exec mpc next
bindsym XF86AudioPrev exec mpc prev
bindsym XF86AudioPlay exec mpc toggle
bindsym XF86AudioStop exec mpc stop
# kill focused window
bindsym $super+c kill
bindsym $alt+F4 kill
# change focus
bindsym $super+Left focus left
bindsym $super+Down focus down
bindsym $super+Up focus up
bindsym $super+Right focus right
# move focused window
bindsym $super+Shift+Left move left
bindsym $super+Shift+Down move down
bindsym $super+Shift+Up move up
bindsym $super+Shift+Right move right
# split in horizontal orientation
bindsym $super+h split h
# split in vertical orientation
bindsym $super+v split v
# enter fullscreen mode for the focused container
bindsym $super+f fullscreen toggle
# change container layout stacking
bindsym $super+s layout stacking
# toggle tiling / floating
bindsym $super+space floating toggle
# change focus between tiling / floating windows
bindsym $super+Shift+space focus mode_toggle
# switch to workspace
bindsym $alt+Control+Right workspace next
bindsym $alt+Control+Left workspace prev
bindsym $alt+1 workspace 1
bindsym $alt+2 workspace 2
bindsym $alt+3 workspace 3
bindsym $alt+4 workspace 4
bindsym $alt+5 workspace 5
bindsym $alt+6 workspace 6
# move focused container to workspace
bindsym $super+Shift+1 move container to workspace 1
bindsym $super+Shift+2 move container to workspace 2
bindsym $super+Shift+3 move container to workspace 3
bindsym $super+Shift+4 move container to workspace 4
bindsym $super+Shift+5 move container to workspace 5
bindsym $super+Shift+6 move container to workspace 6
# Moving workspaces between screens
bindsym $super+Shift+Control+Right move workspace to output right
bindsym $super+Shift+Control+Left move workspace to output left
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $super+Shift+r restart
# exit i3
bindsym $super+q exec "i3-nagbar -t warning -m 'Really, exit?' -b 'Yes' 'i3-msg exit'"
# resize window (you can also use the mouse for that)
mode "resize" {
bindsym Left resize shrink width 5 px or 5 ppt
bindsym Down resize grow height 5 px or 5 ppt
bindsym Up resize shrink height 5 px or 5 ppt
bindsym Right resize grow width 5 px or 5 ppt
bindsym Return mode "default"
}
bindsym $super+r mode "resize"
# panel
bar {
colors {
background #2f343f
statusline #2f343f
separator #4b5262
# colour of border, background, and text
focused_workspace #2f343f #bf616a #d8dee8
active_workspace #2f343f #2f343f #d8dee8
inactive_workspace #2f343f #2f343f #d8dee8
urgent_workspacei #2f343f #ebcb8b #2f343f
}
status_command i3status
}
# window rules, you can find the window class using xprop
for_window [class=".*"] border pixel 4
assign [class=X-terminal-emulator] 1
assign [class=Google-chrome] 2
assign [class=Slack] 3
assign [class=Code] 4
assign [class=Thunar|File-roller] 5
assign [class=rviz|rqt_graph|Terminator] 6
for_window [class=Viewnior|feh|Audacious|File-roller|Lxappearance|Lxtask|Pavucontrol] floating enable
for_window [class=X-terminal-emulator|Google-chrome|Code|Slack|Thunar] focus
# colour of border, background, text, indicator, and child_border
client.focused #bf616a #2f343f #d8dee8 #bf616a #d8dee8
client.focused_inactive #2f343f #2f343f #d8dee8 #2f343f #2f343f
client.unfocused #2f343f #2f343f #d8dee8 #2f343f #2f343f
client.urgent #2f343f #2f343f #d8dee8 #2f343f #2f343f
client.placeholder #2f343f #2f343f #d8dee8 #2f343f #2f343f
client.background #2f343f
exec --no-startup-id fcitx
exec --no-startup-id nm-applet
exec --no-startup-id setxkbmap -option caps:escape
exec --no-startup-id xset s off
sudo apt-get install feh i3 fcitx-mozc
sudo apt-get install i3-wm dunst i3lock i3status suckless-tools
sudo apt-get install compton hsetroot rxvt-unicode xsel rofi fonts-noto fonts-mplus xsettingsd lxappearance scrot viewnior thunar
git clone https://github.com/addy-dclxvi/i3-starterpack.git
cd i3-starterpack/
cp -r .Xresources .wallpaper.png .xsettingsd .fonts/ .urxvt/ ~/
cd .config
ls
cp -r ./* ~/.config
cd ~/.config/i3
wget https://gist.githubusercontent.com/syuntoku14/a44bcd403368488e30a65d31349e90dc/raw/10e4886d60c1ebb4fab0d3418aedae7ee0bf1c6f/config
cd ~/.config/i3status
wget https://gist.githubusercontent.com/syuntoku14/a44bcd403368488e30a65d31349e90dc/raw/10e4886d60c1ebb4fab0d3418aedae7ee0bf1c6f/status_config
cd ~
wget https://gist.githubusercontent.com/syuntoku14/a44bcd403368488e30a65d31349e90dc/raw/10e4886d60c1ebb4fab0d3418aedae7ee0bf1c6f/.profile
general {
output_format = "i3bar"
colors = false
markup = pango
interval = 5
color_good = '#2f343f'
color_degraded = '#ebcb8b'
color_bad = '#ba5e57'
}
order += "load"
order += "cpu_temperature 0"
order += "disk /"
order += "disk /home"
# order += "ethernet enp1s0"
order += "wireless wlp2s0"
order += "volume master"
order += "battery 1"
order += "tztime local"
load {
format = "<span background='#f59335'> %5min Load </span>"
}
cpu_temperature 0 {
format = "<span background='#bf616a'>  %degrees °C </span>"
path = "/sys/class/thermal/thermal_zone0/temp"
}
disk "/" {
format = "<span background='#fec7cd'>  %free Free </span>"
}
disk "/home" {
format = "<span background='#a1d569'>  %free Free </span>"
}
ethernet enp1s0 {
format_up = "<span background='#88c0d0'>  %ip </span>"
format_down = "<span background='#88c0d0'>  Disconnected </span>"
}
wireless wlp2s0 {
format_up = "<span background='#b48ead'>  %essid </span>"
format_down = "<span background='#b48ead'>  Disconnected </span>"
}
volume master {
format = "<span background='#ebcb8b'>  %volume </span>"
format_muted = "<span background='#ebcb8b'>  Muted </span>"
device = "default"
mixer = "Master"
mixer_idx = 0
}
battery 1 {
last_full_capacity = true
format = "<span background='#a3be8c'>  %status %percentage </span>"
format_down = "No Battery"
status_chr = "Charging"
status_bat = "Battery"
status_unk = "Unknown"
status_full = "Charged"
path = "/sys/class/power_supply/BAT0/uevent"
low_threshold = 10
}
tztime local {
format = "<span background='#81a1c1'> %time </span>"
format_time = " %a %-d %b %H:%M"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment