From a801db8dc1a9c9febdeedc628246c38f08821a06 Mon Sep 17 00:00:00 2001 From: Ari Archer Date: Mon, 4 Oct 2021 22:28:51 +0300 Subject: [PATCH] update @ Mon 4 Oct 22:28:50 EEST 2021 --- doc/INSTALLATION.md | 174 +++++++++++++++++- dotfiles/config/QtProject.conf | 4 +- dotfiles/core/hosts | 17 +- .../plugins/start/vimrc/plugin/functions.vim | 24 +++ .../pack/plugins/start/vimrc/plugin/hide.vim | 9 + .../start/vimrc/plugin/key_mapping.vim | 21 +++ .../start/vimrc/plugin/plugin_config.vim | 15 ++ dotfiles/editors/vim/.vimrc | 73 -------- list/package_full.list | 14 +- list/pip_modules.list | 1 + scripts/tools.sh | 0 11 files changed, 261 insertions(+), 91 deletions(-) create mode 100644 dotfiles/editors/vim/.vim/pack/plugins/start/vimrc/plugin/functions.vim create mode 100644 dotfiles/editors/vim/.vim/pack/plugins/start/vimrc/plugin/hide.vim create mode 100644 dotfiles/editors/vim/.vim/pack/plugins/start/vimrc/plugin/key_mapping.vim create mode 100644 dotfiles/editors/vim/.vim/pack/plugins/start/vimrc/plugin/plugin_config.vim mode change 100644 => 100755 scripts/tools.sh diff --git a/doc/INSTALLATION.md b/doc/INSTALLATION.md index 77b0e2f8..848c30f0 100644 --- a/doc/INSTALLATION.md +++ b/doc/INSTALLATION.md @@ -1,4 +1,7 @@ -# Installation of my dotfiles in gentoo, #WIP +# Installation of my dotfiles in gentoo (WORK IN PROGRESS) + +**Before doing any of this - back everything up, this is not a 100% fool-proof method, this works on my machine, you might need to tweak some things like instead of username "ari" you might use "joe"** + ## Clone the repository @@ -67,7 +70,7 @@ $ sudo rm -r /etc/portage 3. Get the new one ```bash -$ sudo mv portage /etc/portage +$ sudo mv portage/portage /etc/portage ``` 4. Sync portage @@ -85,3 +88,170 @@ $ cd ../list $ sudo emerge app-editors/vim ``` +7. Optionally edit the `package.list` +```bash +$ vim package.list +``` + +8. Install the packages +```bash +$ sudo emerge $(cat package.list) +``` + +9. Exit the directory +```bash +$ cd .. +``` + + + +# Enable some services +1. Enable `alsasound` +```bash +$ sudo rc-update add alsasound default +``` + + + +# Install tools +1. Make the `tools.sh` executable +```bash +$ chmod a+rx scripts/tools.sh +``` + +2. Run the provided script +```bash +$ ./scripts/tools.sh +``` + + + +# Dotfiles +1. Enter the dotfiles directory +```bash +$ cd dotfiles +``` + +2. Make the `/usr/local/src` directory +```bash +$ sudo mkdir /usr/local/src +``` + +3. Move some source files into it +```bash +$ sudo mv bin/* /usr/local/src +``` + +4. Go to the `/usr/local/src` directory +```bash +$ cd /usr/local/src +``` + +5. Install yafetch +```bash +$ cd yafetch +$ sudo make +$ sudo ln -s /usr/local/src/yafetch/yafetch /usr/local/bin/yafetch +``` + +6. Go back to dotfiles +```bash +$ cd ~/dotfiles-cleaned/dotfiles +``` + +7. Remove the old `~/.config` +```bash +$ rm -rf ~/.config +``` + +8. Get my config files +```basg +$ mv config ~/.config +``` + +9. Enter the `core` directory +```bash +$ cd core +``` + +10. Install safe core files +```bash +$ mv .xinitrc ~ +$ mv .xprofile ~ +$ sudo mv bash_git /etc +``` + +11. Install other core dotfiles +``` +I will leave this step up to you, get whatever you want, but at this point you will probably need to edit everything. +If you don't know what goes where - see ../list/location.list +``` + +12. Get my scripts +```bash +$ mv custom/.scripts ~ +``` + +13. Get my vim config +```bash +$ mv editors/vim/.vim ~ +$ mv editors/vim/.vimrc ~ +``` + +14. Make the `~/.pictures` directory +```bash +$ mkdir ~/Picrures +``` + +15. Get my wallpaper +```bash +$ mv etc/wallpaper.png ~/Pictures +``` + +16. Get my gtkrc +```bash +$ mv etc/.gtkrc-2.0 ~ +``` + +17. Get the icons I use +```bash +$ rm -rf ~/.icons +$ mv icons ~/.icons +``` + +18. Get my linux config +``` +My kernel config is very specific to my hardware (HP 250 G7 Notebook PC) - you might need to tweak the config. +``` + +19. Move the kernel config to the linux dir +```bash +$ mv linux/.config /usr/src/linux +``` + +20. Compile the kernel +```bash +$ cd /usr/src/linux +$ sudo make oldconfig +$ sudo make +$ sudo make modules_install +$ sudo make install +$ sudo dracut --force +$ sudo grub-mkconfig -o /boot/grub/grub.cfg +``` + +21. Get my suckless software builds +```bash +$ mv suckless/.dwm ~ +$ mv suckless/Suckless ~ +$ cd suckless/Suckless +$ chmod a+rx ./compile +$ ./compile +``` + +22. Done +``` +The installation is done, now you can add the extra stuff that is left in the +directory if you feel like it and you could reboot. +``` + diff --git a/dotfiles/config/QtProject.conf b/dotfiles/config/QtProject.conf index e8dcfc34..006d4bc4 100644 --- a/dotfiles/config/QtProject.conf +++ b/dotfiles/config/QtProject.conf @@ -1,6 +1,6 @@ [FileDialog] -history=file:///home/ari/.config/firefox_extensions, file:///usr/src/linux-5.14.8-gentoo, file:///home/ari/Ari/coding/archive_/Applications_, file:///bin, file:///home/ari, file:///home/ari/Ari/coding/eso_/jsfuck/hello -lastVisited=file:///home/ari/Ari/coding/eso_/jsfuck/hello +history=file:///bin, file:///home/ari, file:///home/ari/Ari/coding/eso_/jsfuck/hello, file:///home/ari/Ari/passwd, file:///home/ari/Videos, file:///home/ari/Pictures +lastVisited=file:///home/ari/Pictures qtVersion=5.15.2 shortcuts=file:, file:///home/ari sidebarWidth=82 diff --git a/dotfiles/core/hosts b/dotfiles/core/hosts index 80160a7a..83fba1d8 100644 --- a/dotfiles/core/hosts +++ b/dotfiles/core/hosts @@ -1,6 +1,6 @@ # /etc/hosts: Local Host Database # -# This file describes a number of aliases-to-address mappings for the for +# This file describes a number of aliases-to-address mappings for the for # local hosts that share this file. # # The format of lines in this file is: @@ -9,7 +9,7 @@ # #The fields can be separated by any number of spaces or tabs. # -# In the presence of the domain name service or NIS, this file may not be +# In the presence of the domain name service or NIS, this file may not be # consulted at all; see /etc/host.conf for the resolution order. # @@ -23,16 +23,19 @@ #10.0.0.2 myname #10.0.0.3 myfriend # -# According to RFC 1918, you can use the following IP networks for private +# According to RFC 1918, you can use the following IP networks for private # nets which will never be connected to the Internet: # # 10.0.0.0 - 10.255.255.255 # 172.16.0.0 - 172.31.255.255 # 192.168.0.0 - 192.168.255.255 # -# In case you want to be able to connect directly to the Internet (i.e. not -# behind a NAT, ADSL router, etc...), you need real official assigned -# numbers. Do not try to invent your own network numbers but instead get one -# from your network provider (if any) or from your regional registry (ARIN, +# In case you want to be able to connect directly to the Internet (i.e. not +# behind a NAT, ADSL router, etc...), you need real official assigned +# numbers. Do not try to invent your own network numbers but instead get one +# from your network provider (if any) or from your regional registry (ARIN, # APNIC, LACNIC, RIPE NCC, or AfriNIC.) # + +0.0.0.0 ads.google.com + diff --git a/dotfiles/editors/vim/.vim/pack/plugins/start/vimrc/plugin/functions.vim b/dotfiles/editors/vim/.vim/pack/plugins/start/vimrc/plugin/functions.vim new file mode 100644 index 00000000..55e24c21 --- /dev/null +++ b/dotfiles/editors/vim/.vim/pack/plugins/start/vimrc/plugin/functions.vim @@ -0,0 +1,24 @@ +" Trim trailing white-space in files +fun! TrimWhitespace() + let l:save = winsaveview() + keeppatterns %s/\s\+$//e + call winrestview(l:save) +endfun + +augroup whitespace_trim + autocmd! + autocmd BufWritePre * :call TrimWhitespace() +augroup END + + +" Show diff in a better way +function! s:DiffWithSaved() + let filetype=&ft + diffthis + vnew | r # | normal! 1Gdd + diffthis + exe "setlocal bt=nofile bh=wipe nobl noswf ro ft=" . filetype +endfunction +com! Diff call s:DiffWithSaved() +cabbrev diff Diff + diff --git a/dotfiles/editors/vim/.vim/pack/plugins/start/vimrc/plugin/hide.vim b/dotfiles/editors/vim/.vim/pack/plugins/start/vimrc/plugin/hide.vim new file mode 100644 index 00000000..fb9cd2ab --- /dev/null +++ b/dotfiles/editors/vim/.vim/pack/plugins/start/vimrc/plugin/hide.vim @@ -0,0 +1,9 @@ +" Hide the background +hi Normal guibg=NONE ctermbg=NONE +hi LineNr guibg=NONE ctermbg=NONE +hi SignColumn guibg=NONE ctermbg=NONE +hi EndOfBuffer guibg=NONE ctermbg=NONE + +" Hide cursorline background +hi CursorLine cterm=NONE term=underline ctermbg=NONE guibg=NONE + diff --git a/dotfiles/editors/vim/.vim/pack/plugins/start/vimrc/plugin/key_mapping.vim b/dotfiles/editors/vim/.vim/pack/plugins/start/vimrc/plugin/key_mapping.vim new file mode 100644 index 00000000..9a6d72c9 --- /dev/null +++ b/dotfiles/editors/vim/.vim/pack/plugins/start/vimrc/plugin/key_mapping.vim @@ -0,0 +1,21 @@ +" Remap ; -> : +map ; : + +" Remap lj -> escape +map lj +inoremap lj + +" h, l <=> b, w +nnoremap h b +nnoremap l w +nnoremap b h +nnoremap w l + +" Disable arrows keys because I keep using them :( +for key in ['', '', '', ''] + exec 'map' key '' + exec 'inoremap' key '' +endfor + +let mapleader = "," " , = leader + diff --git a/dotfiles/editors/vim/.vim/pack/plugins/start/vimrc/plugin/plugin_config.vim b/dotfiles/editors/vim/.vim/pack/plugins/start/vimrc/plugin/plugin_config.vim new file mode 100644 index 00000000..ff330a9b --- /dev/null +++ b/dotfiles/editors/vim/.vim/pack/plugins/start/vimrc/plugin/plugin_config.vim @@ -0,0 +1,15 @@ +" laTeX config +let g:tex_flavor='latex' + +" Bar's configuration +let g:lightline = {} +let g:lightline.colorscheme = 'apprentice' " Set the bar's theme + +" Remove bar's background +let s:palette = g:lightline#colorscheme#{g:lightline.colorscheme}#palette +let s:palette.normal.middle = [ [ 'NONE', 'NONE', 'NONE', 'NONE' ] ] +let s:palette.inactive.middle = s:palette.normal.middle +let s:palette.tabline.middle = s:palette.normal.middle + +set noshowmode " Don't show what mode vim is in + diff --git a/dotfiles/editors/vim/.vimrc b/dotfiles/editors/vim/.vimrc index 62ccafd5..a37699cc 100644 --- a/dotfiles/editors/vim/.vimrc +++ b/dotfiles/editors/vim/.vimrc @@ -55,76 +55,3 @@ call plug#end() colorscheme alduin " Set the theme -" Hide the background -hi Normal guibg=NONE ctermbg=NONE -hi LineNr guibg=NONE ctermbg=NONE -hi SignColumn guibg=NONE ctermbg=NONE -hi EndOfBuffer guibg=NONE ctermbg=NONE - -" Hide cursorline background -hi CursorLine cterm=NONE term=underline ctermbg=NONE guibg=NONE - - -" Remap ; -> : -map ; : - -" Remap lj -> escape -map lj -inoremap lj - -" h, l <=> b, w -nnoremap h b -nnoremap l w -nnoremap b h -nnoremap w l - -" Disable arrows keys because I keep using them :( -for key in ['', '', '', ''] - exec 'map' key '' - exec 'inoremap' key '' -endfor - - -let mapleader = "," " , = leader - - -" Trim trailing white-space in files -fun! TrimWhitespace() - let l:save = winsaveview() - keeppatterns %s/\s\+$//e - call winrestview(l:save) -endfun - -augroup whitespace_trim - autocmd! - autocmd BufWritePre * :call TrimWhitespace() -augroup END - - -" laTeX config -let g:tex_flavor='latex' - -" Bar's configuration -let g:lightline = {} -let g:lightline.colorscheme = 'apprentice' " Set the bar's theme - -" Remove bar's background -let s:palette = g:lightline#colorscheme#{g:lightline.colorscheme}#palette -let s:palette.normal.middle = [ [ 'NONE', 'NONE', 'NONE', 'NONE' ] ] -let s:palette.inactive.middle = s:palette.normal.middle -let s:palette.tabline.middle = s:palette.normal.middle - -set noshowmode " Don't show what mode vim is in - - -" Show diff in a better way -function! s:DiffWithSaved() - let filetype=&ft - diffthis - vnew | r # | normal! 1Gdd - diffthis - exe "setlocal bt=nofile bh=wipe nobl noswf ro ft=" . filetype -endfunction -com! Diff call s:DiffWithSaved() -cabbrev diff Diff - diff --git a/list/package_full.list b/list/package_full.list index 8a19fd4d..d7b9d651 100644 --- a/list/package_full.list +++ b/list/package_full.list @@ -134,7 +134,7 @@ dev-lang/python-exec-conf-2.4.6 dev-lang/rust-1.53.0 dev-lang/swig-4.0.2 dev-lang/tcl-8.6.11 -dev-lang/vala-0.52.4 +dev-lang/vala-0.52.5 dev-lang/yasm-1.3.0-r1 dev-libs/appstream-glib-0.7.18-r1 dev-libs/atk-2.36.0 @@ -146,7 +146,7 @@ dev-libs/elfutils-0.185 dev-libs/expat-2.4.1 dev-libs/fribidi-1.0.10 dev-libs/girara-0.3.5 -dev-libs/glib-2.68.3-r1 +dev-libs/glib-2.68.4 dev-libs/gmp-6.2.1-r1 dev-libs/gobject-introspection-1.68.0 dev-libs/gobject-introspection-common-1.68.0 @@ -196,7 +196,7 @@ dev-libs/openssl-1.1.1l dev-libs/popt-1.18 dev-libs/protobuf-3.17.3 dev-libs/ptexenc-1.3.9_p20210325-r1 -dev-libs/vala-common-0.52.4 +dev-libs/vala-common-0.52.5 dev-libs/xxhash-0.8.0 dev-libs/zziplib-0.13.72 dev-perl/Algorithm-Diff-1.201.0 @@ -371,8 +371,8 @@ dev-util/boost-build-1.76.0-r2 dev-util/cbindgen-0.20.0 dev-util/cmake-3.20.5 dev-util/desktop-file-utils-0.26-r1 -dev-util/gdbus-codegen-2.68.3 -dev-util/glib-utils-2.68.3 +dev-util/gdbus-codegen-2.68.4 +dev-util/glib-utils-2.68.4 dev-util/gperf-3.1 dev-util/gtk-doc-am-1.33.2 dev-util/gtk-update-icon-cache-3.24.26 @@ -460,7 +460,7 @@ net-dns/libidn-1.37 net-dns/libidn2-2.3.2 net-firewall/iptables-1.8.7 net-im/telegram-desktop-3.0.1-r1 -net-libs/glib-networking-2.68.1 +net-libs/glib-networking-2.68.2 net-libs/gnutls-3.7.2 net-libs/http-parser-2.9.4-r1 net-libs/libiscsi-1.18.0 @@ -745,7 +745,7 @@ x11-libs/libxcb-1.14 x11-libs/libxkbcommon-1.3.0 x11-libs/libxkbfile-1.1.0 x11-libs/libxshmfence-1.3-r2 -x11-libs/pango-1.48.7-r1 +x11-libs/pango-1.48.10 x11-libs/pixman-0.40.0 x11-libs/vte-0.64.2 x11-libs/xcb-util-0.4.0-r2 diff --git a/list/pip_modules.list b/list/pip_modules.list index 73120b72..74f2e9c6 100644 --- a/list/pip_modules.list +++ b/list/pip_modules.list @@ -116,6 +116,7 @@ psutil ptyprocess pyaes pyasn1 +pycairo pycodestyle pycparser pyelftools diff --git a/scripts/tools.sh b/scripts/tools.sh old mode 100644 new mode 100755