Browse Source

Remoote workstation changes

main
Yigit Colakoglu 3 years ago
parent
commit
30363c4af8
11 changed files with 4189 additions and 1362 deletions
  1. +4156
    -998
      .config/coc/extensions/yarn.lock
  2. +4
    -0
      .config/nvim/plugin/plugins.vim
  3. +6
    -1
      .config/tmux/tmux.conf
  4. +7
    -7
      .config/vim/templates/skeleton.java
  5. +6
    -0
      .config/vim/vimrc
  6. +4
    -4
      .config/zsh/.zshrc
  7. +1
    -0
      .config/zsh/cmds
  8. +5
    -1
      .profile
  9. +0
    -51
      README.md
  10. +0
    -245
      install.sh
  11. +0
    -55
      pkg.list

+ 4156
- 998
.config/coc/extensions/yarn.lock
File diff suppressed because it is too large
View File


+ 4
- 0
.config/nvim/plugin/plugins.vim View File

@ -39,7 +39,11 @@ Plug 'christoomey/vim-tmux-navigator'
" File system navigation
Plug 'junegunn/fzf.vim'
" OCS Yank PLugin for use with Blink Shell
Plug 'ojroques/vim-oscyank'
" Syntax highlighting
Plug 'joelbeedle/pseudo-syntax'
Plug 'rhysd/vim-wasm'
Plug 'elzr/vim-json'
Plug 'tpope/vim-markdown'


+ 6
- 1
.config/tmux/tmux.conf View File

@ -40,9 +40,12 @@ set -g mouse on
# Act like vim in copy mode
set -g status-keys vi
setw -g mode-keys vi
set -g set-clipboard on
set -ag terminal-overrides "vte*:XT:Ms=\\E]52;c;%p2%s\\7,xterm*:XT:Ms=\\E]52;c;%p2%s\\7"
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-selection
bind y run-shell "tmux show-buffer | xclip -sel clip -i" \; display-message "Copied tmux buffer to system clipboard"
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
@ -70,6 +73,8 @@ set -g status-left-length 40
bind b break-pane -d
bind-key j command-prompt -p "join pane from: " "join-pane -h -s '%%'"
set -g default-command zsh
# more intuitive keybindings for splitting
bind \\ split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"


+ 7
- 7
.config/vim/templates/skeleton.java View File

