Manjaro Setup
Related dotfiles can be found here
Environment
- Machine: Macbook Pro 14 mid
- System: Manjaro
- Desktop: KDE Plasma 5
- Window Manager: i3
Setup
Installation
- (Macbook Specific): Add boot manager rEFInd
- Install Manjaro Deepin on Macbook Pro
- Use i3wm in KDE: dotfiles
Config
References
Display
- Multi Screen Support: Install
xrandr
(If happens)Randomly freezing: Disable hardware acceleration
- Systems with nVidia adapters using the nouveau driver lock up randomly
- Set kernel parameters by
GRUB
: Kernel parameters
Font in HDPI
- Make qt config persistent:
chmod u+w ~/.config/Trolltech.conf
before runningqtconfig-qt4
chmod -w ~/.config/Trolltech.conf
afterqtconfig-qt4
closed
- Make qt config persistent:
HDPI without DE
Make sure you install the
plasma-desktop
package to config HDPI for QT AppsX Resources && GDK
Follow HiDPI - ArchWiki
QT
Scale
1
export QT_AUTO_SCREEN_SCALE_FACTOR=1
Font size
Use "KDE System Settings" or edit the file manually to config ~/.config/kcmfonts
Cursor size
Add
XCURSOR_PATH=/usr/share/icons
toENV
. I put it in~/.pam_environment
.
- Multi Screen Support: Install
Keyboard & Touchpad
- Remap Control|Esc to CapsLock: xcape
- Further Remapping:
Settings of touchpad and keyboard are reset after waking up from suspend
Temporary solution: run scripts to reapply settings after waking up
Add a executable script under
/usr/lib/systemd/system-sleep
. Env ofDISPLAY
andXDG_RUNTIME_DIR
need to be set for X related settings to work in the script.1
2
3
4
5
6
7
8
9
10
11
12
13
14
15#/usr/lib/systemd/system-sleep/reapply-devices-settings.sh
#!/bin/sh
case $1/$2 in
pre/*)
# echo "Going to $2..."
# Place your pre suspend commands here, or `exit 0` if no pre suspend action required
exit 0
;;
post/*)
echo "Waking up from $2..."
sleep 1
# Place your post suspend (resume) commands here, or `exit 0` if no post suspend action required
su {username} -c "DISPLAY=:0 XDG_RUNTIME_DIR=/run/user/{user_id} kcminit kcm_touchpad"
su {username} -c "DISPLAY=:0 XDG_RUNTIME_DIR=/run/user/{user_id} systemctl --user restart laptop-keymap.service"
esacSettings of touchpad and keyboard are reset after devices plugged in/out
Temporary solution: run scripts to reapply settings once devices plugged in/out
How to permanently assign a different keyboard layout to a USB keyboard
Add
/etc/udev/rules.d/00-usb-keyboard.rules
as follows:1
2
3ATTRS{idVendor}=="feed", ATTRS{idProduct}=="1307", OWNER="sinkerine"
ACTION=="add", RUN+="/home/sinkerine/.config/scripts/usb-keyboard-in_udev.sh"
ACTION=="remove", RUN+="/home/sinkerine/.config/scripts/usb-keyboard-out_udev.sh"This script will be called every time devices plugged in/out(So I am not sure how the keyboard vendor and product works) Then create and maintain your hook scripts:
/home/sinkerine/.config/scripts/usb-keyboard-in_udev.sh
1
2
/home/sinkerine/.config/scripts/usb-keyboard-in.sh &/home/sinkerine/.config/scripts/usb-keyboard-in.sh
1
2
3
4
5
6
7
8
if lsusb | grep -q -E 'feed.*(1307|6060)'; then
su sinkerine -c "DISPLAY=:0 XDG_RUNTIME_DIR=/run/user/1000 systemctl --user stop laptop-keymap.service"
else
sleep 2
kcm_init kcm_touchpad
su sinkerine -c "DISPLAY=:0 XDG_RUNTIME_DIR=/run/user/1000 systemctl --user restart laptop-keymap.service"
fi/home/sinkerine/.config/scripts/usb-keyboard-out_udev.sh
1
2
/home/sinkerine/.config/scripts/usb-keyboard-out.sh &/home/sinkerine/.config/scripts/usb-keyboard-out.sh
1
2
3
4
sleep 2
lsusb | grep -q -E 'feed.*(1307|6060)' ||
su sinkerine -c "DISPLAY=:0 XDG_RUNTIME_DIR=/run/user/1000 systemctl --user start laptop-keymap.service"
Network
- (Macbook Specific) WiFi : Install
linux-headers
broadcom-wl-dkms
- (Macbook Specific) WiFi : Install
Desktop
Compositing Effects(For window transparency, desktop effects...)
Re-enabling compositing effects
- Install
compton
- Launch
compton
withi3
: addexec --no-startup-id compton
to i3 config
- Install
Failed to Suspend with USB Devices Connected
High CPU usage of
plasmashell
- Temporary fix: relaunch
plasmashell
bykquitapp5 plasmashell && kstart5 plasmashell
- Try this fix: Plasmashell High CPU Load Fix - Plasma 5.9x KDE
- Temporary fix: relaunch
Mount
Mount NAS Samba Share Automatically
- autofs
- Add
uid=<user_name>
in cifs connection options to avoid permission issues.
Power Management
- Use
powertop
to monitor power usage
100.0% usage by Audio codec hwC0D0 Realtek
Enable sound related power saving in tlp
- Use
Software
- Terminal emulator: Alacritty
- Drop-down terminal emulator: Guake
- Text editor: Emacs
- Launcher: Rofi
- Browser: Firefox
- Web services: Rambox
- Development Documentations: DevDoc
- Twitter: TweetDeck
- Read later: Pocket
- Input method: Fcitx
- Chinese: fcitx-rime
- Japanese: fcitx-mozc
- Wine wrapper: CrossOver
- Music ripper & tagger: Foobar2000(Wine)
- Music player: Clementine