Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: VSCode colors now sync with changing theme. #1608

Merged
merged 2 commits into from
Sep 15, 2024

Conversation

aryan-212
Copy link
Contributor

Pull Request

Description

Type of change

Please put an x in the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (non-breaking change; modified files are limited to the documentations)
  • Technical debt (a code change that does not fix a bug or add a feature but makes something clearer for devs)
  • Other (provide details below)

Checklist

Please put an x in the boxes that apply:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My commit message follows the commit guidelines.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added a changelog entry.
  • I have added necessary comments/documentation to my code.
  • I have added tests to cover my changes.
  • I have tested my code locally and it works as expected.
  • All new and existing tests .

@aryan-212 aryan-212 changed the title Code colors now sync with changing theme. fix: Code colors now sync with changing theme. Jun 18, 2024
@aryan-212 aryan-212 changed the title fix: Code colors now sync with changing theme. fix: VSCode colors now sync with changing theme. Jun 18, 2024
Copy link
Contributor

@mahaveergurjar mahaveergurjar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't add this type because everyone does not use the ext Dev mod option because this option enables to use single windows not open multiple windows so that's why don't added this type

@kRHYME7
Copy link
Collaborator

kRHYME7 commented Aug 9, 2024

Everyone approving this, Did you guys tried multi window vscode with this?

@aryan-212
Copy link
Contributor Author

Hey so I found out that if I modify the code binary file to:

#!/bin/bash

set -euo pipefail

flags_file="${XDG_CONFIG_HOME:-$HOME/.config}/code-flags.conf"

declare -a codeflags

if [[ -f "${flags_file}" ]]; then
    mapfile -t < "${flags_file}" CODEMAPFILE
fi

for line in "${CODEMAPFILE[@]}"; do
    if [[ ! "${line}" =~ ^[[:space:]]*#.* ]]; then
        codeflags+=("${line}")
    fi
done

name=electron29 
flags_file="${XDG_CONFIG_HOME:-$HOME/.config}/${name}-flags.conf"

declare -a electronflags

if [[ -f "${flags_file}" ]]; then
    mapfile -t < "${flags_file}" ELECTRONMAPFILE
fi

for line in "${ELECTRONMAPFILE[@]}"; do
    if [[ ! "${line}" =~ ^[[:space:]]*#.* ]]; then
        electronflags+=("${line}")
    fi
done

if pgrep -f "/usr/lib/${name}/electron" > /dev/null; then
    ELECTRON_RUN_AS_NODE=1 exec /usr/lib/${name}/electron /usr/lib/code/out/cli.js /usr/lib/code/code.js "$@"
else
    ELECTRON_RUN_AS_NODE=1 exec /usr/lib/${name}/electron /usr/lib/code/out/cli.js "${electronflags[@]}" /usr/lib/code/code.js ${codeflags[@]} "$@"
fi

Multiwindow works

Everyone approving this, Did you guys tried multi window vscode with this?

@aryan-212
Copy link
Contributor Author

@kRHYME7 the above comment

Copy link
Collaborator

@kRHYME7 kRHYME7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kRHYME7 kRHYME7 merged commit a7bda4f into prasanthrangan:main Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants