Skip to content

Instantly share code, notes, and snippets.

View foldfree's full-sized avatar

foldfree

View GitHub Profile
{ pkgs, specialArgs, ... }:
{
services.displayManager.sessionPackages = [
((pkgs.writeTextFile {
name = "cosmic-on-niri";
destination = "/share/wayland-sessions/COSMIC-on-niri.desktop";
text = ''
[Desktop Entry]
Name=COSMIC-on-niri
Comment=This session logs you into the COSMIC desktop on niri
@NightMachinery
NightMachinery / battery_limit.zsh
Last active June 1, 2025 18:43
A guide on limiting macOS battery charging to at most 80%.
# Apple Silicon laptops with firmware > 13.0 have a native charge threshold that does not required any userspace daemon running.
# This native limit works even when the laptop is sleeping or powered off therefore it is preferable to the userspace daemon.
# Nonetheless, it only works with fixed thresholds (80% as upper limit and 70% as lower limit).
# CHWA key is the one used to enable/disable the native limit. 01 = 80% limit, 00 = no limit
##
typeset -g smc_command="/usr/local/bin/smc"
typeset -g smc_charge_limit_key="CHWA"
typeset -g smc_charge_limit_status_on="01"
typeset -g smc_charge_limit_status_off="00"
@biosmanager
biosmanager / userChrome.css
Last active May 14, 2025 13:49
Firefox Proton macOS Close Tab Left (updated for version 113)
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
.tabbrowser-tab .tab-close-button {
opacity: 0;
margin-left: -4.5px !important;
margin-right: 2px !important;
}
.tabbrowser-tab:not(:hover) .tab-close-button {
display: none;