Image 1 — [KDE] Do I blend in as windows user? :P
Image 2 — [KDE] Do I blend in as windows user? :P
Image 3 — [KDE] Do I blend in as windows user? :P
Image 4 — [KDE] Do I blend in as windows user? :P
Image 5 — [KDE] Do I blend in as windows user? :P
Image 6 — [KDE] Do I blend in as windows user? :P
Image 7 — [KDE] Do I blend in as windows user? :P
Image 8 — [KDE] Do I blend in as windows user? :P
▲ 348 r/unixporn

[KDE] Do I blend in as windows user? :P

i removed my windows partition only to go back to "windows"

u/No_Beyond_5483 — 7 days ago

seriously, how do you easily find ansi/vt100 key codes?

right now im writing a short little text editor, and requires me grabbing keyboard input as traditional ansi escape sequences. but finding which key code maps to which keyboard input is a pain for me </3

i try search on google, and get a lot of information overload, and i end up struggling reading the escape sequence tables.

any tips and advice? im trying not to use ai to be lazy, im interested and i want to learn how to properly search for these codes

reddit.com
u/No_Beyond_5483 — 8 days ago
▲ 135 r/desktops

My Windows set up before I move permenantly to Linux 💔

I'm about to fully switch to a single-boot Linux setup permanently. Windows has served me well, from Windows XP up until Windows 11! This is where I grew up, but sometimes you outgrow your home. I really appreciate this OS, regardless of its flaws. Just wanted to put this up here for me to look back at it and hopefully not feel regret switching over full-time.

u/No_Beyond_5483 — 20 days ago

[C] How to create an interactive shell mode

Hey there! I'm experimenting with POSIX api and I want to create my own mini shell. I want my shell to open an interactive shell mode and be able to receive command input line by line from the kernel. I am not sure how to achieve this. If I am not mistaken, I read that I should be able to somehow link my shell to a /dev/ttyX or /dev/pts/X driver in "cooked mode" (my shell only receives input only after a user presses 'ENTER', not after every keypress)

Ive tried Googling for the solution, but its been ineffective. Im so confused, I don't even know how to look for a solution for this.

Here is the current code snippet of my program. (Excuse the bad programming) initInteractiveMode is meant to initialize interactive mode

#include &lt;stdio.h&gt;
#include &lt;string.h&gt;
#include &lt;termios.h&gt;

#define VERSION "0.0.1"

int parseArguments(int argc, char *argv[]);
void help();
void initInteractiveMode();

int main(int argc, char *argv[]) {
  if (argc &lt; 2) {
    printf("shell\n");
    return 0;
  }

  if (!parseArguments(argc, argv)) {
    return 0;
  }
  
  initInteractiveMode(); // Initialize Interactive Mode

  printf("Chloe's shell interactive mode enabled\n\n");

  while (1) {
  }

  return 0;
}

// TODO: Open interactive mode
void initInteractiveMode() {

}

int parseArguments(int argc, char *argv[]) {
  const char *arg = argv[1];
  if (strcmp(arg, "-v") == 0 || strcmp(arg, "--version") == 0) {
    printf("Chloe's shell, version %s\n", VERSION);
  } else if (strcmp(arg, "-h") == 0 || strcmp(arg, "--help") == 0) {
    help();
  } else if (strcmp(arg, "interactive") == 0 || strcmp(arg, "i") == 0) {
    return 1; // Enter interactive mode
  } else {
    printf("Invalid command\n\n");
    help();
  }

  return 0;
}

void help() {
  printf("Chloe's shell\n\n");
  printf("\033[1mCommand:\033[0m shell [options]\n\n");
  printf("List of options:\n");
  printf("A simple shell for testing POSIX system calls\n");
  printf("interactive\tEnter interactive mode\n");
  printf("--help | -h\tDisplay help information\n");
  printf("--version | -v\tDisplay version information\n");
}
reddit.com
u/No_Beyond_5483 — 23 days ago