Skip to content

Instantly share code, notes, and snippets.

View fesdonomist's full-sized avatar
🫓

Thomas Duckworth fesdonomist

🫓
View GitHub Profile
@fesdonomist
fesdonomist / CMakeLists.txt
Created May 24, 2025 07:02
Allows you to internationalise and install .desktop files easily within a .po assuming you already collected the strings.
find_program(GETTEXT_MSGFMT_EXECUTABLE msgfmt)
if(NOT GETTEXT_MSGFMT_EXECUTABLE)
message(
"------
NOTE: msgfmt not found. Translations will *not* be installed
------")
else(NOT GETTEXT_MSGFMT_EXECUTABLE)
set(catalogname ${CMAKE_PROJECT_NAME})
@fesdonomist
fesdonomist / memory_info.sh
Last active November 24, 2024 12:06
Get readable memory information without needing sudo for dmidecode on Linux - taken from plasma/kinfocenter MR !204
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
# SPDX-FileCopyrightText: 2024 Thomas Duckworth <tduck973564@gmail.com>
o="$(udevadm info -q property -p /sys/devices/virtual/dmi/id --no-pager)"
# Calculate minimum width required for all output
width="$(echo "$o"| grep -e "MEMORY_ARRAY" -e "MEMORY_DEVICE" | awk -F '=' '
{