Skip to content

karshPrime/SysHacks

Repository files navigation

System Hacks

Repository of handy command line scripts designed to simplify common tasks and enhance terminal experience. Each script in this repository is designed to solve a very specific task, aimubg to make command line sessions more efficient and enjoyable.

battery_cap.sh Limit laptop battery from overcharging. Define maximum charge limit within the script and if the model's supported, the script will enable systemd service to limit charging over your specified limit.
colors.sh Displays all terminal colors along with their escape character codes. Offers a visual representation of various color combinations for customisation.

physicalModel

copy_code.sh Copy all code of a specified type to clipboard. Would be extremely helpful when trying to share code where uploading files is not convenient/possible.

physicalModel

gomake.sh More robust go build command, to compile program for multiple architectures in ./bin rather than in root project dir.

physicalModel

Makefiles/ Directory consisting of general makefile templates that should be sufficient for most purposes.
periodic.sh Displays the Periodic Table with color coding for different groups. Provides a visually appealing representation of chemical elements organised by their atomic numbers and properties.

physicalModel

project_initialise.sh Automates project setup tasks, including directory creation, Git initialisation, README file generation, language-specific setup, and .gitignore configuration. Simplifies the process of starting new software projects.

physicalModel

refresh.sh Clears cache and displays memory usage before and after cache clearing. Provides a quick overview of system memory usage, including total, used, free, shared, and buffer/cache memory.

physicalModel

rename.sh Mass rename files using a text editor. Super handy with vim motions and macros. Also supports file conversion via `ffmpeg`. Rename a file with new extension, and the script will convert it as well.

physicalModel

replace.sh Short script to update current file with sed after confirming the changes. Prevents from accidently corrupting the file with regex flaw, or unintended change.

physicalModel

resistor.c Gives resistance values for band colors. If provided with specific bands (e.g., blue red green gold), it will output the corresponding resistance value. With no parameters, it will display a table of all band colors and their corresponding values.

physicalModel

rmsymlink.sh Script designed to remove symbolic links and their target files. It ensures a clean deletion process, first deleting the symbolic link itself and then, if applicable, the target file it points to.

physicalModel

todo.sh Maintains an organised library of todo files at a specified location. Opens a todo file associated with the current project or directory in the default editor.

physicalModel

trash.sh Moves files and directories to the system's trash directory instead of permanently deleting them. Mimics the behavior of graphical environment trash systems from the terminal, providing an opportunity to restore or permanently delete files later.

physicalModel

vimacro.sh Bring the magic of vim macros to shell.

physicalModel

About

tools for enhanced terminal functionality

Resources

License

Stars

Watchers

Forks