Skip to content

Instantly share code, notes, and snippets.

@kynrai
Last active September 25, 2021 12:59
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kynrai/08a2bdf9d1e0fb26bdc41302181d09b8 to your computer and use it in GitHub Desktop.
Save kynrai/08a2bdf9d1e0fb26bdc41302181d09b8 to your computer and use it in GitHub Desktop.
Custom Arch i3-gaps setup on RBS 2019

Arch (i3-gaps) on Rzer Blade 13 2019 MX 150

Prerequisites

  • Disbale secure boot (F12/Del on boot, BIOS)
  • Create UEFI boot disk

Boot from USB

  1. Set UK layout loadkeys uk
  2. Find wifi interface name iw dev
  3. Set wifi card up ip link set wlo1 up where wlo1 is the interface name
  4. Connect to wifi network wifi-menu wlo1
  5. Test connection ping google.com
  6. Follow Arch wiki

Setup keyboard mapping

localectl set-x11-keymap gb
localectl set-keymap uk

Install yay (for AUR)

sudo pacman -S git go
git clone  https://aur.archlinux.org/yay.git
cd yay
makepkg -si

Setting up i3-gaps

  • Install everything we need
sudo pacman -S i3-gaps i3blocks i3status i3lock dmenu acpi bc alsa-utils lm-sensors feh compton xorg-xbacklight gvim libmpdclient python-pywal ttf-fira-code kitty zsh ttf-dejavu playerctl arandr ttf-font-awesome xorg-server-xwayland sway rofi

yay -S polybar aic94xx-firmware wd719x-firmware libinput-gestures

We are going to be copy pasting a lot so setup gvim for clipboard support and set clipboard=unnamed

Setup terminal to be more tolorable .config/kitty/kitty.conf

font_family        Fira Code
scrollback_lines   50000
  • Fix X server load time

Put in /etc/X11/xorg.conf.d/20-intel.conf

Section "Device"
    Identifier "Intel Graphics"
    Driver "intel"
    Option "AccelMethod" "glamor"
EndSection
  • Setup better touchpad support
sudo touch /etc/X11/xorg.conf.d/30-touchpad.conf

Section "InputClass"
    Identifier "touchpad"
    MatchIsTouchpad "on"
    Driver "libinput"
    Option "Tapping" "on"
    Option "NaturalScrolling" "on"
    Option "TappingButtonMap" "lrm"
    Option "ScrollMethod" "twofinger"
    Option "AccelSpeed" "0.6"
EndSection
  • Set a background picture

Add to end of ~/.config/i3/config

exec --no-startup-id feh --bg-scale '/home/<user>/Pictures/<image path>
  • Use compton to try fix some screen tearing issues and set fancy window opacity
mkdir ~/.config/compton
cp /etc/xdg/compton.conf ~/.config/compton

# Change opacity settings in  compton.conf
inactive-opacity = 0.7
active-opacity = 0.9

opacity-rule [
    "85:name *= 'Firefox'"
];

# Add to end of ~/.config/i3/config
exec --no-startup-id compton --config '~/.config/compton/compton.conf'
  • Volume and brightness controls
# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl -- set-sink-volume 0 +5% #increase sound volume
bindsym XF86AudioLowerVolume exec --no-startup-id pactl -- set-sink-volume 0 -5% #decrease sound volume
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound

# Sreen brightness controls
bindsym XF86MonBrightnessUp exec xbacklight -inc 10 # increase screen brightness
bindsym XF86MonBrightnessDown exec xbacklight -dec 10 # decrease screen brightness

# Media player controls
bindsym XF86AudioPlay exec playerctl play
bindsym XF86AudioPause exec playerctl pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
  • Setup polybar
mkdir -p ~/.config/polybar
cp /usr/share/doc/polybar/config ~/.config/polybar

rename [bar/example] to [bar/razer]

Make a executable launch script in ~/.config/polybar/launch.sh

#!/bin/bash

# Terminate already running bar instances
killall -q polybar

# Wait until the processes have been shut down
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done

# Launch Polybar, using default config location ~/.config/polybar/config
polybar razer &

echo "Polybar launched..."

Add launch to ~/.config/i3/config

exec_always --no-startup-id ~/.config/polybar/launch.sh

Comment out bar {i3status...} from ~/.config/i3/config

  • Start to make i3-gaps look pretty

Add to ~/.config/i3/config

# Disable title borders
for_window [class=".*"] border pixel 0

gaps inner 10

smart_gaps pm
smart_borders on
hide_edge_borders on
  • Set color theme with pywal wal --theme sexy-tlh

Change colours in ~/.config/polybar/config

[colors]
background = ${xrdb:color0:#222}
background-alt = ${xrdb:color0:#222}
foreground = ${xrdb:color7:#222}
foreground-alt = ${xrdb:color7:#222}
primary = ${xrdb:color1:#222}
secondary = ${xrdb:color2:#222}
alert = ${xrdb:color3:#222}

[bar/bar]
; ...
background = ${colors.background}
foreground = ${colors.foreground}

Change colors in ~/.config/i3/config

set_from_resource $fg i3wm.color7 #f0f0f0
set_from_resource $bg i3wm.color2 #f0f0f0

# class                 border  backgr. text indicator child_border
client.focused          $bg     $bg     $fg  $bg       $bg
client.focused_inactive $bg     $bg     $fg  $bg       $bg
client.unfocused        $bg     $bg     $fg  $bg       $bg
client.urgent           $bg     $bg     $fg  $bg       $bg
client.placeholder      $bg     $bg     $fg  $bg       $bg

client.background       $bg

exec_always --no-startup-id wal -R
  • Custom dmenu
# Either one of
bindsym $mod+d --no-startup-id exec dmenu_run
pindsym $mod+d --no-startup-id exec i3-dmenu-desktop # Only show apps with .desktop files
  • Lock screen

Add to ~/.config/i3/config

bindsym $mod+Shift+g exec i3lock -c 000000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment