From 8f207382e964f22799932b786b6665f8e297efe1 Mon Sep 17 00:00:00 2001 From: Menno van Leeuwen Date: Fri, 30 Aug 2024 14:27:02 +0200 Subject: [PATCH] chore: general changes --- bin/actions/update.sh | 7 +++++++ bin/helpers/functions.sh | 18 ------------------ bin/helpers/gnome_extensions.sh | 11 +++++++++-- config/config.yaml | 5 +++++ config/gnome-terminal.dconf | 3 +++ vscode/extensions.json | 2 +- vscode/settings.json | 10 ++++++++++ 7 files changed, 35 insertions(+), 21 deletions(-) diff --git a/bin/actions/update.sh b/bin/actions/update.sh index 0ab5352..e6df8af 100755 --- a/bin/actions/update.sh +++ b/bin/actions/update.sh @@ -172,6 +172,13 @@ extensions() { printfe "%s\n" "cyan" "Ensuring VSCode extensions are installed..." source $HOME/dotfiles/bin/helpers/vscode-extensions.sh ensure_vscode_extensions_installed + + if [ ! -f "$HOME/.local/share/nemo/actions/vscode.nemo_action" ]; then + printfe "%s\n" "cyan" "Ensuring nemo open with VSCode extension is installed..." + wget https://raw.githubusercontent.com/mhsattarian/nemo-open-in-vscode/master/vscode.nemo_action -O $HOME/.local/share/nemo/actions/vscode.nemo_action + else + printfe "%s\n" "green" " - nemo open with VSCode extension is already installed" + fi } #################################################################################################### diff --git a/bin/helpers/functions.sh b/bin/helpers/functions.sh index 6b7204d..7e69487 100755 --- a/bin/helpers/functions.sh +++ b/bin/helpers/functions.sh @@ -12,8 +12,6 @@ logo() { println " " "cyan" tput sgr0 - continue_eitherway=$1 - # Print if repo is dirty and the count of untracked files, modified files and staged files if [[ $(git -C ~/dotfiles status --porcelain) ]]; then printfe "%s" "yellow" "dotfiles repo is dirty " @@ -27,22 +25,6 @@ logo() { printfe "%s" "yellow" "[!] You have $(git -C ~/dotfiles log origin/master..HEAD --oneline | wc -l | tr -d ' ') commit(s) to push" fi println "" "normal" - - if [[ $continue_eitherway == "continue" ]]; then - return - fi - if [[ $(git -C ~/dotfiles status --porcelain) ]]; then - # Continue? - printfe "%s" "red" "Continue anyway? [y/N] " - read -k 1 - - if [[ $REPLY != "y" ]]; then - println "" "normal" - exit 0 - fi - println "" "normal" - println "" "normal" - fi } # print colored with printf (args: format, color, message ...) diff --git a/bin/helpers/gnome_extensions.sh b/bin/helpers/gnome_extensions.sh index 98834d9..8f3cc77 100755 --- a/bin/helpers/gnome_extensions.sh +++ b/bin/helpers/gnome_extensions.sh @@ -3,8 +3,15 @@ source $HOME/dotfiles/bin/helpers/functions.sh ensure_gnome_extensions_installed() { - if ! command -v gnome-extensions &> /dev/null; then - printfe "%s\n" "red" " - gnome-extensions command not found, likely not running GNOME." + # In case gnome-extensions is installed but we don't use GNOME let's do a check + if [ "$XDG_CURRENT_DESKTOP" != "GNOME" ]; then + printfe "%s\n" "red" " - XDG_CURRENT_DESKTOP is not GNOME, likely not running GNOME." + return + fi + + # Attempt to connect to GNOME shell, if it fails, we can stop here + if ! gnome-extensions &> /dev/null; then + printfe "%s\n" "red" " - gnome-extensions command not found, likely not running GNOME?!" return fi diff --git a/config/config.yaml b/config/config.yaml index 0998fb1..67421d8 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -74,6 +74,9 @@ config: resources: shortcut: Alt + Shift + Escape command: flatpak run net.nokyan.Resources + gtile: + shortcut: Super + Tab + command: xdotool key super+g # Commands to run after login startup: @@ -210,3 +213,5 @@ config: - oneko - libaa-bin - libcurses-perl + - clang + - libgtk-3-dev diff --git a/config/gnome-terminal.dconf b/config/gnome-terminal.dconf index 36593d9..88ddb4c 100644 --- a/config/gnome-terminal.dconf +++ b/config/gnome-terminal.dconf @@ -1,3 +1,6 @@ +[legacy/keybindings] +reset-and-clear='k' + [legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9] background-color='rgb(15,20,25)' default-size-columns=120 diff --git a/vscode/extensions.json b/vscode/extensions.json index 24df1f9..02f5732 100644 --- a/vscode/extensions.json +++ b/vscode/extensions.json @@ -1 +1 @@ -["aaron-bond.better-comments","bmewburn.vscode-intelephense-client","christian-kohler.path-intellisense","davidanson.vscode-markdownlint","esbenp.prettier-vscode","foxundermoon.shell-format","github.copilot","github.copilot-chat","github.vscode-pull-request-github","mguellsegarra.highlight-on-copy","ms-azuretools.vscode-docker","ms-vscode-remote.remote-containers","ms-vscode-remote.remote-ssh","ms-vscode-remote.remote-ssh-edit","ms-vscode.makefile-tools","ms-vscode.remote-explorer","ms-vsliveshare.vsliveshare","nicolasvuillamy.vscode-groovy-lint","usernamehw.errorlens","vincaslt.highlight-matching-tag","vscode-icons-team.vscode-icons","warpnet.salt-lint","xdebug.php-debug","xdebug.php-pack","yinfei.luahelper","zobo.php-intellisense"] +["aaron-bond.better-comments","alexisvt.flutter-snippets","bmewburn.vscode-intelephense-client","christian-kohler.path-intellisense","dart-code.dart-code","dart-code.flutter","davidanson.vscode-markdownlint","esbenp.prettier-vscode","foxundermoon.shell-format","github.copilot","github.copilot-chat","github.vscode-pull-request-github","mguellsegarra.highlight-on-copy","ms-azuretools.vscode-docker","ms-vscode-remote.remote-containers","ms-vscode-remote.remote-ssh","ms-vscode-remote.remote-ssh-edit","ms-vscode.makefile-tools","ms-vscode.remote-explorer","ms-vsliveshare.vsliveshare","nicolasvuillamy.vscode-groovy-lint","usernamehw.errorlens","vincaslt.highlight-matching-tag","vscode-icons-team.vscode-icons","warpnet.salt-lint","xdebug.php-debug","xdebug.php-pack","yinfei.luahelper","zobo.php-intellisense"] diff --git a/vscode/settings.json b/vscode/settings.json index dcddea0..e88f76d 100755 --- a/vscode/settings.json +++ b/vscode/settings.json @@ -18,4 +18,14 @@ "editor.defaultFormatter": "esbenp.prettier-vscode" }, "git.openRepositoryInParentFolders": "always", + "debug.internalConsoleOptions": "openOnSessionStart", + "[dart]": { + "editor.formatOnSave": true, + "editor.formatOnType": true, + "editor.rulers": [140], + "editor.selectionHighlight": false, + "editor.tabCompletion": "onlySnippets", + "editor.wordBasedSuggestions": "off", + }, + "makefile.configureOnOpen": false } \ No newline at end of file