diff --git a/.zshrc b/.zshrc deleted file mode 100644 index 6747cb9..0000000 --- a/.zshrc +++ /dev/null @@ -1,6 +0,0 @@ - -# Add aliases -source ./scripts/aliases.sh - -# Add pyenv initialization script -source ./scripts/pyenv-config.sh diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..575c077 --- /dev/null +++ b/Makefile @@ -0,0 +1,59 @@ +DOTFILES_DIR := /home/osbm/Documents/dotfiles/src + + +clone: + git clone https://github.com/osbm/rerouting.git ~/Documents/rerouting + git clone https://github.com/osbm/wallpapers.git ~/Pictures/wallpapers + +make-directories: + mkdir -p ~/Pictures/screenshots + mkdir -p ~/Documents/bin + mkdir -p ~/Documents/git + mkdir -p ~/Documents/temp + mkdir -p ~/Videos/obs-recordings + mkdir -p ~/Videos/youtube + + +install-programs-pacman: + sudo pacman -S tmux alacritty trash-cli git git-lfs spectacle unzip docker docker-compose pyenv libreoffice-still obsidian tlrc + +link: + # delete directories if they exist + rm -rf ~/.config/alacritty + rm -rf ~/.config/mpv + rm -rf ~/.config/kitty + + rm -rf ~/.config/fish + # rm -rf ~/.config/obs-studio + rm -rf ~/.config/flameshot + rm -rf ~/.config/nvim + rm -rf ~/.config/fcitx5 + + mkdir -p ~/.config/alacritty + mkdir -p ~/.config/mpv + mkdir -p ~/.config/kitty + mkdir -p ~/.config/flameshot + mkdir -p ~/.config/Code/User + mkdir -p ~/.config/tlrc + + ln -sf $(DOTFILES_DIR)/.config/fish/ ~/.config/fish + # ln -sf $(DOTFILES_DIR)/.config/obs-studio/ ~/.config/obs-studio + ln -sf $(DOTFILES_DIR)/.config/nvim ~/.config/nvim + ln -sf $(DOTFILES_DIR)/.config/fcitx5 ~/.config/fcitx5 + + ln -sf $(DOTFILES_DIR)/.gitconfig ~/.gitconfig + ln -sf $(DOTFILES_DIR)/.gitignore ~/.gitignore + ln -sf $(DOTFILES_DIR)/.ssh/config ~/.ssh/config + ln -sf $(DOTFILES_DIR)/.config/alacritty/alacritty.toml ~/.config/alacritty/alacritty.toml + ln -sf $(DOTFILES_DIR)/.config/mpv/mpv.conf ~/.config/mpv/mpv.conf + ln -sf $(DOTFILES_DIR)/.config/kitty/kitty.conf ~/.config/kitty/kitty.conf + ln -sf $(DOTFILES_DIR)/.config/tmux/tmux.conf ~/.config/tmux/tmux.conf + ln -sf $(DOTFILES_DIR)/.config/flameshot/flameshot.ini ~/.config/flameshot/flameshot.ini + ln -sf $(DOTFILES_DIR)/.config/Code/User/settings.json ~/.config/Code/User/settings.json + ln -sf $(DOTFILES_DIR)/.config/tlrc/config.toml ~/.config/tlrc/config.toml + + + +install-tpm: + git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm + echo "Dont forget to install tmux plugins by 'C-s I'" diff --git a/README.md b/README.md index 01807af..4fc16c8 100644 --- a/README.md +++ b/README.md @@ -1,46 +1,12 @@ -# dotfiles -Restore the settings of +# To Install my configuration: -- [ ] vscode -- [ ] zsh - - [ ] zsh-autosuggestions - - [ ] zsh-syntax-highlighting - - [ ] zsh-prompt -- [ ] vim -- [ ] tmux -- [ ] git -- [ ] rclone +``` +git clone https://github.com/osbm/dotfiles.git ~/Documents/dotfiles +make make-directories # create my default directories +make install-programs-pacman # install used programs +make link # symlink all configs (be careful this deletes/overwrites previous ones) +make install-tpm # install tpm for tmux +make clone # clone my private repositories (obsidian vault and wallpaper folder) +``` -Also I should configure the git -git config --global user.name -git config --global user.email -# after a system install -- [ ] install optimization repository -- [ ] install rclone backup script -- [ ] clone all the repositories that are not archived -- [ ] install these python packages - - [ ] kaggle-cli - - [ ] animdl - - [ ] tensorflow / pytorch / scipy / sklearn -- [ ] install all these programs - - [ ] pyenv - - [ ] discord - - [ ] etcher - - [ ] libreoffice - - [ ] chrome - - [ ] zotero - - [ ] obsidian - - [ ] gitkraken / github desktop - - [ ] zsh - - [ ] ani-cli / animdl - - [ ] vscode - - [ ] docker - - [ ] blender - - [ ] gimp - - [ ] microsoft teams - - [ ] rclone - - [ ] trash (cli) - - [ ] spectacle (screenshot) - - [ ] appimagelauncher for obsidian - diff --git a/dockers/docker-compose.yml b/dockers/docker-compose.yml new file mode 100644 index 0000000..f029ec5 --- /dev/null +++ b/dockers/docker-compose.yml @@ -0,0 +1,24 @@ + +name: docker-builder + + +services: + py12: + image: py12 + build: + context: ./pyenv + args: + PYTHON_VERSION: 3.12.3 + py13: + image: py13 + build: + context: ./pyenv + args: + PYTHON_VERSION: 3.12.3 + yt: + image: yt + build: + context: ./yt + + + \ No newline at end of file diff --git a/dockers/pyenv/Dockerfile b/dockers/pyenv/Dockerfile new file mode 100644 index 0000000..b1a861a --- /dev/null +++ b/dockers/pyenv/Dockerfile @@ -0,0 +1,14 @@ +FROM osbm/pyenv:latest + +ARG PYTHON_VERSION +RUN pyenv install $PYTHON_VERSION +RUN pyenv global $PYTHON_VERSION +RUN pyenv rehash + +RUN pip install --upgrade pip + +# Optional : Checks Pyenv version on container start-up +# ENTRYPOINT [ "pyenv","version" ] +RUN eval "$(pyenv init -)" + +ENTRYPOINT /bin/bash \ No newline at end of file diff --git a/dockers/yt/Dockerfile b/dockers/yt/Dockerfile new file mode 100644 index 0000000..092c6ea --- /dev/null +++ b/dockers/yt/Dockerfile @@ -0,0 +1,14 @@ +FROM ubuntu:22.04 + +RUN apt-get update + +RUN apt-get install -y software-properties-common + +RUN add-apt-repository ppa:tomtomtom/yt-dlp + +RUN apt-get install -y yt-dlp + +WORKDIR /downloads + +ENTRYPOINT ["yt-dlp"] +# docker run -v $(pwd):/downloads yt "https://www.youtube.com/watch?v=wjZofJX0v4M" \ No newline at end of file diff --git a/justfile b/justfile new file mode 100644 index 0000000..f42713b --- /dev/null +++ b/justfile @@ -0,0 +1,76 @@ + +default: + just -l + + +link_file path: + mkdir -p {{home_directory()}}/{{parent_directory(path)}} + rm -rf {{home_directory()}}/{{path}} + ln -sf {{absolute_path(prepend("src/",path))}} {{home_directory()}}/{{path}} + +link-alacritty: (link_file ".config/alacritty/alacritty.toml") + echo "Alacritty configuration linked" + +link-code: (link_file ".config/Code/User/settings.json") + # link_file .config/Code/User/keybindings.json + echo "VSCode configuration linked" + +link-fcitx5: (link_file ".config/fcitx5") + echo "Fcitx5 configuration linked" + +link-flameshot: (link_file ".config/flameshot/flameshot.ini") + echo "Flameshot configuration linked" + +link-kitty: (link_file ".config/kitty/kitty.conf") + echo "Kitty configuration linked" + +link-mpv: (link_file ".config/mpv/mpv.conf") + echo "mpv configuration linked" + +link-neovim: (link_file ".config/nvim") + echo "Neovim configuration linked" + +link-tlrc: (link_file ".config/tlrc/config.toml") + echo "tlrc configuration linked" + +link-tmux: (link_file ".config/tmux/tmux.conf") + echo "Tmux configuration linked" + +link-fish: (link_file ".config/fish") + echo "Fish configuration linked" + +link-git: (link_file ".gitconfig") (link_file ".gitignore") + echo "Git configuration linked" + +link-starship: (link_file ".config/starship.toml") + echo "Starship configuration linked" + +link-zsh: (link_file ".zshrc") (link_file ".zprofile") + echo "Zsh configuration linked" + +link-bash: (link_file ".bashrc") (link_file ".bash_profile") + echo "Bash configuration linked" + +link-terminal-programs: link-alacritty link-kitty link-tmux link-fish link-zsh link-bash link-tlrc link-git link-starship + echo "Terminal programs configuration linked" + +link-all: link-terminal-programs link-code link-fcitx5 link-flameshot link-mpv + echo "All configuration linked" + +clone: + echo "Please be informed that these repositories are private github repositories of osbm." + git clone https://github.com/osbm/rerouting.git ~/Documents/rerouting + git clone https://github.com/osbm/wallpapers.git ~/Pictures/wallpapers + +create-default-folders: + mkdir -p ~/Pictures/screenshots + mkdir -p ~/Documents/bin + mkdir -p ~/Documents/git + mkdir -p ~/Documents/temp + mkdir -p ~/Videos/obs-recordings + mkdir -p ~/Videos/youtube + +install-tpm: + git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm + echo "Dont forget to install tmux plugins by 'C-s I'" + diff --git a/scripts/aliases.sh b/scripts/aliases.sh deleted file mode 100644 index 1c93d88..0000000 --- a/scripts/aliases.sh +++ /dev/null @@ -1,2 +0,0 @@ -# show everything -alias ll="ls -la" diff --git a/scripts/better-git-branch.sh b/scripts/better-git-branch.sh new file mode 100755 index 0000000..0fc003e --- /dev/null +++ b/scripts/better-git-branch.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +# Colors +RED='\033[0;31m' +GREEN='\033[0;32m' +NO_COLOR='\033[0m' +BLUE='\033[0;34m' +YELLOW='\033[0;33m' +NO_COLOR='\033[0m' + +width1=5 +width2=6 +width3=30 +width4=20 +width5=40 + +# Function to count commits +count_commits() { + local branch="$1" + local base_branch="$2" + local ahead_behind + + ahead_behind=$(git rev-list --left-right --count "$base_branch"..."$branch") + echo "$ahead_behind" +} + +# Main script +main_branch=$(git rev-parse HEAD) + +printf "${GREEN}%-${width1}s ${RED}%-${width2}s ${BLUE}%-${width3}s ${YELLOW}%-${width4}s ${NO_COLOR}%-${width5}s\n" "Ahead" "Behind" "Branch" "Last Commit" " " + +# Separator line for clarity +printf "${GREEN}%-${width1}s ${RED}%-${width2}s ${BLUE}%-${width3}s ${YELLOW}%-${width4}s ${NO_COLOR}%-${width5}s\n" "-----" "------" "------------------------------" "-------------------" " " + + +format_string="%(objectname:short)@%(refname:short)@%(committerdate:relative)" +IFS=$'\n' + + +for branchdata in $(git for-each-ref --sort=-authordate --format="$format_string" refs/heads/ --no-merged); do + + sha=$(echo "$branchdata" | cut -d '@' -f1) + branch=$(echo "$branchdata" | cut -d '@' -f2) + time=$(echo "$branchdata" | cut -d '@' -f3) + if [ "$branch" != "$main_branch" ]; then + # Get branch description + description=$(git config branch."$branch".description) + + # Count commits ahead and behind + ahead_behind=$(count_commits "$sha" "$main_branch") + ahead=$(echo "$ahead_behind" | cut -f2) + behind=$(echo "$ahead_behind" | cut -f1) + + # Display branch info + printf "${GREEN}%-${width1}s ${RED}%-${width2}s ${BLUE}%-${width3}s ${YELLOW}%-${width4}s ${NO_COLOR}%-${width5}s\n" $ahead $behind $branch "$time" "$description" + fi +done + diff --git a/scripts/pyenv-config.sh b/scripts/pyenv-config.sh deleted file mode 100644 index 5791174..0000000 --- a/scripts/pyenv-config.sh +++ /dev/null @@ -1,3 +0,0 @@ -export PYENV_ROOT="$HOME/.pyenv" -export PATH="$PYENV_ROOT/bin:$PATH" -eval "$(pyenv init --path)" diff --git a/src/.bashrc b/src/.bashrc new file mode 100644 index 0000000..b6ee6e8 --- /dev/null +++ b/src/.bashrc @@ -0,0 +1 @@ +eval "$(starship init bash)" diff --git a/src/.config/Code/User/settings.json b/src/.config/Code/User/settings.json new file mode 100644 index 0000000..84ed396 --- /dev/null +++ b/src/.config/Code/User/settings.json @@ -0,0 +1,18 @@ +{ + "window.dialogStyle": "custom", + "window.titleBarStyle": "custom", + "git.autofetch": true, + "git.confirmSync": false, + "git.suggestSmartCommit": false, + "explorer.confirmDragAndDrop": false, + "github.copilot.editor.enableAutoCompletions": true, + "extensions.ignoreRecommendations": true, + "terminal.integrated.defaultProfile.linux": "fish", + "workbench.iconTheme": "vscode-icons", + "files.trimTrailingWhitespace": true, + "terminal.integrated.gpuAcceleration": "off", + "update.mode": "none", + "workbench.startupEditor": "none", + "vsicons.dontShowNewVersionMessage": true, + "workbench.colorTheme": "Catppuccin Mocha" +} \ No newline at end of file diff --git a/src/.config/alacritty/alacritty.toml b/src/.config/alacritty/alacritty.toml new file mode 100644 index 0000000..66134a3 --- /dev/null +++ b/src/.config/alacritty/alacritty.toml @@ -0,0 +1,11 @@ +[font] +size = 12.0 + +[terminal.shell] +args = ["new-session", "-A", "-s", "general"] +program = "/run/current-system/sw/bin/tmux" + +[window] +decorations = "None" +opacity = 1 +startup_mode = "Maximized" diff --git a/src/.config/fcitx5/conf/.gitignore b/src/.config/fcitx5/conf/.gitignore new file mode 100644 index 0000000..0591066 --- /dev/null +++ b/src/.config/fcitx5/conf/.gitignore @@ -0,0 +1 @@ +cached_layouts diff --git a/src/.config/fcitx5/conf/mozc.conf b/src/.config/fcitx5/conf/mozc.conf new file mode 100644 index 0000000..16c9eb0 --- /dev/null +++ b/src/.config/fcitx5/conf/mozc.conf @@ -0,0 +1,11 @@ +# Initial Mode +InitialMode=Hiragana +# Vertical candidate list +Vertical=True +# Expand Usage (Requires vertical candidate list) +ExpandMode="On Focus" +# Fix embedded preedit cursor at the beginning of the preedit +PreeditCursorPositionAtBeginning=False +# Hotkey to expand usage +ExpandKey=Control+Alt+H + diff --git a/src/.config/fcitx5/conf/notifications.conf b/src/.config/fcitx5/conf/notifications.conf new file mode 100644 index 0000000..d28bd3b --- /dev/null +++ b/src/.config/fcitx5/conf/notifications.conf @@ -0,0 +1,3 @@ +[HiddenNotifications] +0=wayland-diagnose-kde + diff --git a/src/.config/fcitx5/profile b/src/.config/fcitx5/profile new file mode 100644 index 0000000..1088fcf --- /dev/null +++ b/src/.config/fcitx5/profile @@ -0,0 +1,29 @@ +[Groups/0] +# Group Name +Name=Default +# Layout +Default Layout=us +# Default Input Method +DefaultIM=keyboard-tr + +[Groups/0/Items/0] +# Name +Name=keyboard-us +# Layout +Layout= + +[Groups/0/Items/1] +# Name +Name=keyboard-tr +# Layout +Layout= + +[Groups/0/Items/2] +# Name +Name=mozc +# Layout +Layout= + +[GroupOrder] +0=Default + diff --git a/src/.config/fish/config.fish b/src/.config/fish/config.fish new file mode 100644 index 0000000..dca0236 --- /dev/null +++ b/src/.config/fish/config.fish @@ -0,0 +1,61 @@ +if status is-interactive + # Commands to run in interactive sessions can go here + set -gx PATH /opt/cuda/bin $PATH + set -gx LD_LIBRARY_PATH /opt/cuda/lib64 $LD_LIBRARY_PATH + set -g fish_greeting + set -gx EDITOR "nvim" + + # nnn configuration + # H - show hidden files + # d - detail view + set -x NNN_OPTS Hd + + alias du='du -h' + alias df='df -h' + alias free='free -h' + + alias l="ls -lah" + + alias ve="python -m venv .venv" + alias va="source .venv/bin/activate.fish" + alias pipr="pip install -r requirements.txt" + alias pipu="pip install --upgrade pip" + alias py="ipython" + alias music-download="docker run --rm -v /home/osbm/Music:/downloads yt -x --audio-format mp3" + alias yt="docker run --rm -v /home/osbm/Videos/youtube:/downloads yt" + + alias c="code ." + + # if $TERM is dumb set it to xterm-256color + if test "$TERM" = "dumb" + set -x TERM xterm-256color + end + + + # if type -q pyenv + # pyenv init - | source + # else + # echo "pyenv not found" + # end + + if type -q zoxide + zoxide init fish | source + else + echo "zoxide not found" + end + + if type -q starship + starship init fish | source + else + echo "starship not found" + end + +end + +# >>> conda initialize >>> +# !! Contents within this block are managed by 'conda init' !! +# if test -f /home/osbm/.pyenv/versions/anaconda3-2023.03/bin/conda +# eval /home/osbm/.pyenv/versions/anaconda3-2023.03/bin/conda "shell.fish" "hook" $argv | source +# end +# <<< conda initialize <<< + diff --git a/src/.config/fish/fish_variables b/src/.config/fish/fish_variables new file mode 100644 index 0000000..253a00b --- /dev/null +++ b/src/.config/fish/fish_variables @@ -0,0 +1,38 @@ +# This file contains fish universal variable definitions. +# VERSION: 3.0 +SETUVAR --export PYENV_ROOT:/home/osbm/\x2epyenv +SETUVAR __fish_initialized:3400 +SETUVAR fish_color_autosuggestion:brblack +SETUVAR fish_color_cancel:\x2dr +SETUVAR fish_color_command:blue +SETUVAR fish_color_comment:red +SETUVAR fish_color_cwd:green +SETUVAR fish_color_cwd_root:red +SETUVAR fish_color_end:green +SETUVAR fish_color_error:brred +SETUVAR fish_color_escape:brcyan +SETUVAR fish_color_history_current:\x2d\x2dbold +SETUVAR fish_color_host:normal +SETUVAR fish_color_host_remote:yellow +SETUVAR fish_color_normal:normal +SETUVAR fish_color_operator:brcyan +SETUVAR fish_color_param:cyan +SETUVAR fish_color_quote:yellow +SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold +SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack + +SETUVAR _fish_abbr_za:zoxide\x20add +SETUVAR _fish_abbr_zq:zoxide\x20query +SETUVAR _fish_abbr_zqi:zoxide\x20query\x20\x2di +SETUVAR _fish_abbr_zr:zoxide\x20removeSETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack + +SETUVAR fish_color_status:red +SETUVAR fish_color_user:brgreen +SETUVAR fish_color_valid_path:\x2d\x2dunderline +SETUVAR fish_key_bindings:fish_default_key_bindings +SETUVAR fish_pager_color_completion:normal +SETUVAR fish_pager_color_description:yellow\x1e\x2di +SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline +SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan +SETUVAR fish_pager_color_selected_background:\x2dr +SETUVAR fish_user_paths:/home/osbm/\x2ecargo/bin diff --git a/src/.config/fish/functions/gitu.fish b/src/.config/fish/functions/gitu.fish new file mode 100644 index 0000000..79f229d --- /dev/null +++ b/src/.config/fish/functions/gitu.fish @@ -0,0 +1,5 @@ +function gitu + git add --all + git commit -m "$argv" + git push +end diff --git a/src/.config/flameshot/flameshot.ini b/src/.config/flameshot/flameshot.ini new file mode 100644 index 0000000..7a9b514 --- /dev/null +++ b/src/.config/flameshot/flameshot.ini @@ -0,0 +1,5 @@ +[General] +contrastOpacity=188 +savePath=/home/osbm/Pictures/screenshots +showHelp=false +showStartupLaunchMessage=false diff --git a/src/.config/kitty/kitty.conf b/src/.config/kitty/kitty.conf new file mode 100644 index 0000000..04884ed --- /dev/null +++ b/src/.config/kitty/kitty.conf @@ -0,0 +1,6 @@ +hide_window_decorations yes + +# BEGIN_KITTY_THEME +# Dracula +include current-theme.conf +# END_KITTY_THEME \ No newline at end of file diff --git a/src/.config/mpv/mpv.conf b/src/.config/mpv/mpv.conf new file mode 100644 index 0000000..968dd5d --- /dev/null +++ b/src/.config/mpv/mpv.conf @@ -0,0 +1,2 @@ + +keep-open diff --git a/src/.config/nvim/init.lua b/src/.config/nvim/init.lua new file mode 100644 index 0000000..0c648eb --- /dev/null +++ b/src/.config/nvim/init.lua @@ -0,0 +1,32 @@ +vim.opt.number = true +vim.opt.relativenumber = true + + +vim.schedule(function() + vim.opt.clipboard = 'unnamedplus' +end) + +-- Sets how neovim will display certain whitespace characters in the editor. +-- See `:help 'list'` +-- and `:help 'listchars'` +vim.opt.list = true +vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' } + +vim.g.python_host_prog = "~/Documents/bin/neovim-venv/bin/python" +vim.g.python3_host_prog = "~/Documents/bin/neovim-venv/bin/python" + +require("config.lazy") + +require("mason").setup() +require("mason-lspconfig").setup() + + +local lspconfig = require('lspconfig') +lspconfig.pyright.setup { +} + +require("nvim-tree").setup() + +if vim.fn.argc(-1) == 0 then + vim.cmd("NvimTreeOpen") +end diff --git a/src/.config/nvim/lazy-lock.json b/src/.config/nvim/lazy-lock.json new file mode 100644 index 0000000..21f49e5 --- /dev/null +++ b/src/.config/nvim/lazy-lock.json @@ -0,0 +1,9 @@ +{ + "lazy.nvim": { "branch": "main", "commit": "b97ee167f594c69656f985f919a00435a7bc7045" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "8e46de9241d3997927af12196bd8faa0ed08c29a" }, + "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, + "nvim-lspconfig": { "branch": "master", "commit": "5a812abc65d529ea7673059a348814c21d7f87ff" }, + "nvim-tree.lua": { "branch": "master", "commit": "db8d7ac1f524fc6f808764b29fa695c51e014aa6" }, + "nvim-treesitter": { "branch": "master", "commit": "337b503688eccb3046547661e4c738e674548fcf" }, + "nvim-web-devicons": { "branch": "master", "commit": "87c34abe5d1dc7c1c0a95aaaf888059c614c68ac" } +} diff --git a/src/.config/nvim/lua/config/lazy.lua b/src/.config/nvim/lua/config/lazy.lua new file mode 100644 index 0000000..00f60c0 --- /dev/null +++ b/src/.config/nvim/lua/config/lazy.lua @@ -0,0 +1,59 @@ +-- Bootstrap lazy.nvim +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end +end +vim.opt.rtp:prepend(lazypath) + +-- Make sure to setup `mapleader` and `maplocalleader` before +-- loading lazy.nvim so that mappings are correct. +-- This is also a good place to setup other settings (vim.opt) +vim.g.mapleader = " " +vim.g.maplocalleader = "\\" + +-- Setup lazy.nvim +require("lazy").setup({ + spec = { + -- import your plugins + -- { import = "plugins" }, + { + "williamboman/mason.nvim", + "williamboman/mason-lspconfig.nvim", + "neovim/nvim-lspconfig", + "nvim-tree/nvim-tree.lua", + "nvim-tree/nvim-web-devicons" + }, + {"nvim-treesitter/nvim-treesitter", build = ":TSUpdate"}, + -- { + -- "folke/noice.nvim", + -- event = "VeryLazy", + -- opts = { + -- -- add any options here + -- }, + -- dependencies = { + -- -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries + -- "MunifTanjim/nui.nvim", + -- -- OPTIONAL: + -- -- `nvim-notify` is only needed, if you want to use the notification view. + -- -- If not available, we use `mini` as the fallback + -- "rcarriga/nvim-notify", + -- } + -- } + }, + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = false }, +}) + diff --git a/src/.config/starship.toml b/src/.config/starship.toml new file mode 100644 index 0000000..7c6707c --- /dev/null +++ b/src/.config/starship.toml @@ -0,0 +1,4 @@ +add_newline = false + + + diff --git a/src/.config/tlrc/config.toml b/src/.config/tlrc/config.toml new file mode 100644 index 0000000..7bd57e4 --- /dev/null +++ b/src/.config/tlrc/config.toml @@ -0,0 +1,83 @@ +[cache] +dir = "/home/osbm/.cache/tlrc" +mirror = "https://github.com/tldr-pages/tldr/releases/latest/download" +auto_update = true +max_age = 336 +languages = ["en", "tr", "ja"] + +[output] +show_title = false +platform_title = false +show_hyphens = false +example_prefix = "- " +compact = true +raw_markdown = false + +[indent] +title = 2 +description = 2 +bullet = 2 +example = 4 + +[style.title] +color = "magenta" +background = "default" +bold = true +underline = false +italic = false +dim = false +strikethrough = false + +[style.description] +color = "magenta" +background = "default" +bold = false +underline = false +italic = false +dim = false +strikethrough = false + +[style.bullet] +color = "green" +background = "default" +bold = false +underline = false +italic = false +dim = false +strikethrough = false + +[style.example] +color = "cyan" +background = "default" +bold = false +underline = false +italic = false +dim = false +strikethrough = false + +[style.url] +color = "red" +background = "default" +bold = false +underline = false +italic = true +dim = false +strikethrough = false + +[style.inline_code] +color = "yellow" +background = "default" +bold = false +underline = false +italic = true +dim = false +strikethrough = false + +[style.placeholder] +color = "red" +background = "default" +bold = false +underline = false +italic = true +dim = false +strikethrough = false diff --git a/src/.config/tmux/tmux.conf b/src/.config/tmux/tmux.conf new file mode 100644 index 0000000..024854c --- /dev/null +++ b/src/.config/tmux/tmux.conf @@ -0,0 +1,48 @@ +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' +set -g @plugin 'dracula/tmux' + +if-shell '[ -x /run/current-system/sw/bin/fish ]' \ + 'set-option -g default-shell /run/current-system/sw/bin/fish' \ + 'set-option -g default-shell /usr/bin/fish' +# set-option -g default-shell /run/current-system/sw/bin/fish + + +set -g prefix C-s +set -g @dracula-plugins "cpu-usage ram-usage gpu-usage battery time" +set -g @dracula-show-left-icon hostname +set -g @dracula-git-show-current-symbol ✓ +set -g @dracula-git-no-repo-message "no-git" +set -g @dracula-show-timezone false +set -g @dracula-ignore-lspci true + +# Start windows and panes at 1, not 0 +set -g base-index 1 +setw -g pane-base-index 1 + +set -g mouse on + +# Automatically renumber windows +set -g renumber-windows on + +# Set new panes to open in current directory +bind c new-window -c "#{pane_current_path}" +bind '"' split-window -c "#{pane_current_path}" +bind % split-window -h -c "#{pane_current_path}" + +# from yazi documentation +# https://yazi-rs.github.io/docs/image-preview/ +set -g allow-passthrough on + +set -ga update-environment TERM +set -ga update-environment TERM_PROGRAM + +# set-option -a terminal-features 'XXX:RGB' +# set-option -a terminal-features 'xterm-kitty:RGB' +set-option -a terminal-features 'alacritty:RGB' + + + +# this must be at the bottom for some reason +run '~/.config/tmux/plugins/tpm/tpm' + diff --git a/src/.gitconfig b/src/.gitconfig new file mode 100644 index 0000000..f7d0702 --- /dev/null +++ b/src/.gitconfig @@ -0,0 +1,32 @@ +[user] + name = osbm + email = osmanfbayram@gmail.com +[credential] + helper = store +[core] + pager = cat + editor = nano + excludesFile = ~/.gitignore +[push] + autoSetupRemote = true +[init] + defaultBranch = main +[filter "lfs"] + smudge = git-lfs smudge -- %f + process = git-lfs filter-process + required = true + clean = git-lfs clean -- %f +[alias] + bb = "!/home/osbm/Documents/dotfiles/scripts/better-git-branch.sh" +[column] + ui = auto +[branch] + sort = -committerdate +[maintenance] + repo = /home/osbm/Pictures/wallpapers + repo = /home/osbm/Documents/rerouting + repo = /home/osbm/Documents/dotfiles +[http] + postBuffer = 1048576000 +[https] + postBuffer = 1048576000 diff --git a/src/.gitignore b/src/.gitignore new file mode 100644 index 0000000..d5fec98 --- /dev/null +++ b/src/.gitignore @@ -0,0 +1,2 @@ +.DS_Store +result diff --git a/src/.zprofile b/src/.zprofile new file mode 100644 index 0000000..7dc9e1f --- /dev/null +++ b/src/.zprofile @@ -0,0 +1,5 @@ +# export PYENV_ROOT="$HOME/.pyenv" +# command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" +# eval "$(pyenv init -)" + +# export PATH=~/.npm-global/bin:$PATH diff --git a/src/.zshrc b/src/.zshrc new file mode 100644 index 0000000..c8cd0ea --- /dev/null +++ b/src/.zshrc @@ -0,0 +1,79 @@ + +# --------------- default manjaro zsh config --------------- +# Use powerline +USE_POWERLINE="true" +# Source manjaro-zsh-configuration +if [[ -e /usr/share/zsh/manjaro-zsh-config ]]; then + source /usr/share/zsh/manjaro-zsh-config +fi +# Use manjaro zsh prompt +if [[ -e /usr/share/zsh/manjaro-zsh-prompt ]]; then + source /usr/share/zsh/manjaro-zsh-prompt +fi + +# --------------- Add aliases --------------- + +alias l="ls -lFha" +alias la="ls -a" +alias lt="ls --human-readable --size -1 -S --classify" + +alias fastping="ping -c 100 -i 0.2" +alias gpuname="nvidia-smi --query-gpu=name --format=csv,noheader" + + +alias py="ipython" +alias ve="python -m venv .venv" +alias va="source ./.venv/bin/activate" +alias pipu="pip install --upgrade pip" +alias pipr="pip install -r requirements.txt" + +# human readable sizes +alias free="free -h" +alias df="df -h" +alias du="du -h" + +alias ..="cd .." +alias ...="cd ../.." +alias ....="cd ../../.." + +alias docker-stop="docker stop $(docker ps -a -q)" +alias docker-rm="docker rm $(docker ps -aq)" +alias docker-rmi="docker rmi $(docker images -q)" + +# to set the default editor to nano +FCEDIT=nano + +# to stop autocorrection in z shell +unsetopt correct + +# --------------- pyenv config --------------- +# export PYENV_ROOT="$HOME/.pyenv" +# command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" +# eval "$(pyenv init -)" + +sound() { + # plays sounds in sequence and waits for them to finish + for s in $@; do + paplay $s + done +} + +# source ~/Documents/dotfiles/src/.config/z.sh + +# export CUDA_HOME=/opt/cuda-11.7 +# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/cuda-11.7/lib64 +# export PATH=$PATH:$CUDA_HOME/bin + +# pyenv for java +# export PATH="$HOME/.jenv/bin:$PATH" +# eval "$(jenv init -)" + +# pyenv for node +# export NVM_DIR="$HOME/.nvm" +# [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +# [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion + +# go +# export GOPATH="$HOME/.go" +# export PATH="$PATH:$GOPATH/bin" +