Skip to content

LunasLinux/MoffFuncs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MoffFuncs - Custom Bash Utility Functions for Arch Linux

MoffFuncs is a curated set of Bash functions designed to simplify system management, package handling, and display configuration tasks for Arch Linux users. It includes quality-of-life shortcuts, CLI utilities, and integration with popular tools like yay, tmux, kitty, and more.

πŸ“ Location: Place the .funcs file in one of the following:

  • ~/.funcs (for user-level setup)
  • /etc/skel/.funcs (for new user default template)

Then, add this line to your .bashrc or .zshrc:

source ~/.funcs

πŸ› οΈ Installation Guide

Use the following functions to install necessary dependencies:

β€’ installcoredeps – Installs required base packages: - glxinfo, mesa-utils, sudo

β€’ installoptionaldeps – Installs optional (recommended) tools: - kitty, neovim, tmux, wlr-randr, kscreen-doctor

β€’ installyay – Installs the yay AUR helper if missing

β€’ installmoffdeps – Runs all the above functions in order

To run: installmoffdeps


πŸ“¦ Feature Overview

System Utilities

β€’ swaponit – Enable swap memory
β€’ swapoffit – Disable swap memory
β€’ sysupdate – Run a full system update
β€’ flushcache – Clean the pacman cache
β€’ editfuncs – Edit MoffFuncs file (with neovim)

Display / Desktop Management

β€’ gpuinfo – Show GPU/renderer info (AMD/Mesa)
β€’ moninfo – Show connected monitors (Wayland-compatible)
β€’ togglehdr – Toggle HDR mode (requires KDE/kscreen-doctor)
β€’ reloadkitty – Restart Kitty terminal to apply changes
β€’ apocalypse-mode – Reboot into CLI-only mode using tmux
β€’ restore-gui – Restore the GUI (Plasma/Sddm)

LightDM Display Manager

β€’ enablelightdm – Enable and start LightDM
β€’ restartdm – Restart LightDM

Apache Web Server Controls

β€’ startapache – Start Apache server
β€’ abortapache – Stop Apache server
β€’ restartapache – Restart Apache
β€’ reloadapache – Reload Apache config without restarting
β€’ statusapache – View Apache server status

Package Management Shortcuts

β€’ install <pkg> – Shortcut for sudo pacman -S
β€’ uninstall <pkg> – Shortcut for sudo pacman -R
β€’ aur <pkg> – Install packages from the AUR via yay
β€’ sync – Force sync pacman database (pacman -Syy)
β€’ pacsync <pkg> – Sync and install package (pacman -Sy <pkg>)


⚠️ Notes

β€’ Most functions assume you're using KDE Plasma + SDDM or LightDM.
β€’ apocalypse-mode disables GUI and reboots into multi-user CLI mode β€” use with care.
β€’ Designed for Arch Linux and compatible derivatives only.


πŸ”§ Requirements

β€’ Arch Linux
β€’ sudo privileges
β€’ Optional tools: yay, kitty, tmux, neovim, wlr-randr, kscreen-doctor


πŸ“œ License

This project is licensed under the GNU General Public License v3.0.
See the LICENSE file or https://www.gnu.org/licenses/gpl-3.0.html for details.


πŸ’¬ Contributions

Pull requests, improvements, and suggestions are welcome!