#+TITLE: Linux * Linux 초기설정 정리 Arcolinux-xmonad 기준 ** Init mirrorlist to korea #+begin_src shell pacman -Syu #+end_src ** AUR Manager #+begin_src shell sudo pacman -S --needed base-devel git clone https://aur.archlinux.org/paru.git cd paru makepkg -si #+end_src ** GIT #+begin_src shell git config --global user.name "JaeYoo-Im" git config --global user.email "cpu3792@gmail.com" #+end_src ** ZSH *** Install #+begin_src shell paru -S zsh oh-my-zsh-git zsh-syntax-highlighting zsh-autosuggestions chsh -s /usr/bin/zsh jaeus /usr/share/oh-my-zsh/tools/install.sh #+end_src *** modifiy zshrc theme to (agnoster or random) after =source $ZSH/oh-my-zsh.sh= #+begin_src shell prompt_context(){} source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh #+end_src ** TMUX #+begin_src shell paru -S tmux git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm #+end_src Configuration(~/.tmux.conf) #+begin_src shell :tangle ./.tmux.conf set -g default-terminal "screen-256color" set -g mouse on # utf8 is on # set -g utf8 on # set -g status-utf8 on # address vim mode switching delay (http://superuser.com/a/252717/65504) set -s escape-time 0 # scrollback buffer size increase set -g history-limit 100000 # List of plugins set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' set -g @plugin 'tmux-plugins/tmux-yank' # Other examples: # set -g @plugin 'github_username/plugin_name' # set -g @plugin 'git@github.com/user/plugin' # set -g @plugin 'git@bitbucket.com/user/plugin' # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) run -b '~/.tmux/plugins/tpm/tpm' #+end_src .tmux.conf파일을 위치시킨 후에. #+begin_src shell TMUX_PLUGIN_MANAGER_PATH=~/.config/tmux/plugins/tpm ~/.tmux/plugins/tpm/scripts/install_plugins.sh TMUX_PLUGIN_MANAGER_PATH=~/.config/tmux/plugins/tpm ~/.tmux/plugins/tpm/bin/update_plugins all #+end_src tmux를 항시 실행하기 위해 .zshrc에 다음 내용 추가 #+begin_src shell printf "if command -v tmux &> /dev/null && [ -z \"\$TMUX\" ]; then\ntmux\n fi\n" >> ~/.zshrc #+end_src ** Fonts #+begin_src shell paru -S ttf-fira-code ttf-nanum nerd-fonts-mononoki #+end_src ** 한글 입력문제 #+begin_src shell paru -S fcitx-hangul fcitx-configtool #+end_src in ~/.profile #+begin_src shell export GTK_IM_MODULE=fcitx export QT_IM_MODULE=fcitx export XMODIFIERS="@im=fcitx" #+end_src in ~/.xmonad/scripts/autostart.sh #+begin_src shell run fcitx & #+end_src ** Enpass #+begin_src shell paru -S enpass #+end_src in ~/.xmonad/scripts/autostart.sh #+begin_src shell run enpass & #+end_src ** EMACS *** Install #+begin_src shell paru -S ripgrep emacs git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d ~/.emacs.d/bin/doom -y install echo "alias doomsync=\"~/.emacs.d/bin/doom sync\"" >> ~/.zshrc #+end_src Latex 지원 #+begin_src shell paru -S auctex texlive-most texlive-lang #+end_src in ~/.xmonad/scripts/autostart.sh #+begin_src shell run emacs --daemon #+end_src ** Libre-office Libre-office를 깔면 Emacs에서도 그 파일이 열림. #+begin_src shell paru -S libreoffice #+end_src ** Alacritty *** Install #+begin_src shell paru -S alacritty #+end_src *** Configuration #+begin_src shell :tangle ~/.config/alacritty/alacritty.yml :mkdirp yes env: TERM: xterm-256color window: padding: x: 6 y: 6 title: Alacritty class: instance: Alacritty general: Alacritty scrolling: history: 10000 font: normal: family: Mononoki Nerd Font style: Regular bold: family: Mononoki Nerd Font style: Bold italic: family: Mononoki Nerd Font style: Italic bold_italic: family: Mononoki Nerd Font style: Bold Italic # Point size size: 11.0 offset: x: 0 y: 1 draw_bold_text_with_bright_colors: true colors: primary: background: '0x282c34' foreground: '0xbbc2cf' selection: text: '0xbbc2cf' normal: black: '0x1c1f24' red: '0xff6c6b' green: '0x98be65' yellow: '0xda8548' blue: '0x51afef' magenta: '0xc678dd' cyan: '0x5699af' white: '0x202328' bright: black: '0x5b6268' red: '0xda8548' green: '0x4db5bd' yellow: '0xecbe7b' blue: '0x3071db' # This is 2257a0 in Doom Emacs but I lightened it. magenta: '0xa9a1e1' cyan: '0x46d9ff' white: '0xdfdfdf' background_opacity: 0.9 key_bindings: # (Windows, Linux, and BSD only) - { key: V, mods: Control|Shift, action: Paste } - { key: C, mods: Control|Shift, action: Copy } - { key: Insert, mods: Shift, action: PasteSelection } - { key: Key0, mods: Control, action: ResetFontSize } - { key: Equals, mods: Control, action: IncreaseFontSize } - { key: Plus, mods: Control, action: IncreaseFontSize } - { key: Minus, mods: Control, action: DecreaseFontSize } - { key: Minus, mods: Control, action: DecreaseFontSize } - { key: Paste, action: Paste } - { key: Copy, action: Copy } - { key: L, mods: Control, action: ClearLogNotice } - { key: L, mods: Control, chars: "\x0c" } - { key: PageUp, mods: Shift, action: ScrollPageUp, mode: ~Alt } - { key: PageDown, mods: Shift, action: ScrollPageDown, mode: ~Alt } - { key: Home, mods: Shift, action: ScrollToTop, mode: ~Alt } - { key: End, mods: Shift, action: ScrollToBottom, mode: ~Alt } #+end_src ** Green-tunnel proxy redirect #+begin_src shell npm install green-tunnel #+end_src * Proxy #+begin_src shell export proxy_addr="http://192.168.1.168:3128" #+end_src ** Global #+begin_src shell echo export http_proxy=$proxy_addr >> ~/.zshrc echo export HTTP_PROXY=$proxy_addr >> ~/.zshrc echo export https_proxy=$proxy_addr >> ~/.zshrc echo export HTTPS_PROXY=$proxy_addr >> ~/.zshrc echo export ftp_proxy=$proxy_addr >> ~/.zshrc echo export FTP_PROXY=$proxy_addr >> ~/.zshrc echo export rsync_proxy=$proxy_addr >> ~/.zshrc echo export RSYNC_PROXY=$proxy_addr >> ~/.zshrc #+end_src Sudo 명령어에 proxy 환경변수 통과 #+begin_src shell echo "Defaults env_keep += \"*_proxy *_PROXY\"" > ./05_proxy sudo mv 05_proxy /etc/sudoers.d sudo chown root:root /etc/sudoers.d/05_proxy #+end_src 가끔 PGP키를 못받을때 #+begin_src shell sudo killall dirmngr gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 \ --keyserver-options "timeout=40 http-proxy=$http_proxy" \ --recv-keys B0F4253373F8F6F510D42178520A9993A1C052F8 #+end_src ** Git #+begin_src shell git config --global http.proxy $proxy_addr git config --global https.proxy $proxy_addr #+end_src