This repository contains my configuration files and some personal notes.
git clone https://github.com/pler/dotfiles-arch-i3.git
cd dotfiles-arch-i3
chmod +x create-symlinks.py
./create-symlinks.py
- install:
reflector
- create new service:
/etc/systemd/system/reflector.service
[Unit]
Description=Pacman mirrorlist update
[Service]
Type=oneshot
ExecStart=/usr/bin/reflector --protocol http --latest 30 --number 20 --sort rate --save /etc/pacman.d/mirrorlist
- add timer for weekly update:
/etc/systemd/system/reflector.timer
[Unit]
Description=Run reflector weekly
[Timer]
OnCalendar=weekly
AccuracySec=12h
Persistent=true
[Install]
WantedBy=timers.target
- enable timer:
systemctl enable reflector.timer
- download tarballs
- https://aur.archlinux.org/packages/pa/package-query/package-query.tar.gz
- https://aur.archlinux.org/packages/ya/yaourt/yaourt.tar.gz
- unzip and install
tar zxvf *.tar.gz
&cd *
&makepkg -si
- install:
xorg
xorg-xinit
#xterm
xorg-twm
- add to
.xinitrc
to enable zapping:
setxkbmap -option terminate:ctrl_alt_bksp
- add to
.xinitrc
to heighten keyboard rate:
xset r rate 200 30
- identify card via
lscpi | grep -e VGA -e 3D
(pciutils
) - install:
xf86-video-nouveau
||nvidia
- for optimus/bumblebee:
- switch to integrated graphics in BIOS
- (remove old drivers
nvidia
xf86-video-nouveau
nouveau-dri
) - install:
mesa
- install:
nvidia
nvidia-utils
- install:
bumblebee
bbswitch
primus
usermod -a -G bumblebee <user>
- run
systemctl enable bumblebeed
- reboot to BIOS, switch to Optimus
- test via
optirun glxgears -info
(package:mesa-demos
)
checkcat /proc/acpi/bbswitch
xrandr
to see attached monitors- add to
.xinitrc
:xrandr --output <primary> --auto --primary --output <secondary> --auto --right-of <primary>
- GUI:
lxrandr
, CLI:disper
- install:
roxterm
||rxvt-unicode
- install:
zsh
grml-zsh-config
zsh-completions
- install:
zsh-syntax-highlighting-git
zsh-history-substring-search-git
- add to
~/.zshrc
(in that order):source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh
- change shell
chsh -s /usr/bin/zsh
, check/etc/shells
and/etc/passwd
- install:
- install:
i3-wm
i3lock
i3status
dmenu
- add to (
.bash_profile
&& (.zlogin
||.zprofile
)):[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx
cp /etc/skel/.xinitrc ~/ && echo 'exec i3' >> ~/.xinitrc
- add to
/etc/pacman.conf
:
[infinality-bundle]
Server = http://bohoomil.com/repo/$arch
[infinality-bundle-fonts]
Server = http://bohoomil.com/repo/$arch
- add & sign key:
pacman-key -r 962DDE58
&&pacman-key --lsign-key 962DDE58
- install:
pacman -Syy && pacman -S infinality-bundle
- (additional fonts:
ibfonts-meta-base
)
https://wiki.archlinux.org/index.php/Infinality-bundle+fonts
- GUI config tool:
lxappearance
- themes & icons:
gnome-themes-standard
(Adwaita) ||mediterranean-theme
(MediterraneanLightDarkest),faenza-icon-theme
(Faenza-Darker)
- install:
compton-git
- add to
.xinitrc
:
exec --no-startup-id compton -d --vsync opengl --backend glx --glx-swap-method 1
- in
nvidia-settings
disable OpenGL Settings -> Allow Flipping
- for a better status bar, install:
conky
- config
- for a notification manager, install:
dunst
- clipboard manager:
xclip
j4-dmenu-desktop
faster than dmenu
- install:
ntp
- add
de.pool.ntp.org
to/etc/ntp.conf
- sync time via
ntpd -gq
(check if correct viadate
) - set hardware clock
hwclock -w
- NOTE: configure WINDOWS to use UTC
- Disable "Internet Time Update"
- Using
regedit
, add aDWORD
value with hex value1
to the registry
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\RealTimeIsUniversal
- install:
udisks2
gvfs
gvfs-afc
ntfs-3g
ntfs-config
- Disable hibernation & fast restarting in WINDOWS which block permissions
powercfg /h off
- run
ntfs-config
, check/etc/fstab
- install:
hdparm
, verify TRIM support viahdparm -I /dev/sda | grep TRIM
- chose one of the following options
- online: using
discard
flag
- add to it to
/etc/fstab
ex./dev/sda1 / ext4 defaults,noatime,discard 0 1
- offline: regular TRIM via a systemd service
- install
util-linux
(providesfstrim.service
andfstrim.timer
) systemctl enable fstrim.timer
(weekly)
- online: using
- install:
alsa-utils
playerctl
- install:
i3lock
,i3lock-blur
- install:
xautolock
- autolock:
xautolock -time 10 -locker 'i3lock -f'
- autolock:
htop
tree
thunar
xarchive
ristretto
evince
imgur-screenshot
shellcheck
python
,python-pip
#python2
python2-pip
pip install pep8
jdk8-openjdk
||jdk7-openjdk
- switch between environments via
archlinux-java <status|get|set X|unset|fix>
- fix font rendering and make swing use GTK look and feel:
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'
- add this line to
/etc/profile.d/jre.sh
- add this line to
adobe-source-code-pro-fonts
ttf-dejavu
ubuntu-font-family
ttf-monaco
- manual font installation:
mv *.ttf /usr/share/fonts/TTF
, update font cachefc-cache -vf
xorg-xfontsel
to select X11 fonts,gtk2fontsel
for xft fonts (GUI)
- for the touchpad, install:
x86-input-synaptics
- for the webcam, install:
guvcview
- relevant: https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_T420
- install:
powertop
- check and enable tunables (wifi, audio, SATA link, usb power mgmt)
- (additional tools:
tlp
||laptop-power-mode
) - install:
thinkfan
- config file:
/etc/thinkfan.conf
, example:/usr/share/doc/thinkfan/examples/thinkfan.conf.simple
and adjust values
- config file:
- TODO: timed suspend, bluetooth
- handles some basic controls, install:
thinkpad_acpi
- additional ACPI support, install:
acpid
- bindings can be found in
/etc/acpi/handler.sh
- bindings can be found in
- brightness controls didn't work out of the box (no scancodes for the keys) until I booted with
acpi_backlight=vendor acpi_osi=Linux
as kernel parameters
Event | Key | acpid event | comment | handeled via thinkpad_aci | keysym |
---|---|---|---|---|---|
mute | button/mute MUTE 00000080 00000000 |
XF86AudioMute |
|||
volume - | button/volumedown VOLDN 00000080 00000000 |
XF86AudioLowerVolume |
|||
volume + | button/volumeup VOLUP 00000080 00000000 |
XF86AudioRaiseVolume |
|||
mute microphone | button/f20 F20 00000080 00000000 |
XF86AudioMicMute |
|||
media button | button/prog1 PROG1 00000080 00000000 |
XF86Launch1 |
|||
power button | button/power PBTN 00000080 00000000 |
shutdown | |||
lock | fn+f3 | button/screenlock SCRNLCK 00000080 00000000 |
XF86ScreenSaver |
||
sleep | fn+f4 | button/sleep SBTN |
x | XF86Sleep |
|
wifi toggle | fn+f5 | button/wlan WLAN 00000080 00000000 |
x | XF86WLAN |
|
webcam | fn+f6 | XF86WebCam |
|||
display | fn+f7 | video/switchmode VMOD 00000080 00000000 |
XF86Display |
||
brightness - | fn+f8 | video/brightnessdown BRTDN 00000087 00000000 ibm/hotkey LEN0068 00000080 00006050 |
x | XF86WakeUp |
|
brightness + | fn+f9 | video/brightnessup BRTUP 00000086 00000000 ibm/hotkey LEN0068 00000080 00006050 |
x | XF86WakeUp |
|
music prev | fn+f10 | cd/prev CDPREV 00000080 00000000 |
XF86AudioPrev |
||
music play | fn+f11 | cd/play CDPLAY 00000080 00000000 |
XF86AudioPlay |
||
music next | fn+f12 | cd/next CDNEXT 00000080 00000000 |
XF86AudioNext |
||
lid open | button/lid LID open |
turns laptop screen off | |||
lid close | button/lid LID close |
turns laptop screen on | |||
audio/mic in | jack/headphone HEADPHONE plug |
redirects audio to plugged device | |||
audio/mic out | jack/headphone HEADPHONE unplug jack/microphone MICROPHONE plug jack/microphone MICROPHONE unplug |
redirects audio to speakers | |||
ac disconnect | ac_adapter ACPI0003:00 00000080 00000000 processor LNXCPU:00 00000081 00000000 processor LNXCPU:01 00000081 00000000 processor LNXCPU:02 00000081 00000000 processor LNXCPU:03 00000081 00000000 battery PNP0C0A:00 00000080 00000001 |
||||
ac connect | battery PNP0C0A:00 00000080 00000001 ac_adapter ACPI0003:00 00000080 00000001 processor LNXCPU:00 00000081 00000000 processor LNXCPU:01 00000081 00000000 processor LNXCPU:02 00000081 00000000 processor LNXCPU:03 00000081 00000000 |
||||
battery out | battery PNP0C0A:00 00000081 00000000 |
after a delay | |||
battery in | battery PNP0C0A:00 00000081 00000001 battery PNP0C0A:00 00000080 00000001 |
after a delay |
recorded via acpi_listen
or journalctl -f