This repository included almost all my configurations for different programs on Linux and Mac OS.
Just clone this repository to your home directory
By default my .bashrc will check if zsh is installed then zsh will be started in oposit case you will work in bash. Your personal config you should write to .bashrc.global or .bashrc.local. In global file all settings will be in all your configurations. In local file there is settings only for specific machine.
Usially I use Vim and Conque GDB plugin for debug. But sometimes when I don't like to run Vim bui I want to have nice looking GDB, I use GDB Dashboard. Just copy .gdbinit to your home directory.
It is really fast. See here: https://github.com/BurntSushi/ripgrep
I use VIM as my primary text editor. My Vim configuration with description you can find here. It works on Linux, Mac and Windows.
In zsh I use zplug as my plugins manager. Also I use vim mode for editing commands.
Problem with headphones on Ubuntu 16.04
It was no sound in headphones on Ubuntu 16.04. I found solution here. I added to the end of the /etc/modprobe.d/alsa-base.conf
the following line:
options snd-hda-intel model=generic
If after reboot headphones are not working, try to kill pulseaudio: pulseaudio -k
.
Setup working with several monitors
For configuring my displays I use xrandr utility. Below is example of
configuration. You can use tool named
ARandR for automatic
configuration. Save configs from this tool to ~/.screenlayout/default.sh
and
put the following command line to ~/.xprofile
.
[ -f $HOME/.screenlayout/default.sh ] && $HOME/.screenlayout/default.sh
Also for fixing problem with HiDPI display and display with small resolution,
you can add parameter --scale
to the small monitor e.g. (xrandr --output DVI --auto --scale 1.5
).
Problem with GL application and ssh access
Some application with OpenGL can be crashed when you run it through ssh. For fix this problem it is possible to run the following command:
Xvfb :99 -screen 0 1024x960x24 -ac &
export DISPLAY=:99
Auto-mount NTFS volumes in read-write mode
I found this information here: https://github.com/osxfuse/osxfuse/wiki/NTFS-3G
Short instruction:
-
Install NTFS-3G from Homebrew:
brew install ntfs-3g
-
Replace
/sbin/mount_ntfs
with the version provided by NTFS-3G. May be it will not be possible due System Integrity Protection. So, you have to disable it.You need to reboot your mac and press
⌘+R
when booting up. Then go into Utilities > Terminal and type the following commands:csrutil disable reboot
-
To replace Apple's NTFS mount tool with the one provided by NTFS-3G execute the following commands in Terminal. This will back up the original mount tool to
/Volumes/Macintosh HD/sbin/mount_ntfs.orig
.sudo mv "/Volumes/Macintosh HD/sbin/mount_ntfs" "/Volumes/Macintosh HD/sbin/mount_ntfs.orig" sudo ln -s /usr/local/sbin/mount_ntfs "/Volumes/Macintosh HD/sbin/mount_ntfs"
Manage your Mac Applications
I found very nice application that can help you to manage your Apps (e.g. total remove an application): https://nektony.com/mac-app-uninstaller
Manage windows
For managing my windows I use the following tool: https://github.com/eczarny/spectacle It is really comfortable and useful.
Configure gdb
I found instruction on this gist: https://gist.github.com/danisfermi/17d6c0078a2fd4c6ee818c954d2de13c And from this answer: https://stackoverflow.com/questions/49001329/gdb-doesnt-work-on-macos-high-sierra-10-13-3/49104154#49104154
Problem with zsh completion
I had some problems with autocompletion and found solution here. It is necessary to run this command:
$ compaudit | xargs chmod g-w