mlvzk / discocss Goto Github PK
View Code? Open in Web Editor NEWA tiny Discord css-injector for Linux and MacOS.
License: Mozilla Public License 2.0
A tiny Discord css-injector for Linux and MacOS.
License: Mozilla Public License 2.0
Hi there,
It doesn't seem like my CSS injection is working and as far as I can see, this isn't to do with my system or my config as it was working earlier before the package updated (AUR). This is happening on both of my Arch machines.
Edit: This is also happening from the script cloned directly from this repo.
I ran discocss
in the terminal and this was the output:
/usr/bin/discord
Discord 0.0.15
Starting app.
Starting updater.
[Modules] Modules initializing
[Modules] Distribution: remote
[Modules] Host updates: enabled
[Modules] Module updates: enabled
[Modules] Module install path: /home/hisbaan/.config/discord/0.0.15/modules
[Modules] Module installed file path: /home/hisbaan/.config/discord/0.0.15/modules/installed.json
[Modules] Module download path: /home/hisbaan/.config/discord/0.0.15/modules/pending
libva error: /usr/lib/dri/i965_drv_video.so init failed
[Modules] No updates to install
[Modules] Checking for host updates.
[Modules] Host is up to date.
[Modules] Checking for module updates at https://discord.com/api/modules/stable/versions.json
[Modules] No module updates available.
The following is my config file:
/* start flavours */
:root {
--base00: #1e2127;
--base01: #282c34;
--base02: #353b45;
--base03: #3e4451;
--base04: #545862;
--base05: #abb2bf;
--base06: #b6bdca;
--base07: #d9dde5;
--base08: #e06c75;
--base09: #d19a66;
--base0A: #e5c07b;
--base0B: #98c379;
--base0C: #56b6c2;
--base0D: #62afef;
--base0E: #bd93f9;
--base0F: #be5046;
--base00-rgb: 30, 33, 39;
--base01-rgb: 40, 44, 52;
--base02-rgb: 53, 59, 69;
--base03-rgb: 62, 68, 81;
--base04-rgb: 84, 88, 98;
--base05-rgb: 171, 178, 191;
--base06-rgb: 182, 189, 202;
--base07-rgb: 217, 221, 229;
--base08-rgb: 224, 108, 117;
--base09-rgb: 209, 154, 102;
--base0A-rgb: 229, 192, 123;
--base0B-rgb: 152, 195, 121;
--base0C-rgb: 86, 182, 194;
--base0D-rgb: 98, 175, 239;
--base0E-rgb: 189, 147, 249;
--base0F-rgb: 190, 80, 70;
--base00-r: 30;
--base00-g: 33;
--base00-b: 39;
--base01-r: 40;
--base01-g: 44;
--base01-b: 52;
--base02-r: 53;
--base02-g: 59;
--base02-b: 69;
--base03-r: 62;
--base03-g: 68;
--base03-b: 81;
--base04-r: 84;
--base04-g: 88;
--base04-b: 98;
--base05-r: 171;
--base05-g: 178;
--base05-b: 191;
--base06-r: 182;
--base06-g: 189;
--base06-b: 202;
--base07-r: 217;
--base07-g: 221;
--base07-b: 229;
--base08-r: 224;
--base08-g: 108;
--base08-b: 117;
--base09-r: 209;
--base09-g: 154;
--base09-b: 102;
--base0A-r: 229;
--base0A-g: 192;
--base0A-b: 123;
--base0B-r: 152;
--base0B-g: 195;
--base0B-b: 121;
--base0C-r: 86;
--base0C-g: 182;
--base0C-b: 194;
--base0D-r: 98;
--base0D-g: 175;
--base0D-b: 239;
--base0E-r: 189;
--base0E-g: 147;
--base0E-b: 249;
--base0F-r: 190;
--base0F-g: 80;
--base0F-b: 70;
}
/* end flavours */
.theme-dark {
--header-primary: var(--base06);
--header-secondary: var(--base05);
--text-normal: var(--base07);
--text-muted: var(--base05);
--text-link: var(--base0E);
--channels-default: var(--base05);
--interactive-normal: var(--base05);
--interactive-hover: var(--base06);
--interactive-active: var(--base05);
--interactive-muted: var(--base01);
--background-primary: var(--base00);
--background-secondary: var(--base01);
--background-secondary-alt: var(--base01);
--background-tertiary: var(--base01);
--background-accent: var(--base01);
--background-floating: var(--base00);
--background-mobile-primary: var(--background-primary);
--background-mobile-secondary: var(--background-secondary);
--background-modifier-hover: rgba(var(--base00-rgb),0.5);
--background-modifier-active: rgba(var(--base00-rgb),0.9);
--background-modifier-selected: rgba(var(--base00-rgb),0.9);
--background-modifier-accent: hsla(0,0%,100%,0.06);
--background-mentioned: rgba(var(--base09-rgb), 0.05);
--background-mentioned-hover: rgba(var(--base09-rgb),0.08);
--background-message-hover: rgba(4,4,5,0.07);
--background-help-warning: rgba(var(--base09-rgb),0.1);
--background-help-info: rgba(0,176,244,0.1);
--scrollbar-thin-thumb: var(--base00);
--scrollbar-thin-track: transparent;
--scrollbar-auto-thumb: var(--base01);
--scrollbar-auto-track: var(--base00);
--scrollbar-auto-scrollbar-color-thumb: var(--base01);
--scrollbar-auto-scrollbar-color-track: var(--base00);
/* --elevation-stroke: 0 0 0 1px rgba(4,4,5,0.15); */
/* --elevation-low: 0 1px 0 rgba(4,4,5,0.2),0 1.5px 0 rgba(6,6,7,0.05),0 2px 0 rgba(4,4,5,0.05); */
/* --elevation-medium: 0 4px 4px rgba(0,0,0,0.16); */
/* --elevation-high: 0 8px 16px rgba(0,0,0,0.24); */
--elevation-stroke: 0 0 0 1px rgba(4,4,5,0.15);
--elevation-low: 0 0 0 rgba(4,4,5,0.2),0 0 0 rgba(6,6,7,0.05),0 0 0 rgba(4,4,5,0.05);
--elevation-medium: 0 4px 4px rgba(0,0,0,0.16);
--elevation-high: 0 8px 16px rgba(0,0,0,0.24);
--logo-primary: var(--base07);
--focus-primary: var(--base0E);
--radio-group-dot-foreground: #8ea1e1;
--guild-header-text-shadow: 0 1px 1px rgba(0,0,0,0.4);
--channeltextarea-background: var(--base01);
--activity-card-background: var(--base01);
--textbox-markdown-syntax: var(--base05);
/* --deprecated-card-bg: rgba(32,34,37,0.6); */
/* --deprecated-card-editable-bg: rgba(32,34,37,0.3); */
--deprecated-store-bg: var(--base00);
/* --deprecated-quickswitcher-input-background: #72767d; */
/* --deprecated-quickswitcher-input-placeholder: hsla(0,0%,100%,0.3); */
/* --deprecated-text-input-bg: rgba(0,0,0,0.1); */
/* --deprecated-text-input-border: rgba(0,0,0,0.3); */
/* --deprecated-text-input-border-hover: #040405; */
/* --deprecated-text-input-border-disabled: #202225; */
/* --deprecated-text-input-prefix: #dcddde; */
}
Thanks in advance for any help :)
Title says it all, discocss-preload.js is under the /tmp/ directory, making me rerun discocss every damn login if I even wanna launch discord. It gives an Error of unknown directory when looking up for the file in /tmp/ if I try running discord without discocss running first.
Hey are you able to upstream the home-manager module?
Any of discord launch arguments (ex. --start-minimized
) not working on discocss
discocss doesn't have its own parameters, so why not do this?
command -v discord && exec discord $*
command -v Discord && exec Discord $*
replace the if [ ! -f ] with a [ -f ] ||
Discord continues to require hook ins from discocss even after a re-install of discord.
What's the procedure for fully removing this project and discords dependency on it?
I'm trying to run discocss
from different users in my system simultaneously. Whoever runs it first is fine but whoever is second gets the error:
ln: failed to create symbolic link '/tmp/discocss-preload.js': Operation not permitted
The file inside /tmp/ could be named using date +%s
to create a unique name for example:
TMP_LINK="/tmp/discocss-preload-$(date +%s).js"
If there's an issue with the link inside /tmp changing name each time discocss is rerun at least it could have a unique name per each user with something like:
TMP_LINK="/tmp/discocss-preload-${USER}.js"
Support for discord installed from flatpak.
Would be nice, if you add flag or priority detection of any Discord versions
Hi,
I enable a settings module using home-manager on NixOS with the following config:
{ config, ... }:
# Discocss discord css injector theme
{
programs.discocss = {
enable = true;
discordAlias = true; # Whether to alias discocss to discord.
css = let inherit (config.colorscheme) colors; in /* css */ ''
.theme-light {
--background-primary: #${colors.base00}88;
--background-primary-alt: #${colors.base01}88;
--background-secondary: #${colors.base02}88;
--background-secondary-alt: #${colors.base03}88;
--background-tertiary: #${colors.base04}88;
}
'';
/*
NOTES: If you want your window to be transparent, you have to change the --background- css
variables to have an alpha value. You can add alpha to a hex color by appending 2 extra hex
digits to it. Example from my theme (44 is the hex alpha value):
*/
};
}
And I've gotten the following error:
Which occurs when I start discord after a Home-Manager rebuild.
in the ln call, it may cause an error as such a symlink may already exist, use the -f flag to mitigate this
after each reboot, i need to rerun discocss again to have it apply the theme. Restarting discord does not cause this issue, only a reboot does.
I'm using discord as installed by putting it in home.packages
in home-manager.
I would guess that some of the injections might be failing, but I'm not sure how to diagnose the issue.
Colors work for me, but not transparency on the background.
It would be very practical for theme writers if discocss could automatically hot-reload the CSS file when it changes
As the title says, does not work anymore as of Discord 0.0.28. I suspect that the strings that discocss is trying to replace have changed, but I have not looked into it yet.
Since the latest commit 41c8357, it is no longer working.
The previous commit works.
A keybind to temporarily disable/enable the CSS (for taking screenshots or something) would be cool to have.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.