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
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
β’ 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)
β’ 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)
β’ enablelightdm β Enable and start LightDM
β’ restartdm β Restart LightDM
β’ startapache β Start Apache server
β’ abortapache β Stop Apache server
β’ restartapache β Restart Apache
β’ reloadapache β Reload Apache config without restarting
β’ statusapache β View Apache server status
β’ 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>)
β’ 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.
β’ Arch Linux
β’ sudo privileges
β’ Optional tools: yay, kitty, tmux, neovim, wlr-randr, kscreen-doctor
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.
Pull requests, improvements, and suggestions are welcome!