Comments (29)
That would be great but I think it would be better placed either in tab title using some shortcut like [C], or in the status bar with the full [CONNECTED].
Using the icons might confuse people using sublimelinter, gitgutter, colorhighlighter (which can show colors as icons on the left) ect.
from ghosttext.
You're right about the gutter icons. I was looking for some color and that was the only place I remember seeing it.
OS X supports colored emoji and I think they would be a perfect replacement for "[CONNECTED]".
Other OSes could just use some unicode character like ⚇ ON
or anything that looks decent on the respective platform.
from ghosttext.
This could work " █ " in windows but I'm not sure if it will be visible if the tab font is changed (If it can be changed. I never looked into this.). Otherwise It will be a rectangle with cross in it as with most unknown characters.
The character is U+2588 or FULL BLOCK.
But doesn't windows support emoji? I might be mistaken but I don't recall installing additional software yet my linter does show them correctly at least in the line indicator:
from ghosttext.
I think those in the gutter are just images from the package you're using. Windows 8 has a subset of emoji, but I don't know if ST/win supports them. W8 might be a bit too recent though, the majority of users might not support them at all.
Here's the full cross-platform list
from ghosttext.
I'm on Windows 7 :). I think that the block will work just fine if no other solution is found.
from ghosttext.
It looks like Emoji were added to Windows 7 too in 2012. That could work.
ON
👻 ✅
OFF
👻 ⚪
Now only Linux is missing!
from ghosttext.
Linux user chiming in:
Some emojis like 😃 ☺ ☑ are supported by default on Ubuntu but not converted to their pictorial representation.
For the two above, 👻 and ✅, I had to install ttf-ancient-fonts
. This is what they look like in Sublime:
@sejbr, the square icon you suggested works great. Here are some more options that display correctly on default Ubuntu (taken from this wikipedia entry):
◉ ▤ ▣
from ghosttext.
The idea is nice, but it might include some pitfalls.
It's not possible, by the plug in, to detect when sublime text is closed. This means tabs with an "icon" marking the connection state are going to keep this indicator after an restart of ST.
Whats about an 'animation' of theses four characters: ◴ ◵ ◶ ◷ for example changed once a second when the connection is open? If it's sopped rotating the connection mus be closed…
About the ghost Emoji on Linux, it's not in my font (Droid Sans) available.
from ghosttext.
Good point about not being able to remove them on exit. What about getting the tabs on open and checking for the first character of their titles? It shouldn't be expensive.
Animated characters would be nice but may be distracting.
from ghosttext.
You are right, animating could be distracting…
But I have still afraid that removing a retained title char on startup might not work because another plug in modified the title in another way - it's complete deterministic…
from ghosttext.
If other plugins ADD text like we do, we can just check the entire string for our characters, specifically the sequence 👻✅ for example, and remove them. Not a big deal. If they remove/modify our characters, it's not our fault and of course if they do we don't need to remove them anymore (since they are not there)
I mean ideally ST would offer a way to add unique icons to the title, but we don't have that.
from ghosttext.
Okey I just wats have all cases discussed before start implementing…
The ghost is available on arch LInux if ttf-symbola
is installed.
from ghosttext.
Of course, the earlier we see the problems the better.
Does that font come preinstalled usually? If not I think we should use something more common, that works out of the box (and also because at that size IMHO it doesn't look much like a Ghost, more like a chalk outline)
from ghosttext.
Well linux is so open that in some distributions if I remember correctly, you don't have any fonts outside the kernel built-in font with CP437 character set used in console. It will vary from distribution to distribution.
It can be resolved with forced readme in which links to packages with that font is included.
Linux users can handle something like that. The amount of sh*t you have to handle on linux is so big that this won't make any difference :P.
from ghosttext.
(and also because at that size IMHO it doesn't look much like a Ghost, more like a chalk outline)
This is how it looks on my system, if I would not know this is a ghost… :
I think we just need a simple fail safe default and the user can define a own prefix if he wants, title_prefix_connected
and title_prefix_disconnected
.
from ghosttext.
Is used [G̶T̶] and [GT] as defaults, can you guys test my changes before I create a new tag?
from ghosttext.
The default [G̶T̶] looks awful on windows (7 atleast)
from ghosttext.
Yes this sucks…
But besides the chars does it works without any bugs?
from ghosttext.
I haven't noticed any.
from ghosttext.
Great! That works for me. I tested on restart too, it works ;)
I added a OSX-specific setting that uses Emoji (supported everywhere ST3/Mac is supported ;) )
Now we need someone testing the Windows emoji. I'm not sure if they are the same characters (they probably are)
How to test on Windows
Open GhostText (OSX).sublime-settings
in Sublime Text. If it includes icons then it works and we can duplicate the file asGhostText (Windows).sublime-settings
from ghosttext.
The OSX stuff doesn't work on Win. At least Win7, looking at google, those could work on windows 8.
I couldn't find ghost emoji working with sublime and I couldn't find anything that would even resemble a ghost, so I don't know what to do with it. For the check and cross
✔ - U+2714 Heavy Check Mark
✖ - U+2716 Heavy Multiplication X
These look the best
It could be [GT✔] and [GT✖] for Win7 or something like that if no ghost is to be found.
from ghosttext.
I'd avoid crosses or anything red, they look like errors and this isn't the case.
ST doesn't support colored emojis even in Windows 8.1; Windows 7 only supports them if you installed that 2-year-old update.
This is how they are shown in Windows 8 and Windows 8.1
I pushed a commit so W8 users can test it out, but if you want to see it on W7 you gotta install that update. I'm using the Ghost and that —
to show the "off" state; the uncolored circle looks like an o.
We can only use these if we can afford unupdated W7 machines to have unrecognized characters. If not we need different characters for Windows.
from ghosttext.
The problem is, I have the 2729094 update installed yet still these doesn't work. It indeed added a bunch of icons, but those ain't the ones in them. I even checked the emoji font with charmap and searched manually but still nothing.
Can you check the unicode (U+XXXX) and give me them so I could search it?
from ghosttext.
On here you'll find all the emojis and their unicode: http://www.unicode.org/reports/tr51/full-emoji-list.html
from ghosttext.
Another nice emoji option would be 👻🌘 and 👻🌕 which kind of keeps the ghostly mood and looks pretty nice
For Windows I found these:
connected: ☗ ✓
disconnected: ☗ ☾
The ☗ sort of looks like a Ghost at that size. The moon sort of looks like it's in a "suspended" state, paving the way for a possible #15
I created a branch for both the platforms, so you can test it out https://github.com/Cacodaimon/GhostText-for-SublimeText/tree/connection-indicator-tests-%2330
from ghosttext.
☗ ✓ and ☗ ☾ works on Ubuntu with no special font installed…
But whats about ● instead of this ✓ then we would use a same looking icon everywhere.
But I like the Idea with the moon and the sun.
from ghosttext.
That would work too! Should we ship it?
from ghosttext.
Ship it or wait until: #15 is finished?
It should be easy to do now and the both features are loose connected.
from ghosttext.
Either way works. But for now we can add them in master and mark this as closed. ;)
from ghosttext.
Related Issues (20)
- Close the VSCode tab after disconnection HOT 3
- Connection is lost after save HOT 4
- Problem with two-way sync on firefox and neovim HOT 2
- CodeMirror 6 / jupyter notebook 7 issues HOT 2
- CodeMirror 6 only works on the first connection, then a reload is required
- submit form changes from text editor HOT 2
- textarea modified by javascript HOT 1
- GhostText for input fields HOT 2
- Not Working for Cinny and Element HOT 1
- Support for github.dev and vscode.dev HOT 1
- Doesn't seem to work on StackOverflow.com HOT 11
- is it secure to listen on *:4001 ? HOT 1
- Does it work in codecademy editor? (Monaco editor) HOT 3
- GhostText doesn't work with Monaco editor on CodeSignal
- VS Code Saving clears out textarea HOT 2
- GhostText cannot detect or edit TinyMCE content HOT 3
- Migrate to Manifest V3 HOT 1
- Release version for Safari
- After recent upgrade, GhostText disconnects from editor after 30 seconds HOT 5
- The connection to the port is broken. Browser Firefox developer HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ghosttext.