Skip to content

Instantly share code, notes, and snippets.

View connorfuhrman's full-sized avatar

Connor M. Fuhrman connorfuhrman

View GitHub Profile
@connorfuhrman
connorfuhrman / .screenrc
Created December 1, 2022 22:11
GNU Screen Configuration
# huge scrollback buffer
defscrollback 5000
# no welcome message
startup_message off
# 256 colors
attrcolor b ".I"
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
defbce on
@connorfuhrman
connorfuhrman / update_shell_prompt.bash
Created September 16, 2022 16:11
Function to set a nice shell prompt with Pyenv and ROS shown along with a nicely trimmed current working directory
#!/bin/bash
## Prompt setup
update_shell_prompt() {
RED='\[\e[0;31m\]'
GREEN='\[\e[0;32m\]'
BLUE='\[\e[0;34m\]'
PURPLE='\[\e[0;35m\]'
RESET='\[\e[0m\]'
@connorfuhrman
connorfuhrman / prompt_dir.c
Created September 16, 2022 16:09
C code for a nicely trimmed working directory string to be used in shell prompt
// Program to display the current working directory but ensure that the string
// does not take up more than half of the current terminal window size
//
// Compile as gcc prompt_dir.c -o prompt_dir_str -Wall -Wextra -pedantic -std=c11 -ltermcap -O3
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>