Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "color in terminal"
-
Hello, world!
Hey, it's me. It's been awhile. How have you been..? :3
For those of you who don't know/remember, I'm the lead developer of a Desktop and (to-be) Hacking Simulator Game. My project should still exist somewhere on here. I just thought I would hop on, and catch you guys up on my progress. ^~^
So far themes are a thing! You can add custom fonts, wallpapers(or just a desktop color) and set the color/opasity of everything in-game!
I have also implimented a modding API. It's under-documented, but it works very well! You can add apps, commands, or even redesign the entire interface using it. It executes modded functions on specific events, so you could really have it do anything.
As of yesterday, there is also a simulated FileSystem. You can navigate it using in-game terminal commands, and you can create and remove directories.
(in-game screenshots are also a thing, you can even set a timer - ps: this is a 100% mod! As are all apps and commands in the current unreleased version. PM me on Telegram @TheCyaniteproject to get a copy~)25 -
Cross platform terminal library is just about complete!
Here's the same program running in both Windows and "Ubuntu" (WSL, but it's using the ncurses back-end nonetheless)
What my library does:
- Double-buffers the console for drawing (like curses does)
- Translates input into a standard structure (Linux and Windows have different input systems, obviously)
- Does the same thing for output
- Even supports color!2 -
Got fed up with having to use the mouse/trackpad while editing code or using the terminal, so I decided to (finally) learn proper vim keybindings and tmux.
Boooooy oh boy, this certainly changes things.
I think I'm in love with tmux. Damn that piece of software is so sexy. Disabled the mouse, propped up my dotfiles and installed tmux + my conf on all machines I use. It's so useful, so fast and so pretty...
Spent some time with vimtutor too. Finally getting faster with the keybindings. Installed neovim, got some plug-ins (nerdtree, fzf etc), disabled the mouse and arrow keys, and made it pretty. It's actually pretty nice, but I'm not at the "buff gorilla who took speed and pressed 24 keys in a microsecond" typing level yet. One day though.
Also I'm using the Nord color scheme on everything. Overall pretty satisfied with the end result. Still not as productive as I was with VS Code, but I think I'll eventually surpass my previous productivity levels.
If anyone has any tips for vim/nvim or tmux, feel free to share!10 -
I've been doing it wrong for 6 months! I've been building -> uploading my work manually to server using ssh.
Now I decided I write a script for that shit .-.
Though I'm still not able to make output take a different color in Ubuntu default terminal, tried many solutions but I still fail :\
Any suggestions?14 -
Why do most web sites have so bright design? Aaarghgh, my eyes!
Anyone who dislike screeching default color themes? Black, red, blue, on full white?
Then I guess your editor and terminal are on low contrast light grey on dark grey, or something like that, right? Maybe even your window manager?
If your setup looks like this and the web is what hurts your eyes, try Dark Reader for Chrome or Firefox. I've tried several such plug-ins in the past, but this one is amazing.
(not affiliated)6 -
Didn't think I had material for a rant but... Oh boy (at least at the level I'm at, I'm sure worse is to come)
I'm a Java programmer, lets get that out of the way. I like Java, it feels warm and fuzzy, and I'm still a n00b so I'm allowed to not code everything in assembly or whatever.
So I saw this video about compilers and how they optimize and move and do stuff with the machine code while generating the executable files. And the guy was using this cool terminal that had color, autocomplete past commands and just looked cool. So I was like "I'll make that for my next project!"
In Java.
So I Google around and find a code snipped that gives me "raw" input (vs "cooked" input) and returns codes and I'm like 😎. Pressing "a" returns 97 (I think that's the ASCII value) and I think this is all golden now.
No point in ranting if everything goes as planned so here is the *but*
Tabs, backspaces and other codes like that returned appropriate ASCII codes in Unix. But in windows, no such thing. And since I though I'd go multiplatform (WORA amarite) now I had to do extra work so that it worked cross platform.
Then I saw arrow keys have no ASCII codes... So I pressed a arrow key and THREE SEPARATE VALUES WERE REGISTERED. Let me reiterate. Unix was pretending I had pressed three keys instead of one, for arrow keys. So on Unix, I had to work some magic to get accurate readings on what the user was actually doing (not too bad but still...). Windows actually behaved better, just spit out some high values and all was good. So two more systems I had to set up for dealing with arrow keys.
Now I got to ANSI codes (to display color, move around the terminal window and do other stuff). Unix supports them and Windows did but doesn't but does with some Win 10 patch...? But when tested it doesn't (at least from what I've seen). So now, all that work I put into making one Unix key and arrow key reader, and same for Windows, flies out the window. Windows needs a UI (I will force Win users, screw compatibility).
So after all the fiddling and messing, trying to make the bloody thing work on all systems, I now have to toss half the input system and rework it to support UI. And make a UI, which I absolutely despise (why I want to do back end work and thought this would be good, since terminal is not too front end).2 -
In SublimeText, I noticed that my markdowns formatting was not showing up correctly— I decided to download the new markdown package altogether hoping for some kind of update/fix. Turns out the package comes with a super ugly color theme which overrides the default theme of SublimeText. After some googling and experimenting, I found way to override this through the package settings. I always use git through my terminal but I thought let’s try to use git through my code editor and see how it works. I downloaded the git package but then I notice that git tool shows status and all correctly but doesn’t push files to GitHub (it says fatal: unable to read current working directory). Then I download another application called SublimeMerge. It works correctly on its own (pushes files to GitHub) but SublimeText is still not doing the same. Then I tinker around with my SSH keys hoping for a fix, but nothing works. I even go to stackoverflow and search for a solution but I find nothing (I even wrote a post asking for a solution but no replies till now). Fuck it! I now open the file with VSCode. Open terminal within VSCode and add/push/commit through it and everything works perfectly. So goodbye SublimeText I guess 👋🏾11
-
My professor bored to just seeing terminal line of my project cause they can't get it.. so I did this:
http://lookpic.com/O/i2/...
Attached link because image is not uploading1 -
Just a quick follow up. I told you guys after rebooting my server by accident, I'll color in the terminals for my ssh connections.
Normal terminal in white. With the code to do it. Just a shell script with the name ssh earlier in the path than the actual ssh. That was the only solution that didn't fuck my auto-completion. compdef was somehow useless. But it is simple.
For some reason I had to hardcode the return color to white. Alacritty was not happy with just a no-color code. But whatever. Super useful. I won't accidentally restart non-host computers now.
Planning on extending this to have different colors according to the host. Like my homelab could be green. Live servers would be red. Dev servers blue. But that's for the future.
Just wanted to share my little improvement that will make my computing saver.8 -
I just rebooted my server by accident because I wanted to play Space Engineers.
Long story short, dual booting. Needed to boot into windows. Typed reboot into my terminal. My terminal was not local. When am I finally getting around to set up my terminal color as red when it is connected to another host?
But two things are good here. This was my own server.. Well, bunch of stuff is running on it, including for my bachelor's thesis. But if that was a server of my company, that would have been worse.
Second thing, my systems are fault tolerant. I reboot once per week at the latest and for systems with fail overs once per day. I know they are coming back up. I don't worry. My Gitlab will be back in 5 minutes at the latest. I am going to reboot and play Space Engineers now.
Reboot your servers guys. Only way to make sure they'll survive reboots!4 -
I used to fucking love VSCode it visually was great, it was simple, had an integrated terminal that wasn't shit, supported many languages well (while not forcing every extension down your throat), and was straightforward to configure. I also had problems with it, mainly I felt it was way too bloated for an editor.
That good impression I had is gone now. It seems like every time I'm actually using the editor I have to fight with it. Whether that's an update that fucked up my config, or a reinstall and now I have to **convince** my fucking editor to use tabs instead of spaces automatically and I have to specify because holy shit it will not just listen after I set every possible fucking indentation setting to disable spaces or enable/prefer tabs and they keep adding shit like this that I give no shits about that make me sift through the damn settings finding the settings that turn off whatever new visual effect or quirky little automation they've implemented. I can't tell you how much I actively don't want my braces to be matched up by a color that doesn't even have anything to do with my color scheme.
Ive tried switching but holy shit intellisense is such a great feature that helps me so much so I'm not always bouncing between docs and my editor. Which ATM I'm learning go and intellisense has more fucking information on the functions than the docs do. I've seen Neovim (which is what I'm probably switching to) has language servers that are similar to intellisense so I'm intrigued to try that.
I'm just tired of constantly having to avoid all this shit I don't give a fuck about. I just want to get in, do my thing.
I won't be surprised if I'm the only one on this train 🤣8 -
For fucks sake Windows. Why can't you just fucking have a sane terminal without fucking with everything.
Installing and using MinGW and CMake is enough of a pain when in a slow VM.
Does curses even work with color in Windows!? The best I've gotten is a shade of grey, and white, and I can't even get the grey back! -
Any Spacemacs users here? I'm debating a switcheroo from sublime. I know my way around vim, so general usage shouldn't be a problem.
I'm more interested in the long term use. I guess since its just some kind of emacs layer, it should be pretty fucking stable for the foreseeable future, but how is the plugin support?
I'm currently doing React at work, and a couple of other Node side projects. Syntax highlight should be sorted out for me. I would like to tailor it somewhat for productivity, like a good file explorer, integrated terminal and other auto tidbits like auto brackets, auto close tags and whatever else. Any good tips on plugins for me?
Also, looking for a nice color theme.3 -
Making a hard switch to ubuntu on my desktop at home. Getting just a teeny tiny, tad, bit: absolutely fucking livid....
Trying to learn ansible, vagrant, and docker more in depth for both work and my personal projects. All that I’ve been doing is just spinning my wheels trying to figure out the stupid fuck-mothering quirks with running this shit on Windows. Yes you absolutely can use all of these tools on a Windows box. There’s plenty of ports, patches, and workarounds. But I have spent all day trying to build a few vagrant boxes and use ansible to set them up. Simple LAMP stack boxes on CentOS7. Nothing major... unfortunately I spent like 90-110 minutes trying to figure out why virtualbox wouldn’t run properly. Dumbass me forgot that I installed Hyper-V ages ago.
O...K.... whelp... hyperv provider it is...
Luckily it only took about 15 minutes to determine that Hyperv’s networking can’t be setup from vagrant because vagrant doesn’t know how to interact with the hyperv - vswitch. So networking config is ignored and all VMs run on default switch (NAT) which is annoying but workable.
Ran into other issues trying to stay SSH’ed into the VM. PowerShell core (6) ssh’es into the box perfectly fine, but every time I opened vi to edit configs my terminal color scheme and fonts got fucked harder than a 2 dollar hooker on nickel night.
I’m a bright-green text on black background kinda guy. However the terminal kept changing to bright-red text on white background! It was like getting skull-fucked by a minotaur.
After a while I said fuck it, let’s try putty. Vagrant was using it’s own ssh keypair for the boxes, at work on my mac. Works like a dream. Putty failed me hard and shit the bed, kept getting all kinds of keypair errors. At this point I was finished spent too long trying to make shit work correctly on this jankbox. With enough time and patience I probably could’ve figured all of these problems out. I’m certain that at least 70% of them were caused by user error. I’m known by many as the walking ID-10t.
But alas, I have no time left in the day to fuck around with shit that doesn’t work immediately for morons like myself. My only hang up for the longest time with a complete switch to Linux was gaming. But with Proton and WINE I’m comfortable with giving it the ol’ college try. (Shhhh, don’t remind me I dropped out of college...
...Thrice.)
The gamble here is that I’ll give more than 2 halves of a fuck about trying to get my games working. A Study environment and materials for certs and general training won’t be getting anywhere near my full attention.
So, at long last, I hope this attempt at a full *nix switch finally sticks!!!
👾2 -
I'm probably doing something wrong because I cannot think of a good implementation (or alternative) for this pattern in Rust.
trait Terminal {
fn color_manager(&mut self) -> &mut dyn ColorManager;
}
All I want is having things in their own tidy little class with a specific job. In this case handling color conversion, having a registry for indexed colors, stuff like that...
It's composition which Rust should be good at so I assume there's a better way
How can I do something like this properly?