@ -1,10 +1,10 @@
home/home/
home/home/ [:VIM_EVAL:]expand('%:t')[:END_EVAL:]
home/home/ [:VIM_EVAL:]expand('%:p:h:t')[:END_EVAL:]
home/home/
home/home/ Created by Yigit Colakoglu on [:VIM_EVAL:]strftime('%mhome/%dhome/%y')[:END_EVAL:].
home/home/ Copyright [:VIM_EVAL:]strftime('%Y')[:END_EVAL:]. Yigit Colakoglu. All rights reserved.
home/home/
//
// [:VIM_EVAL:]expand('%:t')[:END_EVAL:]
// [:VIM_EVAL:]expand('%:p:h:t')[:END_EVAL:]
//
// Created by Yigit Colakoglu on [:VIM_EVAL:]strftime('%m/%d/%y')[:END_EVAL:].
// Copyright [:VIM_EVAL:]strftime('%Y')[:END_EVAL:]. Yigit Colakoglu. All rights reserved.
//
class Untitled {
public static void main(String[] args) {


+ 6
- 0
.config/vim/vimrc View File

@ -205,6 +205,12 @@ if has('nvim')
let g:Tlist_WinWidth = 40 " Tlist
endif
let hostname = substitute(system('hostname'), '\n', '', '')
if hostname == "workstation" " Check for remote machine
autocmd TextYankPost * if v:event.operator is 'y' && v:event.regname is '' | OSCYankReg " | endif"
set clipboard& clipboard^=unnamed,unnamedplus
endif
" Don't clear clipboard on exit
autocmd VimLeave * call system("xsel -ib", getreg('+'))


+ 4
- 4
.config/zsh/.zshrc View File

@ -5,7 +5,6 @@
## |_| |_____|_____| |_|
## Yeet's zsh configuration
#zmodload zsh/zprof
eval "$(direnv hook zsh)" >> $XDG_RUNTIME_DIR/direnv
#welcome.sh
@ -18,7 +17,6 @@ source ~/.profile
# Created by kuro for 5.8
source <(antibody init)
#Autocompletion
autoload -Uz compinit
if [[ -n $XDG_CACHE_HOME/zsh/zcompdump-$ZSH_VERSION ]]; then
@ -104,8 +102,10 @@ local paste_widgets=(
)
# Use X11 Clipboard
x11-clip-wrap-widgets copy $copy_widgets
x11-clip-wrap-widgets paste $paste_widgets
if command -v xclip; then
x11-clip-wrap-widgets copy $copy_widgets
x11-clip-wrap-widgets paste $paste_widgets
fi
# create a zkbd compatible hash;
# to add other keys to this hash, see: man 5 terminfo


+ 1
- 0
.config/zsh/cmds View File

@ -145,6 +145,7 @@ tmate-unpair() {
fi
}
rawurlencode() {
local string="${1}:$(cat -)"
local strlen=${#string}


+ 5
- 1
.profile View File

@ -94,11 +94,15 @@ case "$(readlink -f /sbin/init)" in
esac
# Setup SSH
if [ ! "$SSH_AUTH_SOCK" ]; then
if [ ! "$SSH_AUTH_SOCK" ] && [ $(hostnamectl hostname) != "workstation" ]; then
eval "$(ssh-agent | head -n 2)"
grep -slR "PRIVATE" ~/.ssh/ | xargs ssh-add > /dev/null 2> /dev/null
fi
if [ $(hostnamectl hostname) = "workstation" ]; then # Server specific setup
ssh-add ~/.ssh/id_skeleton > /dev/null 2> /dev/null
fi
# Start xinit if logged in from tty1
if [ "$DISPLAY" = "" ] && [ "$(tty)" = /dev/tty1 ]; then
if [ "$DBUS_SESSION_BUS_ADDRESS" = "" ] && [ ! $(command -v dbus-run-session) = "" ]; then


+ 0
- 51
README.md View File

@ -1,51 +0,0 @@
# Fr1nge's Dotfiles
Welcome to my dungeon. Here, I keep all my configuration files in case I have a stroke an
d lose all my memory. You're very welcome to explore and use anything in this repository.
Have fun! Another copy of all of this is [here](https://git.yigitcolakoglu.com/yigitcolakoglu/dotfiles).
*For instructions on installattion, see [Installation](#Installation). I highly recommend you follow them.*
## My Setup:
* Arch Linux
* DWM ([dwm-flexipatch](https://github.com/bakkeby/dwm-flexipatch))
* dmenu
* st (simple terminal)
* dunst
* zsh with powerlevel10k and antibody
* tmux
* zathura
* [Material Ocean](https://github.com/material-ocean/) color scheme for pretty much everything
* [Pomme Page](https://github.com/kikiklang/pomme-page)
## Installation
I use bare repositories to track my dotfiles, of course you don't have to do that and you can download and manually link everything you need. But if
you want to use bare repositories as well. I sugggest you clone this repository first and run the following commands.
```sh
git clone --depth 4 --bare https://github.com/<your_username>/dotfiles.git ~/.dotfiles.git
cd ~
alias dots="git --git-dir=$HOME/.dotfiles.git/ --work-tree=$HOME"
dots show main:install.sh | sh
```
This will download everything you need. After that, I have a list of all the packages I have installed on my machine in the directory arch-setup/.
If you have any problems regarding the setup, you should first check whether you have missing packages.
After the clone process, it is pretty straightforward, you can run the `install.sh` script which creates necessary symlinks.
You might want to edit your crontab and the ~/.config/config.env.
## Some eye candy
![Workspace 1](https://minio.yigitcolakoglu.com/screenshots/rice/neofetch.png)
![Workspace 2](https://minio.yigitcolakoglu.com/screenshots/rice/brave.png)
![Workspace 4](https://minio.yigitcolakoglu.com/screenshots/rice/ranger.png)
![neomutt](https://minio.yigitcolakoglu.com/screenshots/rice/mail.png)
## TODOS
* [X] Neomutt further config
* [X] Dwmblocks entry for tracking last mailsync time
* [X] Fix ISO4755 and externalpipe conflict
* [ ] Better documentation (Perhaps an auto-documentation tool written in python?)
* [X] Dmenu for restarting certain processes like dwm, dwmblocks, dunst, mconnect

+ 0
- 245
install.sh View File

@ -1,245 +0,0 @@
#!/bin/bash
alias dots="git --git-dir=\$HOME/.dotfiles.git/ --work-tree=\$HOME"
username=$(whoami)
prev=$(pwd)
verbose=0
while getopts "v" OPTION
do
case $OPTION in
v) verbose=1
;;
*) echo "Only available option is -v" ;;
esac
done
mvie(){
if [ -e "$1" ];then
rm -rf "$2"
mv "$1" "$2"
fi
}
info(){
printf "[\e[32mINFO\e[0m]:%s\n" "$1"
}
debug(){
if [ $verbose ]; then
printf "[\e[33mDEBUG\e[0m]:%s\n" "$1"
fi
}
error(){
printf "[\e[31mERROR\e[0m]:%s\n" "$1"
}
prompt(){
printf "[\e[35mPROMPT\e[0m]: %s" "$1"
read -r ans
printf "%s" "$ans"
}
echo "Running backup of old dotfiles"
IFS="
"
# Backup Previous Dots
info "Backing up your old dotfiles"
## Backup eveything in the git tree
mkdir "$HOME/dots_backup"
for i in $(dots ls-files); do
if [ -f "$i" ]; then
debug "$i"
mkdir -p "$HOME/dots_backup/$(echo "$i" | sed "s/\/[^\/]*$//g")"
mv "$i" "$HOME/dots_backup/$(echo "$i" | sed "s/\/[^\/]*$//g")"
fi
rm -rf "$i"
done
## Theme and Icon Folders
mvie ~/.themes ~/.dotfiles_backup/themes
ln -s ~/.dotfiles/local/share/themes ~/.themes
mvie ~/.icons ~/.dotfiles_backup/icons
ln -s ~/.dotfiles/local/share/icons ~/.icons
info "Checking out dotfiles"
dots checkout
# Configuring for your username
if [ ! "$username" = "yigit" ]; then
info "Replacing the occurences of /home/yigit with /home/$username"
echo "Setting up the dotfiles according to your username"
dots ls-files | xargs -L 1 sed -i "s/\/home\/yigit/\/home\/$username/g"
fi
info "Setting up sudo so that you won't be prompted for a password for the next of the script"
# Don't prompt for a password for the rest of the script
sudo bash -c 'echo "%wheel ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/nopwd'
eval "$(grep -h -- \
"^\s*\(export \)\?\(CARGO_HOME\|GOPATH\|ANDROID_HOME\|FLUTTER_HOME\|LEIN_HOME\|NVM_DIR\|GNUPGHOME\|WEECHAT_HOME\|JUPYTER_CONFIG_DIR\|PYLINTHOME\|XDG_DATA_HOME\|XDG_CONFIG_HOME\|XDG_CACHE_HOME\|_Z_DATA\)=" \
"$HOME/.profile" 2>/dev/null)"
info "Creating relevant directories"
# Create necessary folders
mkdir -p "$HOME/.local/share/ncmpcpp/lyrics"
mkdir -p "$HOME/.local/share/calcurse"
mkdir -p "$CARGO_HOME"
mkdir -p "$GOPATH"
mkdir -p "$ANDROID_HOME"
mkdir -p "$FLUTTER_HOME"
mkdir -p "$LEIN_HOME"
mkdir -p "$NVM_DIR"
mkdir -p "$GNUPGHOME"
mkdir -p "$WEECHAT_HOME"
mkdir -p "$JUPYTER_CONFIG_DIR"
mkdir -p "$PYLINTHOME"
mkdir -p "$HOME/.local/share/zsh"
mkdir -p "$XDG_DATA_HOME/mail"
mkdir -p "$XDG_DATA_HOME/icons"
mkdir -p "$XDG_DATA_HOME/themes"
mkdir -p "$XDG_DATA_HOME/fonts"
mkdir -p "$HOME/.local/backgrounds"
mkdir -p "$XDG_CONFIG_HOME/git"
mkdir -p "$XDG_CACHE_HOME/surf"
mkdir -p "$HOME/.ssh"
chmod 700 "$GNUPGHOME"
touch "$XDG_CONFIG_HOME/git/config"
touch "$_Z_DATA"
info "Copying some necessary files that are not in ~"
IFS="
"
for i in $(cat "$HOME/.local/root/mappings"); do
src="$(echo "$i" | sed "s/ ->.*//g)")"
dest="$(echo "$i" | sed "s/.*-> //g)")"
sudo mkdir -p "$(echo "$dest" | sed "s/\/[^\/]*$//g")"
sudo cp "$HOME/.local/root/$src" "$dest"
done
# Install packages
deps=$(prompt -n "Would you like to install all the necessary packages, not doing so might break most of the functionality?(Y/n): ")
if [ ! "$deps" = "n" ]; then
echo "Running update"
yay -S --needed --noconfirm "$(cat ~/pkg.list)" && exit 1
fi
cp ~/.config/config.env.default ~/.config/config.env
# Downloading assets
##Fonts
info "Downloading assets"
debug "Downloading minio binary"
curl https://minio.yigitcolakoglu.com/dotfiles/tools/mc 2> /dev/null > "$HOME/.local/bin/mc"
chmod +x "$HOME/.local/bin/mc"
alias mc="$HOME/.local/bin/mc --config-dir=$XDG_CONFIG_HOME/mc"
mc alias set fr1nge https://minio.yigitcolakoglu.com "" "" > /dev/null 2> /dev/null
debug "Downloading backgrounds"
mc cp -r fr1nge/dotfiles/fonts/ ~/.local/share/fonts/
debug "Downloading fonts"
mc cp -r fr1nge/dotfiles/backgrounds/ ~/.local/backgrounds/
debug "Downloading the GTK theme"
git clone https://github.com/material-ocean/Gtk-Theme.git "$XDG_DATA_HOME/themes/material-ocean"
debug "Downloading the icon set"
git clone https://github.com/vinceliuice/Tela-icon-theme.git /tmp/tela
fc-cache
# Setup Crontab
if [ ! -f "/var/spool/cron/$username" ]; then
crontab "$HOME/.config/crontab"
else
echo -n "An existing cron file is detected, would you like to overwrite it?(Y/n): "
read -r cron
if [ ! "$cron" = "n" ]; then
crontab -l >> "$HOME/.config/crontab"
crontab "$HOME/.config/crontab"
fi
fi
# Root Files and Directories
if [ "$(grep artix < "$(uname -a)")" = "" ]; then
sudo rc-update add quark
else
sudo systemctl enable quark
sudo systemctl daemon-reload
fi
if [ "$username" = "yigit" ]; then
sh <(curl -s https://yigitcolakoglu.com/fetch_keys.sh)
mkdir -p "$XDG_DATA_HOME/mail/yigitcolakoglu@hotmail.com"
git config --global user.email "yigitcolakoglu@hotmail.com"
git config --global user.name "Yigit Colakoglu"
fi
# Setup for pam-gnupg
cat << EOF | sudo tee -a /etc/pam.d/system-local-login
session optional pam_env.so user_readenv=1
auth optional pam_gnupg.so store-only
session optional pam_gnupg.so
EOF
# Build and Install Everything
## Suckless utilities
info "Installing suckless utilities"
(cd ~/.local/src; ./build.sh > /dev/null 2> /dev/null)
sudo groupadd nogroup
## Tela Icons
info "Installing Icons"
/tmp/tela/install.sh > /dev/null 2> /dev/null
## Start page
info "Setting up start page"
prev=$(pwd)
cd ~/.local/share/startpage
sudo npm install -g parcel-bundler
npm install > /dev/null 2> /dev/null
npm run build > /dev/null 2> /dev/null
cd $prev
# Vim and tmux plugins
mkdir -p ~/.tmux/plugins
vim +PlugInstall +qall
cd ~/.config/coc/extensions
yarn
cd $prev
# Install mconnect
info "Installing mconnect"
git clone https://github.com/theFr1nge/mconnect.git /tmp/mconnect.git > /dev/null 2> /dev/null
cd /tmp/mconnect.git
mkdir -p build
cd build
meson .. > /dev/null 2> /dev/null
ninja > /dev/null 2> /dev/null
sudo ninja install > /dev/null 2> /dev/null
cd $prev
mkdir -p ~/Downloads/mconnect
## Simcrop
info "Installing simcrop"
git clone https://github.com/theFr1nge/simcrop.git /tmp/simcrop > /dev/null 2> /dev/null
cd /tmp/simcrop
sudo make install > /dev/null 2> /dev/null
cd $prev
# Do a cleanup and delete some problematic files
rm -rf ~/.fzf*
rm -rf ~/.bash_profile
rm -rf ~/.dotfiles/yarn.lock
rm -rf ~/.dotfiles/.git/hooks/*
rm -rf ~/install.sh
rm -rf ~/README.md
rm -rf ~/pkg.list
dots update-index --assume-unchanged {pkg.list,install.sh,README.md}
dots config --local status.showUntrackedFiles no
sudo rm -rf /etc/urlview/system.urlview
echo "I am now restarting your system so that the configurations changes apply"
sleep 5
sudo bash -c "rm -rf /etc/sudoers.d/nopwd; reboot"

+ 0
- 55
pkg.list View File

@ -1,55 +0,0 @@
yajl
webkit2gtk
surfraw
fzf
ytfzf
zsh
antibody
direnv
tmux
lf
bitwarden-cli
wallabag-client
spotify-tui
spotifyd-full-git
zathura
notmuch
msmtp
isync
pass
pass-otp
newsboat
pam-gnupg
libgee
calcurse
neomutt
nvim
mpd
mpc
mpc-mpris
libxfixes
libxi
libxt
htop
dunst
mpv-mpris
ncmpcpp
cmake
opencv
xmenu
pacman-contrib
clipmenu
clipnotify
polkit-dumb-agent
feh
imlib2
desktop-file-utils
xdg-utils
hicolor-icon-theme
libexif
libxft
udevil
redshift
python-notify2
python-gobject
gsound

Loading…
Cancel
Save