From a3ae8da7b6080b05750518c24166d8eaa6ccc1db Mon Sep 17 00:00:00 2001 From: Juni Kim Date: Fri, 1 Apr 2022 00:01:34 -0400 Subject: [PATCH] first commit --- dotfiles/.cwmrc | 18 +++ dotfiles/.xinitrc | 2 + dotfiles/.zshrc | 138 +++++++++++++++++++++++ dotfiles/cwm.sh | 5 + dotfiles/init.vim | 222 +++++++++++++++++++++++++++++++++++++ dotfiles/kitty.conf | 35 ++++++ dotfiles/polybar/config | 173 +++++++++++++++++++++++++++++ dotfiles/polybar/launch.sh | 16 +++ dotfiles/tmux.conf | 2 + user_debian.sh | 162 +++++++++++++++++++++++++++ 10 files changed, 773 insertions(+) create mode 100644 dotfiles/.cwmrc create mode 100644 dotfiles/.xinitrc create mode 100644 dotfiles/.zshrc create mode 100755 dotfiles/cwm.sh create mode 100644 dotfiles/init.vim create mode 100644 dotfiles/kitty.conf create mode 100644 dotfiles/polybar/config create mode 100755 dotfiles/polybar/launch.sh create mode 100644 dotfiles/tmux.conf create mode 100755 user_debian.sh diff --git a/dotfiles/.cwmrc b/dotfiles/.cwmrc new file mode 100644 index 0000000..ce44317 --- /dev/null +++ b/dotfiles/.cwmrc @@ -0,0 +1,18 @@ +command term kitty + +bind-key 4-d dmenu_run +bind-key 4-f window-fullscreen +bind-key 4-Q window-close +bind-key 4-c window-cycle +bind-key 4-C window-rcycle +bind-key 4-h window-hide + +bind-key 4-W brave-browser +bind-key 4-Return terminal + +bind-key M-Up "pactl set-sink-volume 0 +5%" +bind-key M-Down "pactl set-sink-volume 0 -5%" +bind-key M-m "pactl set-sink-mute 0 toggle" + +mousebind M-1 window_move +mousebind CM-1 window_resize diff --git a/dotfiles/.xinitrc b/dotfiles/.xinitrc new file mode 100644 index 0000000..3919a04 --- /dev/null +++ b/dotfiles/.xinitrc @@ -0,0 +1,2 @@ +xrandr -s 1600x900 +exec dbus-run-session "$HOME/cwm.sh" diff --git a/dotfiles/.zshrc b/dotfiles/.zshrc new file mode 100644 index 0000000..927b373 --- /dev/null +++ b/dotfiles/.zshrc @@ -0,0 +1,138 @@ +# If you come from bash you might have to change your $PATH. +# export PATH=$HOME/bin:/usr/local/bin:$PATH + +# Path to your oh-my-zsh installation. +export ZSH="$HOME/.oh-my-zsh" + +# Set name of the theme to load --- if set to "random", it will +# load a random theme each time oh-my-zsh is loaded, in which case, +# to know which specific one was loaded, run: echo $RANDOM_THEME +# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes +ZSH_THEME="robbyrussell" + +# Set list of themes to pick from when loading at random +# Setting this variable when ZSH_THEME=random will cause zsh to load +# a theme from this variable instead of looking in $ZSH/themes/ +# If set to an empty array, this variable will have no effect. +# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) + +# Uncomment the following line to use case-sensitive completion. +# CASE_SENSITIVE="true" + +# Uncomment the following line to use hyphen-insensitive completion. +# Case-sensitive completion must be off. _ and - will be interchangeable. +# HYPHEN_INSENSITIVE="true" + +# Uncomment one of the following lines to change the auto-update behavior +# zstyle ':omz:update' mode disabled # disable automatic updates +# zstyle ':omz:update' mode auto # update automatically without asking +# zstyle ':omz:update' mode reminder # just remind me to update when it's time + +# Uncomment the following line to change how often to auto-update (in days). +# zstyle ':omz:update' frequency 13 + +# Uncomment the following line if pasting URLs and other text is messed up. +# DISABLE_MAGIC_FUNCTIONS="true" + +# Uncomment the following line to disable colors in ls. +# DISABLE_LS_COLORS="true" + +# Uncomment the following line to disable auto-setting terminal title. +# DISABLE_AUTO_TITLE="true" + +# Uncomment the following line to enable command auto-correction. +# ENABLE_CORRECTION="true" + +# Uncomment the following line to display red dots whilst waiting for completion. +# You can also set it to another string to have that shown instead of the default red dots. +# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" +# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) +# COMPLETION_WAITING_DOTS="true" + +# Uncomment the following line if you want to disable marking untracked files +# under VCS as dirty. This makes repository status check for large repositories +# much, much faster. +# DISABLE_UNTRACKED_FILES_DIRTY="true" + +# Uncomment the following line if you want to change the command execution time +# stamp shown in the history command output. +# You can set one of the optional three formats: +# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" +# or set a custom format using the strftime function format specifications, +# see 'man strftime' for details. +# HIST_STAMPS="mm/dd/yyyy" + +# Would you like to use another custom folder than $ZSH/custom? +# ZSH_CUSTOM=/path/to/new-custom-folder + +# Which plugins would you like to load? +# Standard plugins can be found in $ZSH/plugins/ +# Custom plugins may be added to $ZSH_CUSTOM/plugins/ +# Example format: plugins=(rails git textmate ruby lighthouse) +# Add wisely, as too many plugins slow down shell startup. +plugins=(git zsh-syntax-highlighting) + +source $ZSH/oh-my-zsh.sh + +# User configuration + +# export MANPATH="/usr/local/man:$MANPATH" + +# You may need to manually set your language environment +# export LANG=en_US.UTF-8 + +# Preferred editor for local and remote sessions +# if [[ -n $SSH_CONNECTION ]]; then +# export EDITOR='vim' +# else +# export EDITOR='mvim' +# fi + +# Compilation flags +# export ARCHFLAGS="-arch x86_64" + +# Set personal aliases, overriding those provided by oh-my-zsh libs, +# plugins, and themes. Aliases can be placed here, though oh-my-zsh +# users are encouraged to define aliases within the ZSH_CUSTOM folder. +# For a full list of active aliases, run `alias`. +# +# Example aliases +# alias zshconfig="mate ~/.zshrc" +# alias ohmyzsh="mate ~/.oh-my-zsh" + +set -o vi +alias gac='git add . && git commit' +alias v='nvim' +alias s='ls' +#alias sy='systemctl' +#alias j='journalctl' +#alias r='source ranger' +alias c='clear' +alias e='exit' +alias o='xdg-open' +#alias ec='emacsclient' +alias cp='cp -r' +alias vc='nvim ~/.config/nvim/init.vim' + + +# ~/.zshrc + +export MT_EDITOR=nvim +export VISUAL=nvim + +eval "$(starship init zsh)" + +f() { + fff "$@" + cd "$(cat "${XDG_CACHE_HOME:=${HOME}/.cache}/fff/.fff_d")" +} + +#export TERM=linux +export EDITOR=nvim +export PATH=~/cp:$PATH + +resetcursor() { + printf '\033]50;CursorShape=1\x7' +} +export PS1="$(resetcursor)$PS1" + diff --git a/dotfiles/cwm.sh b/dotfiles/cwm.sh new file mode 100755 index 0000000..f05a73b --- /dev/null +++ b/dotfiles/cwm.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +nitrogen --restore & +test -x ~/.config/polybar/launch.sh && ~/.config/polybar/launch.sh +openbsd-cwm diff --git a/dotfiles/init.vim b/dotfiles/init.vim new file mode 100644 index 0000000..ac36981 --- /dev/null +++ b/dotfiles/init.vim @@ -0,0 +1,222 @@ +call plug#begin(stdpath('data') . '/plugged') +" The default plugin directory will be as follows: +" - Vim (Linux/macOS): '~/.vim/plugged' +" - Vim (Windows): '~/vimfiles/plugged' +" - Neovim (Linux/macOS/Windows): stdpath('data') . '/plugged' +" You can specify a custom plugin directory by passing it as the argument +" - e.g. `call plug#begin('~/.vim/plugged')` +" - Avoid using standard Vim directory names like 'plugin' + +" Make sure you use single quotes + +" Shorthand notation; fetches https://github.com/junegunn/vim-easy-align +Plug 'tpope/vim-sensible' +Plug 'vim-airline/vim-airline' +Plug 'vim-airline/vim-airline-themes' +Plug 'Townk/vim-autoclose' +Plug 'neoclide/coc.nvim', {'branch': 'release'} +"let g:airline_powerline_fonts = 1 + +map j gj +map k gk + +" Initialize plugin system +call plug#end() + +set mouse+=a + +let g:airline_them ='base16_atelier_heath_light' + +set number +set wrap +set linebreak + +" use indents of 4 spaces, and have them copied down lines: +set shiftwidth=2 +set tabstop=2 +set softtabstop=2 +set expandtab +set smarttab +set autoindent +set textwidth=80 +filetype indent off + +" enable filetype detection: +filetype on + +autocmd FileType markdown,tex,text set nosmarttab noautoindent +" for C-like programming, have automatic indentation: +autocmd FileType c,cpp,slang set cindent +" * Keystrokes -- Insert Mode +autocmd Filetype python set shiftwidth=4 tabstop=4 softtabstop=4 + +"Coc Stuff + +set encoding=utf-8 + +" TextEdit might fail if hidden is not set. +set hidden + +" Some servers have issues with backup files, see #649. +set nobackup +set nowritebackup + +" Give more space for displaying messages. +set cmdheight=2 + +" Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable +" delays and poor user experience. +set updatetime=300 + +" Don't pass messages to |ins-completion-menu|. +set shortmess+=c + +" Always show the signcolumn, otherwise it would shift the text each time +" diagnostics appear/become resolved. +if has("nvim-0.5.0") || has("patch-8.1.1564") + " Recently vim can merge signcolumn and number column into one + set signcolumn=number +else + set signcolumn=yes +endif + +" Use tab for trigger completion with characters ahead and navigate. +" NOTE: Use command ':verbose imap ' to make sure tab is not mapped by +" other plugin before putting this into your config. +inoremap + \ pumvisible() ? "\" : + \ check_back_space() ? "\" : + \ coc#refresh() +inoremap pumvisible() ? "\" : "\" + +function! s:check_back_space() abort + let col = col('.') - 1 + return !col || getline('.')[col - 1] =~# '\s' +endfunction + +" Use to trigger completion. +if has('nvim') + inoremap coc#refresh() +else + inoremap coc#refresh() +endif + +" Make auto-select the first completion item and notify coc.nvim to +" format on enter, could be remapped by other vim plugin +inoremap pumvisible() ? coc#_select_confirm() + \: "\u\\=coc#on_enter()\" + +" Use `[g` and `]g` to navigate diagnostics +" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list. +nmap [g (coc-diagnostic-prev) +nmap ]g (coc-diagnostic-next) + +" GoTo code navigation. +nmap gd (coc-definition) +nmap gy (coc-type-definition) +nmap gi (coc-implementation) +nmap gr (coc-references) + +" Use K to show documentation in preview window. +nnoremap K :call show_documentation() + +function! s:show_documentation() + if (index(['vim','help'], &filetype) >= 0) + execute 'h '.expand('') + elseif (coc#rpc#ready()) + call CocActionAsync('doHover') + else + execute '!' . &keywordprg . " " . expand('') + endif +endfunction + +" Highlight the symbol and its references when holding the cursor. +autocmd CursorHold * silent call CocActionAsync('highlight') + +" Symbol renaming. +nmap rn (coc-rename) + +" Formatting selected code. +xmap f (coc-format-selected) +nmap f (coc-format-selected) + +augroup mygroup + autocmd! + " Setup formatexpr specified filetype(s). + autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected') + " Update signature help on jump placeholder. + autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp') +augroup end + +" Applying codeAction to the selected region. +" Example: `aap` for current paragraph +xmap a (coc-codeaction-selected) +nmap a (coc-codeaction-selected) + +" Remap keys for applying codeAction to the current buffer. +nmap ac (coc-codeaction) +" Apply AutoFix to problem on the current line. +nmap qf (coc-fix-current) + +" Run the Code Lens action on the current line. +nmap cl (coc-codelens-action) + +" Map function and class text objects +" NOTE: Requires 'textDocument.documentSymbol' support from the language server. +xmap if (coc-funcobj-i) +omap if (coc-funcobj-i) +xmap af (coc-funcobj-a) +omap af (coc-funcobj-a) +xmap ic (coc-classobj-i) +omap ic (coc-classobj-i) +xmap ac (coc-classobj-a) +omap ac (coc-classobj-a) + +" Remap and for scroll float windows/popups. +if has('nvim-0.4.0') || has('patch-8.2.0750') + nnoremap coc#float#has_scroll() ? coc#float#scroll(1) : "\" + nnoremap coc#float#has_scroll() ? coc#float#scroll(0) : "\" + inoremap coc#float#has_scroll() ? "\=coc#float#scroll(1)\" : "\" + inoremap coc#float#has_scroll() ? "\=coc#float#scroll(0)\" : "\" + vnoremap coc#float#has_scroll() ? coc#float#scroll(1) : "\" + vnoremap coc#float#has_scroll() ? coc#float#scroll(0) : "\" +endif + +" Use CTRL-S for selections ranges. +" Requires 'textDocument/selectionRange' support of language server. +nmap (coc-range-select) +xmap (coc-range-select) + +" Add `:Format` command to format current buffer. +command! -nargs=0 Format :call CocActionAsync('format') + +" Add `:Fold` command to fold current buffer. +command! -nargs=? Fold :call CocAction('fold', ) + +" Add `:OR` command for organize imports of the current buffer. +command! -nargs=0 OR :call CocActionAsync('runCommand', 'editor.action.organizeImport') + +" Add (Neo)Vim's native statusline support. +" NOTE: Please see `:h coc-status` for integrations with external plugins that +" provide custom statusline: lightline.vim, vim-airline. +set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')} + +" Mappings for CoCList +" Show all diagnostics. +nnoremap a :CocList diagnostics +" Manage extensions. +nnoremap e :CocList extensions +" Show commands. +nnoremap c :CocList commands +" Find symbol of current document. +nnoremap o :CocList outline +" Search workspace symbols. +nnoremap s :CocList -I symbols +" Do default action for next item. +nnoremap j :CocNext +" Do default action for previous item. +nnoremap k :CocPrev +" Resume latest coc list. +nnoremap p :CocListResume + +" END Coc diff --git a/dotfiles/kitty.conf b/dotfiles/kitty.conf new file mode 100644 index 0000000..2aa746b --- /dev/null +++ b/dotfiles/kitty.conf @@ -0,0 +1,35 @@ +# vim:ft=conf + +font_family JetBrains Mono +font_size 11.5 + +background_opacity 0.7 +dynamic_background_opacity yes + +window_margin_width 5 +bell_path none +bell_on_tab no + +enable_audio_bell no + +background #2b2c2e +foreground #d2d8d9 +cursor #708183 +selection_background #e3e8ed +color0 #7c8a8f +color8 #888888 +color1 #b23a51 +color9 #f24840 +color2 #789a69 +color10 #80c46f +color3 #b9ab4a +color11 #ffeb62 +color4 #2a7fac +color12 #4095ff +color5 #bc4f5a +color13 #fb5175 +color6 #44a799 +color14 #52ccbd +color7 #d2d8d9 +color15 #d2d8d9 +selection_foreground #2b2c2e diff --git a/dotfiles/polybar/config b/dotfiles/polybar/config new file mode 100644 index 0000000..127abcb --- /dev/null +++ b/dotfiles/polybar/config @@ -0,0 +1,173 @@ +;========================================================== +; +; +; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗ +; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗ +; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝ +; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗ +; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║ +; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ +; +; +; To learn more about how to configure Polybar +; go to https://github.com/polybar/polybar +; +; The README contains a lot of information +; +;========================================================== + +[colors] +background = #222 +background-alt = #444 +;foreground = ${xrdb:color7:#222} +foreground = #dfdfdf +foreground-alt = #555 +primary = #cec0af +secondary = #242e35 +alert = #bd2c40 +black = #000 +white = #fff +grey = #aaa +darkgrey = #555 +red = #f00 +green = #0f0 +blue = #2d02d0 +yellow = #d2b55b + +[bar/main] +modules-center = date +font-0 = Jetbrains Mono:style=Regular +height = 30 +width = 320 +offset-x = 15 + +offset-y = 15 +background = ${colors.primary} +radius=5 +override-redirect=true + +[module/date] +type = internal/date +date = "%h-%d-20%y %r" +label-foreground = #000000 + +[bar/pulse] +modules-center = pulseaudio +height = 30 +width = 200 +offset-y = 15 +#offset-x = 1300 +offset-x = 350 +radius=5 +override-redirect=true +background = ${colors.secondary} +foreground = #fff +font-0 = Jetbrains Mono:style=Regular +font-1 = FontAwesome:style=Regular +font-2 = "Iosevka:pixelsize=12;0" +font-3 = RobotoMono Nerd Font:pixelsize=12;1 + +[module/xworkspaces] +type = internal/xworkspaces + +label-active = %name% +label-active-background = ${colors.background-alt} +label-active-underline= ${colors.primary} +label-active-padding = 1 + +label-occupied = %name% +label-occupied-padding = 1 + +label-urgent = %name% +label-urgent-background = ${colors.alert} +label-urgent-padding = 1 + +label-empty = %name% +label-empty-foreground = ${colors.disabled} +label-empty-padding = 1 + +[module/xwindow] +type = internal/xwindow +label = %title:0:60:...% + +[module/filesystem] +type = internal/fs +interval = 25 + +mount-0 = / + +label-mounted = %{F#F0C674}%mountpoint%%{F-} %percentage_used%% + +label-unmounted = %mountpoint% not mounted +label-unmounted-foreground = ${colors.disabled} + +[module/pulseaudio] +type = internal/pulseaudio + +format-volume-prefix = "VOL " +format-volume-prefix-foreground = ${colors.primary} +format-volume = + +label-volume = %percentage%% + +label-muted = muted +label-muted-foreground = ${colors.disabled} + +[module/xkeyboard] +type = internal/xkeyboard +blacklist-0 = num lock + +label-layout = %layout% +label-layout-foreground = ${colors.primary} + +label-indicator-padding = 2 +label-indicator-margin = 1 +label-indicator-foreground = ${colors.background} +label-indicator-background = ${colors.secondary} + +[module/memory] +type = internal/memory +interval = 2 +format-prefix = "RAM " +format-prefix-foreground = ${colors.primary} +label = %percentage_used:2%% + +[module/cpu] +type = internal/cpu +interval = 2 +format-prefix = "CPU " +format-prefix-foreground = ${colors.primary} +label = %percentage:2%% + +[network-base] +type = internal/network +interval = 5 +format-connected = +format-disconnected = +label-disconnected = %{F#F0C674}%ifname%%{F#707880} disconnected + +[module/wlan] +inherit = network-base +interface-type = wireless +label-connected = %{F#F0C674}%ifname%%{F-} %essid% %local_ip% + +[module/eth] +inherit = network-base +interface-type = wired +label-connected = %{F#F0C674}%ifname%%{F-} %local_ip% + +#[module/date] +#type = internal/date +#interval = 1 + +#date = %H:%M +#date-alt = %Y-%m-%d %H:%M:%S + +#label = %date% +#label-foreground = ${colors.primary} + +[settings] +screenchange-reload = true +pseudo-transparency = true + +; vim:ft=dosini diff --git a/dotfiles/polybar/launch.sh b/dotfiles/polybar/launch.sh new file mode 100755 index 0000000..44df691 --- /dev/null +++ b/dotfiles/polybar/launch.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +#!/bin/bash + +# Terminate already running bar instances +pkill polybar + +# Wait until the processes have been shut down +while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done + +# Launch Polybar, using default config location ~/.config/polybar/config + +polybar main & sleep 0.5 +polybar pulse & + +echo "Polybar launched..." diff --git a/dotfiles/tmux.conf b/dotfiles/tmux.conf new file mode 100644 index 0000000..1e3a362 --- /dev/null +++ b/dotfiles/tmux.conf @@ -0,0 +1,2 @@ +set -sg escape-time 0 +set -g mouse on diff --git a/user_debian.sh b/user_debian.sh new file mode 100755 index 0000000..b40bdb8 --- /dev/null +++ b/user_debian.sh @@ -0,0 +1,162 @@ +#!/bin/sh + +DIR="$(realpath "$(dirname "$0")")" + +# script must start at home directory +cd "$HOME" || exit 1; + +usertest() { + if test "$(id -u)" -eq 0; then + echo "You cannot run this script as root."; + exit 1; + fi + + if ! (type sudo 2>&1) > /dev/null; then + echo "sudo is not installed."; + exit 1 + fi + + sudo apt install -y make curl + echo "Updating APT and adding PPA's" + curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash - + sudo apt update -y || exit 1 + sudo apt upgrade -y || exit 1 +} + +dev() { + echo "Developer tools..." + sudo apt install -y libfuse2 fuse + # install neovim through appimage (no snaps) + sudo curl https://github.com/neovim/neovim/releases/download/v0.6.1/nvim.appimage -LJo "/usr/local/bin/nvim" + sudo chmod +x "/usr/local/bin/nvim" + # install nodejs (coc in neovim) + sudo apt-get update -y && sudo apt-get install -y nodejs +} + + +sysinfo() { + echo "Dylan Araps scripts" + cd "$HOME" || exit 1; + mkdir -p repos + git clone https://github.com/dylanaraps/pfetch "$HOME/repos/pfetch" + git clone https://github.com/dylanaraps/neofetch "$HOME/repos/neofetch" + git clone https://github.com/dylanaraps/fff "$HOME/repos/fff" + + cd "$HOME/repos/pfetch" || exit 1; + sudo make install || exit 2; + cd "$HOME" || exit 1; + + cd "$HOME/repos/neofetch" || exit 1; + sudo make install || exit 2; + cd "$HOME" || exit 1; + + cd "$HOME/repos/fff" || exit 1; + sudo make install || exit 2; + cd "$HOME" || exit 1; +} + +shell() { + sudo apt install -y zsh tmux + curl -sS https://starship.rs/install.sh | sh +} + +browsers() { + sudo apt remove -y firefox + sudo snap remove firefox + # install brave + sudo apt install apt-transport-https -y + sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg + echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main"|sudo tee /etc/apt/sources.list.d/brave-browser-release.list + sudo apt update -y + sudo apt install brave-browser -y +} + +torbrowser() { + sudo apt install -y torbrowser-launcher +} + +popshell() { + mkdir -p "$HOME/repos" + sudo apt install git node-typescript make -y + git clone https://github.com/pop-os/shell.git "$HOME/repos/shell" +} + +meetings() { + mkdir -p "$HOME/repos" + + # install skype + curl https://go.skype.com/skypeforlinux-64.deb -LJo "$HOME/repos/skypeforlinux.deb" + sudo apt install "$HOME/repos/skypeforlinux.deb" -y + + # install zoom + curl https://zoom.us/client/latest/zoom_amd64.deb -LJo "$HOME/repos/zoomus.deb" + sudo apt install "$HOME/repos/zoomus.deb" -y + + # install mt + sudo curl -LJ https://github.com/junikimm717/mt/releases/download/33627ab/mt -o /usr/local/bin/mt + sudo chmod +x /usr/local/bin/mt +} + +# neovim must be installed. +plugins() { + # install vim-plug, oh-my-zsh, and zsh-syntax-highlighting + sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \ + https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' + sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" + git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting" +} + +dotfiles() { + echo "Adding vim and zsh configs" + if ! test -d "$DIR/dotfiles"; then + echo "$DIR/dotfiles folder not found."; + exit 1; + fi + mkdir -p "$HOME/.config/nvim" + cp "$DIR/dotfiles/.zshrc" "$HOME/.zshrc" + cp "$DIR/dotfiles/init.vim" "$HOME/.config/nvim/init.vim" + nvim --headless +PlugInstall +qa + cp "$DIR"/dotfiles/.cwmrc "$DIR/dotfiles/cwm.sh" "$DIR/dotfiles/.xinitrc" "$HOME" + mkdir -p "$HOME/.config/kitty" + cp "$DIR"/dotfiles/kitty.conf "$HOME/.config/kitty/" + cp "$DIR"/dotfiles/tmux.conf "$HOME" + cp "$DIR"/dotfiles/tmux.conf "$HOME" +} + +competitiveprogramming() { + echo "CP Compilers..." + sudo apt install clang clang-tools-extra + cd "$HOME" || exit 1; + git clone https://git.junickim.me/junikimm717/linuxcp "$HOME/cp" +} + +graphical() { + sudo apt install -y xorg xclip cwm nitrogen dmenu kitty polybar + sudo apt install -y fonts-dejavu fonts-jetbrains-mono + # copy over the dotfiles + + mkdir -p "$HOME/wallpaper" +} + +sound() { + sudo apt install -y pulseaudio pipewire pavucontrol + sudo touch /etc/pipewire/media-session.d/with-pulseaudio + sudo cp /usr/share/doc/pipewire/examples/systemd/user/pipewire-pulse.* /etc/systemd/user/ + systemctl --user daemon-reload + systemctl --user --now disable pulseaudio.service pulseaudio.socket + systemctl --user --now enable pipewire pipewire-pulse +} + +(usertest && dev && sysinfo && shell && browsers && meetings && plugins && dotfiles) || exit 1 +(graphical && sound) || exit 1 + +cat <