Write a script to automatically setup the environment
- Download repo
- Install dependencies (identify deps first)
- Copy, move, create, link all required files
Also, the script to setup dotfiles should account for different OSes
Basic setup
Create basic folder structure
for dir in archive classes downloads media/{music,pictures} projects workspace; do mkdir $dir; done
Files in etc/
and usr/
are not actually located in the home folder. Clone the repo, then cd dotfiles
and then follow these steps
-
sudo pacman -Syu
-
sudo pacman -S yay zsh termite firefox polybar
-
sudo chsh; chsh
-
yay -S polybar code megasync touchegg xbindkeys
-
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
-
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
-
git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k
-
cp etc/default/grub /etc/default/grub; sudo update-grub
-
cp etc/ssh/sshd_config /etc/ssh/sshd_config
-
cp etc/locale.conf /etc/locale.conf
or just set the proper locale- Uncomment the locale to be generate (
en_US.UTF-8 UTF-8
) in/etc/locale.gen
- Generate with
sudo locale-gen
- Uncomment the locale to be generate (
-
cp -r usr/share/X11/xorg.conf.d /usr/share/X11/
or just copy the content -
cp -r usr/share/conky /usr/share/
(now disabled in~/.config/i3/config/
)
All the other configuration files are in the home folder
- YET TO TEST
for file in .dotfiles/.config/*; do ln -s $file .$(basename $file); done
cp .Xresources ~/; xrdb ~/.Xresources
echo "[ -f ~/.xprofile ] && . ~/.xprofile" >> ~/.xinitrc
ln -s .xprofile ~/.xprofile
if necessary (rm -rf ~/.xprofile
)ln -s ~/.dotfiles/.dmenurc ~/.dmenurc
Some stuff to install
sudo pacman -S unzip docker docker-compose go davfs2 yarn npm transmission-cli openvpn gdb colordiff ifconfig zathura dpkg httpie openssh
yay -S dpkg
Install
Configure
ln -s .dotfiles/.zshrc ~/.zshrc
ln -s .dotfiles/.config ~/.config
ln -s .dotfiles/.gitconfig ~/.gitconfig
Symlink user binaries
for f in $(find bin -type f); do cp "$f" "${HOME}/.local/$f"; done
git clone https://github.com/powerline/fonts.git --depth=1
./fonts/install.sh && rm -rf fonts
Configuration
touchegg-1.1.1.1
is not available anymore and the new version doesn't support DRAG (2 fingers gestures). So it's necessary to downgrade to 1.1.1.1 to keep the old configuration
- Add arcanis repo to
/etc/pacman.conf
[arcanisrepo]
Server = http://repo.arcanis.me/repo/$arch
- Update packages database
pacman -Syyu
- Install using pacman
pacman -S touchegg
- Remove arcanis and update again
yay -Syu touchegg
- Double check that
~/.config/touchegg/touchegg.conf
exists, orln -s ~/.dotfiles/.config/touchegg ~/.config/
- Load touchegg with
echo "touchegg &" >> ~/.xprofile
or just load~/.xprofile
from~/.xinitrc
More
<touchégg>
<settings>
<property name="composed_gestures_time">111</property>
</settings>
<application name="All">
<gesture type="DRAG" fingers="1" direction="ALL">
<action type="DRAG_AND_DROP">BUTTON=1</action>
</gesture>
<gesture type="DRAG" fingers="3" direction="UP">
<action type="MAXIMIZE_RESTORE_WINDOW"></action>
</gesture>
<gesture type="DRAG" fingers="3" direction="DOWN">
<action type="MINIMIZE_WINDOW"></action>
</gesture>
<gesture type="DRAG" fingers="2" direction="ALL">
<action type="SCROLL">SPEED=7:INVERTED=true</action>
</gesture>
<gesture type="PINCH" fingers="2" direction="IN">
<action type="SEND_KEYS">Control+minus</action>
</gesture>
<gesture type="PINCH" fingers="2" direction="OUT">
<action type="SEND_KEYS">Control+plus</action>
</gesture>
<gesture type="TAP" fingers="3" direction="">
<action type="MOUSE_CLICK">BUTTON=2</action>
</gesture>
<gesture type="TAP" fingers="2" direction="">
<action type="MOUSE_CLICK">BUTTON=3</action>
</gesture>
<gesture type="TAP" fingers="1" direction="">
<action type="MOUSE_CLICK">BUTTON=1</action>
</gesture>
</application>
</touchégg>
Configuration
Currenlty using fingerprint-gui
with libfprint
(only v. 0.8.2-1 works). In case of upgrade just downgrade with DOWNGRADE_FROM_ALA=1 downgrade libfprint
Configuration
- Install xf86-input-libinput
cp 40-libinput.conf /etc/X11/xorg.conf.d/
Section "InputClass"
Identifier "libinput touchpad catchall"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
Option "NaturalScrolling" "true"
Option "AccelSpeed" "0.7"
Option "AccelProfile" "adaptive"
Option "Tapping" "true"
Option "TappingButtonMap" "lrm"
EndSection
Configuration
sudo usermod -aG audio $(whoami)
sudo install_pulse
sudo pacman -S pavucontrol
- Add
options snd_hda_intel index=1
to/etc/modprobe.d/alsa-base.conf
- Set default input/output for pulse audio here
- Make sure only one instance of
pulseaudio
is running- Assuming
/usr/lib/systemd/user/pulseaudio.service
is enabled with systemctl --user enable pulseaudio
systemctl --user start pulseaudio
- Keep
exec --no-startup-id pulseaudio
commented out
- Assuming
No need for /etc/asound.conf
or put the following configuration
# Use PulseAudio by default
pcm.!default {
type pulse
fallback "sysdefault"
hint {
show on
description "Default ALSA Output (currently PulseAudio Sound Server)"
}
}
ctl.!default {
type pulse
fallback "sysdefault"
}
# vim:set ft=alsaconf:
xbindkeys -d > ~/.xbindkeysrc
Add mute/unmute bind
echo "# Mute volume
"pactl set-sink-mute @DEFAULT_SINK@ toggle"
XF86AudioMute
" >> ~/.xbindkeysrc
Configuration
-
Download the theme from the git repository. If it is a Github repo, you can download it by clicking the big green "Code" button and click "Download.zip"
-
Open about:config
-
A dialog will warn you, but ignore t, just doit. Press the "I accept the risk!" button.
-
Search for these and enable each of them:
toolkit.legacyUserProfileCustomizations.stylesheets
layers.acceleration.force-enabled
gfx.webrender.all
gfx.webrender.enabled
layout.css.backdrop-filter.enabled
svg.context-properties.content.enabled
-
Go to your Firefox profile:
- Linux -
$HOME/.mozilla/firefox/XXXXXXX.default-XXXXXX/
- Windows 10 -
C:Users<USERNAME>AppDataRoamingMozillaFirefoxProfilesXXXXXXX.default-XXXXXX
- macOS -
Users/<USERNAME>/Library/Application Support/Firefox/Profiles/XXXXXXX.default-XXXXXXX
- Linux -
-
Create a folder and name it chrome, then assuming that you already have cloned this repo, just copy the theme to chrome folder.
-
Restart Firefox
-
Edit
about:config
layout.css.devPixelsPerPx
to1.4
toolkit.legacyUserProfileCustomizations.stylesheets
totrue
-
ln -s .dotfiles/.mozilla/firefox ~/.mozilla/firefox/
Audio
Should works with both pulseaudio
and alsa
installed
alsa-lib 1.1.7-1
alsa-plugins 1.1.7-3
alsa-tools 1.1.7-1
alsa-utils 1.1.7-1
zita-alsa-pcmi 0.3.2-1
Detect sound card with cat /proc/asound/cards
. That gives the following output
0 [HDMI ]: HDA-Intel - HDA Intel HDMI
HDA Intel HDMI at 0xf0530000 irq 48
1 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xf0534000 irq 44
and set as default card in /etc/asound.conf
NOT WORKING ANYMORE
pcm.!default {
type hw
card PCH
}
ctl.!default {
type hw
card PCH
}
To unmute the sound use the keybind
Mod1 + XF86SoundMute
set in.config/i3/config
"pactl set-sink-mute @DEFAULT_SINK@ toggle" XF86AudioMute
If the output of pulseaudio
shows E: [pulseaudio] main.c: pa_pid_file_create() failed.
try adding user to audio group with sudo usermod -aG audio $(whoami)
Using both pulseaudio
and alsamixer
.
- Get default output device with
pacmd list-sinks | grep -e 'name:' -e 'index:'
- Get default input device with
pacmd list-sources | grep -e 'name:' -e 'index:'
List all available cards with aplay -L
...
pulse
PulseAudio Sound Server
default
Default ALSA Output (currently PulseAudio Sound Server)
...
and test if they are working with speaker-test -D NAME -c 2
where the name could be, in this specific case, "pulse" or "default".
Screen resolution
- Generate and create new resolution -
xrand --newmode $(cvt 2304 1296 | sed '2 !d;s/Modeline\s//g')
- Add resolution to output device - Find connected device
xrandr | sed -n -e '/\sconnected/p' | awk -F' ' '{print $1}'
(in my case eDP1) -xrandr --addmode eDP1 2304x1296_60.00
- Change resolution -
xrandr -s 2304x1296
Keybinds
This might require xbindkeys. Now the touch-function keys are set to
Search
: launch firefoxExplorer
: launch rangerTools
: launch morc menuDisplay
: toogle display brightness
Misc
- Arch on X1 carbon
- Install Postman
- Download the executable and place it in
${HOME}/.app/
- Create link
sudo ln -s ${HOME}/.dotfiles/.script/postman /usr/bin/postman
- Download the executable and place it in