From 97a6b663a1945603e9b55228e8540957d03f2a64 Mon Sep 17 00:00:00 2001 From: srdusr Date: Wed, 24 Sep 2025 02:23:50 +0200 Subject: Moved files to common/ --- common/.bash_profile | 11 +++++ common/.editorconfig | 80 +++++++++++++++++++++++++++++++ common/.face | Bin 0 -> 11569 bytes common/.gitconfig | 34 +++++++++++++ common/.gitignore | 44 +++++++++++++++++ common/.gitmodules | 12 +++++ common/.gitsubtrees | 7 +++ common/.prettierrc.yml | 5 ++ common/.profile | 18 +++++++ common/.zprofile | 3 ++ linux/home/.editorconfig | 76 ----------------------------- linux/home/.face | Bin 11569 -> 0 bytes linux/home/.gitconfig | 32 ------------- linux/home/.github/workflows/release.yml | 59 ----------------------- linux/home/.gitignore | 56 ---------------------- linux/home/.gitmodules | 12 ----- linux/home/.gitsubtrees | 8 ---- linux/home/.prettierrc.yml | 5 -- linux/home/.profile | 16 ------- linux/home/.zprofile | 3 -- 20 files changed, 214 insertions(+), 267 deletions(-) create mode 100644 common/.bash_profile create mode 100644 common/.editorconfig create mode 100644 common/.face create mode 100644 common/.gitconfig create mode 100644 common/.gitignore create mode 100644 common/.gitmodules create mode 100644 common/.gitsubtrees create mode 100644 common/.prettierrc.yml create mode 100644 common/.profile create mode 100644 common/.zprofile delete mode 100644 linux/home/.editorconfig delete mode 100644 linux/home/.face delete mode 100644 linux/home/.gitconfig delete mode 100644 linux/home/.github/workflows/release.yml delete mode 100644 linux/home/.gitignore delete mode 100644 linux/home/.gitmodules delete mode 100644 linux/home/.gitsubtrees delete mode 100644 linux/home/.prettierrc.yml delete mode 100644 linux/home/.profile delete mode 100644 linux/home/.zprofile diff --git a/common/.bash_profile b/common/.bash_profile new file mode 100644 index 0000000..f6c3ee4 --- /dev/null +++ b/common/.bash_profile @@ -0,0 +1,11 @@ +# ~/.bash_profile + +# Source ~/.profile if it exists (environment variables) +if [ -f "$HOME/.profile" ]; then + . "$HOME/.profile" +fi + +# Source ~/.bashrc for interactive settings (aliases, prompt, etc.) +if [ -f "$HOME/.bashrc" ]; then + . "$HOME/.bashrc" +fi diff --git a/common/.editorconfig b/common/.editorconfig new file mode 100644 index 0000000..22f30d4 --- /dev/null +++ b/common/.editorconfig @@ -0,0 +1,80 @@ + +root = true + + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = space +indent_size = 2 +max_line_length = 10000 + +# Makefile-specific settings +[Makefile] +indent_style = tab +indent_size = 4 + +# C/C++ source files +[*.c] +indent_style = tab +indent_size = 4 + +# TypeScript/JavaScript config +[**.{ts,js}] +indent_size = 2 + +# Json config +[**.json] +indent_size = 2 + +# Lua config +[*.lua] +indent_size = 2 +tab_width = 2 +# [none/single/double] +quote_style = double +# [line break] +break_all_list_when_line_exceed = false +auto_collapse_lines = false +break_before_braces = false +# [preference] +ignore_space_after_colon = false +remove_call_expression_list_finish_comma = false +end_statement_with_semicolon = keep + +# Python config +[*.py] +indent_size = 4 + +# Shell config +[*.sh] +indent_size = 4 + +# Bash config +[*.bash] +indent_size = 4 + +# Yaml config +[*.yml] +indent_size = 2 + +# Latex config +[**.tex] +trim_trailing_whitespace = false + +# Markdown config +[**.md] +indent_size = 2 +trim_trailing_whitespace = false + +# Textfile config +[**.txt] +trim_trailing_whitespace = false +insert_final_newline = false + +# Snippets config +[**.snippets] +indent_style = tab + diff --git a/common/.face b/common/.face new file mode 100644 index 0000000..3aafd06 Binary files /dev/null and b/common/.face differ diff --git a/common/.gitconfig b/common/.gitconfig new file mode 100644 index 0000000..2c0d5ef --- /dev/null +++ b/common/.gitconfig @@ -0,0 +1,34 @@ +[user] + name = + email = + +[init] + defaultBranch = main + +[color] + ui = true + +[alias] + graph = log --oneline --graph --decorate + ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate + ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat + lds = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short + conflicts = diff --name-only --diff-filter=U + local-branches = !git branch -vv | cut -c 3- | awk '$3 !~/\\[/ { print $1 }' + recent-branches = !git branch --sort=-committerdate | head + authors = !git log --format='%aN <%aE>' | grep -v 'users.noreply.github.com' | sort -u --ignore-case + sba ="!f() { git subtree add --prefix $2 $1 main; }; f" + sbu ="!f() { git subtree pull --prefix $2 $1 main; }; f" + stashrebase = "!f() { if [ \"$(git symbolic-ref --short HEAD)\" = \"main\" ]; then git stash save && git fetch && git rebase origin main && git stash apply; else git stash save && git fetch && git rebase origin master && git stash apply; fi; }; f" + dotfiles = "!f() { git --git-dir=$HOME/.cfg --work-tree=$HOME stashrebase; }; f" + + +[credential "https://github.com"] + helper = + helper = !sh -c 'command -v gh >/dev/null 2>&1 && exec gh auth git-credential || exit 0' + +[credential "https://gist.github.com"] + helper = + helper = !sh -c 'command -v gh >/dev/null 2>&1 && exec gh auth git-credential || exit 0' +[credential] + helper = cache diff --git a/common/.gitignore b/common/.gitignore new file mode 100644 index 0000000..9c9bef7 --- /dev/null +++ b/common/.gitignore @@ -0,0 +1,44 @@ +# Ignore .git directory +.git/ + +# Ignore git config +.gitconfig + +# Ignore Packer's compiled files +packer_compiled.lua + +# Ignore Zsh plugins directory +~/.config/zsh/plugins + +# Ignore zcompdump files +zcompdump + +# Ignore .DS_Store files (macOS) +*.DS_Store + +# Ignore .spl files +*.spl + +# Ignore node_modules directory +node_modules/ + +# Ignore .zip files +*.zip + +# Ignore .pxd files +*.pxd + +# Ignore .cache directory +^.cache/ + +# Ignore normal directories +^downloads/ +^music/ +^images/ +^pictures/ +^videos/ +^virt/ + +# Ignore dotfiles dir +~/.cfg +.cfg diff --git a/common/.gitmodules b/common/.gitmodules new file mode 100644 index 0000000..37da2b9 --- /dev/null +++ b/common/.gitmodules @@ -0,0 +1,12 @@ +[submodule ".vim/pack/plugins/start/vim-tmux-navigator"] + path = .vim/pack/plugins/start/vim-tmux-navigator + url = https://github.com/christoomey/vim-tmux-navigator.git +[submodule "zsh/plugins/zsh-you-should-use"] + path = .config/zsh/plugins/zsh-you-should-use + url = git@github.com:MichaelAquilina/zsh-you-should-use.git +[submodule "zsh/plugins/zsh-syntax-highlighting"] + path = .config/zsh/plugins/zsh-syntax-highlighting + url = git@github.com:zsh-users/zsh-syntax-highlighting.git +[submodule "zsh/plugins/zsh-syntax-highlighting"] + path = .config/zsh/plugins/zsh-autosuggestions + url = git@github.com:zsh-users/zsh-autosuggestions.git diff --git a/common/.gitsubtrees b/common/.gitsubtrees new file mode 100644 index 0000000..d8a7f29 --- /dev/null +++ b/common/.gitsubtrees @@ -0,0 +1,7 @@ +[subtree "common/config/nvim"] + path = common/config/nvim + url = git@github.com:srdusr/nvim.git + +[subtree "common/scripts"] + path = common/scripts + url = git@github.com:srdusr/scripts.git diff --git a/common/.prettierrc.yml b/common/.prettierrc.yml new file mode 100644 index 0000000..c5d13e2 --- /dev/null +++ b/common/.prettierrc.yml @@ -0,0 +1,5 @@ +semi: true +singleQuote: true +jsxSingleQuote: true +trailingComma: all +arrowParens: avoid diff --git a/common/.profile b/common/.profile new file mode 100644 index 0000000..b710f29 --- /dev/null +++ b/common/.profile @@ -0,0 +1,18 @@ +#!/bin/bash + +export EDITOR="$(command -v nvim || command -v vim || echo nano)" + +#if [ "$(tty)" = "/dev/tty1" -a -z "$(printenv HYPRLAND_INSTANCE_SIGNATURE)" ]; then +if [ "$DISPLAY" = "" ] && [ "$XDG_VTNR" -eq 1 ]; then + exec ~/.scripts/env/linux/autorun/session_manager.sh +fi + +load_zsh_env() { + if [ "$ZSH_VERSION" != "" ]; then + if [ -f ~/.config/zsh/.zshenv ]; then + . ~/.config/zsh/.zshenv + fi + fi +} + +load_zsh_env diff --git a/common/.zprofile b/common/.zprofile new file mode 100644 index 0000000..dafce71 --- /dev/null +++ b/common/.zprofile @@ -0,0 +1,3 @@ +emulate sh -c '. ~/.profile' +#[[ -f ~/.config/zsh/.zshenv ]] && . ~/.config/zsh/.zshenv +#[[ -f ~/.profile ]] && . ~/.profile diff --git a/linux/home/.editorconfig b/linux/home/.editorconfig deleted file mode 100644 index b76ecee..0000000 --- a/linux/home/.editorconfig +++ /dev/null @@ -1,76 +0,0 @@ - -root = true - - -[*] -charset = utf-8 -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true -indent_style = space -indent_size = 4 -max_line_length = 10000 - -# Makefile-specific settings -[Makefile] -indent_style = tab -indent_size = 4 - -# C/C++ source files -[*.c] -indent_style = tab -indent_size = 4 - -# TypeScript/JavaScript config -[**.{ts,js}] -indent_size = 2 - -# Json config -[**.json] -indent_size = 2 - -# Lua config -[*.lua] -indent_size = 2 -tab_width = 2 -# [none/single/double] -quote_style = double -# [line break] -break_all_list_when_line_exceed = false -auto_collapse_lines = false -break_before_braces = false -# [preference] -ignore_space_after_colon = false -remove_call_expression_list_finish_comma = false -end_statement_with_semicolon = keep - -# Python config -[*.py] -indent_size = 4 - -# Bash config -[*.bash] -indent_size = 4 - -# Yaml config -[*.yml] -indent_size = 2 - -# Latex config -[**.tex] -trim_trailing_whitespace = false - -# Markdown config -[**.md] -indent_size = 2 -trim_trailing_whitespace = false - -# Textfile config -[**.txt] -trim_trailing_whitespace = false -insert_final_newline = false - -# Snippets config -[**.snippets] -indent_style = tab - diff --git a/linux/home/.face b/linux/home/.face deleted file mode 100644 index 3aafd06..0000000 Binary files a/linux/home/.face and /dev/null differ diff --git a/linux/home/.gitconfig b/linux/home/.gitconfig deleted file mode 100644 index c54adec..0000000 --- a/linux/home/.gitconfig +++ /dev/null @@ -1,32 +0,0 @@ -[user] - name = - email = - -[init] - defaultBranch = main - -[color] - ui = true - -[alias] - graph = log --oneline --graph --decorate - ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate - ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat - lds = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short - conflicts = diff --name-only --diff-filter=U - local-branches = !git branch -vv | cut -c 3- | awk '$3 !~/\\[/ { print $1 }' - recent-branches = !git branch --sort=-committerdate | head - authors = !git log --format='%aN <%aE>' | grep -v 'users.noreply.github.com' | sort -u --ignore-case - sba ="!f() { git subtree add --prefix $2 $1 main; }; f" - sbu ="!f() { git subtree pull --prefix $2 $1 main; }; f" - stashrebase = "!f() { if [ \"$(git symbolic-ref --short HEAD)\" = \"main\" ]; then git stash save && git fetch && git rebase origin main && git stash apply; else git stash save && git fetch && git rebase origin master && git stash apply; fi; }; f" - dotfiles = "!f() { git --git-dir=$HOME/.cfg --work-tree=$HOME stashrebase; }; f" - - -[credential "https://github.com"] - helper = - helper = !sh -c 'command -v gh >/dev/null 2>&1 && exec gh auth git-credential || exit 0' - -[credential "https://gist.github.com"] - helper = - helper = !sh -c 'command -v gh >/dev/null 2>&1 && exec gh auth git-credential || exit 0' diff --git a/linux/home/.github/workflows/release.yml b/linux/home/.github/workflows/release.yml deleted file mode 100644 index 0dcf439..0000000 --- a/linux/home/.github/workflows/release.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: Create Release - -on: - push: - tags: - - 'v*' # This triggers the workflow on version tags - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Download dotfiles zip - run: | - mkdir -p $HOME/temp-dotfiles - cd $HOME/temp-dotfiles - echo "Downloading dotfiles-main.zip..." - curl -LOk https://github.com/srdusr/dotfiles/archive/main.zip - ls -lh main.zip # Log file size - unzip main.zip -d dotfiles-main - mv dotfiles-main/dotfiles-main dotfiles - ls -lh dotfiles # Log extracted files - - - name: Create zip file - run: | - cd $HOME/temp-dotfiles - zip -r dotfiles.zip dotfiles - - - name: Move zip file to home directory - run: | - mv /home/runner/temp-dotfiles/dotfiles.zip /home/runner/dotfiles.zip - ls -lh $HOME/dotfiles.zip # Verify existence after move (optional) - - - name: Clean up - run: | - rm -rf $HOME/temp-dotfiles - echo $HOME - - - name: Create GitHub Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - body: Automatically generated release - draft: false - prerelease: false - - - name: Upload zip to release - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: /home/runner/dotfiles.zip - asset_name: dotfiles.zip - asset_content_type: application/zip diff --git a/linux/home/.gitignore b/linux/home/.gitignore deleted file mode 100644 index 0a635f8..0000000 --- a/linux/home/.gitignore +++ /dev/null @@ -1,56 +0,0 @@ -# Ignore .git directory -.git/ - -# Ignore git config -.gitconfig - -# Ignore dotfiles dir -.cfg - -# Ignore Packer's compiled files -packer_compiled.lua - -# Ignore Zsh plugins directory -~/.config/zsh/plugins - -# Ignore zcompdump files -zcompdump - -# Ignore .DS_Store files (macOS) -*.DS_Store - -# Ignore .spl files -*.spl - -# Ignore node_modules directory -node_modules/ - -## Ignore .png files -#*.png - -# Ignore .zip files -*.zip - -# Ignore .pxd files -*.pxd - -# Ignore .local directory -#^.local/ - -# Ignore .cache directory -^.cache/ - -# Ignore downloads directory -^downloads/ - -# Ignore music directory -^music/ - -# Ignore pictures/images directory -^images/ -^pictures/ - -# Ignore virtual machine directory -^virt/ - -.cfg diff --git a/linux/home/.gitmodules b/linux/home/.gitmodules deleted file mode 100644 index 37da2b9..0000000 --- a/linux/home/.gitmodules +++ /dev/null @@ -1,12 +0,0 @@ -[submodule ".vim/pack/plugins/start/vim-tmux-navigator"] - path = .vim/pack/plugins/start/vim-tmux-navigator - url = https://github.com/christoomey/vim-tmux-navigator.git -[submodule "zsh/plugins/zsh-you-should-use"] - path = .config/zsh/plugins/zsh-you-should-use - url = git@github.com:MichaelAquilina/zsh-you-should-use.git -[submodule "zsh/plugins/zsh-syntax-highlighting"] - path = .config/zsh/plugins/zsh-syntax-highlighting - url = git@github.com:zsh-users/zsh-syntax-highlighting.git -[submodule "zsh/plugins/zsh-syntax-highlighting"] - path = .config/zsh/plugins/zsh-autosuggestions - url = git@github.com:zsh-users/zsh-autosuggestions.git diff --git a/linux/home/.gitsubtrees b/linux/home/.gitsubtrees deleted file mode 100644 index dd055cf..0000000 --- a/linux/home/.gitsubtrees +++ /dev/null @@ -1,8 +0,0 @@ -[subtree ".config/nvim"] - path = .config/nvim - url = git@github.com:srdusr/nvim.git - -[subtree ".scripts"] - path = .scripts - url = git@github.com:srdusr/scripts.git - diff --git a/linux/home/.prettierrc.yml b/linux/home/.prettierrc.yml deleted file mode 100644 index c5d13e2..0000000 --- a/linux/home/.prettierrc.yml +++ /dev/null @@ -1,5 +0,0 @@ -semi: true -singleQuote: true -jsxSingleQuote: true -trailingComma: all -arrowParens: avoid diff --git a/linux/home/.profile b/linux/home/.profile deleted file mode 100644 index 623fbb0..0000000 --- a/linux/home/.profile +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -#if [ "$(tty)" = "/dev/tty1" -a -z "$(printenv HYPRLAND_INSTANCE_SIGNATURE)" ]; then -if [ "$DISPLAY" = "" ] && [ "$XDG_VTNR" -eq 1 ]; then - exec ~/.scripts/session_manager.sh -fi - -load_zsh_env() { - if [ "$ZSH_VERSION" != "" ]; then - if [ -f ~/.config/zsh/.zshenv ]; then - . ~/.config/zsh/.zshenv - fi - fi -} - -load_zsh_env diff --git a/linux/home/.zprofile b/linux/home/.zprofile deleted file mode 100644 index dafce71..0000000 --- a/linux/home/.zprofile +++ /dev/null @@ -1,3 +0,0 @@ -emulate sh -c '. ~/.profile' -#[[ -f ~/.config/zsh/.zshenv ]] && . ~/.config/zsh/.zshenv -#[[ -f ~/.profile ]] && . ~/.profile -- cgit v1.2.3