u/kavaunix

▲ 25 r/archlinux+1 crossposts

Getting notified about critical updates

Is there a way to get notified about critical updates (e.g. security fixes for installed packages) only?

I don't want to miss out on critical fixes, but I also don't want to update too often for small, less important updates.

I understand that I can't (or at least shouldn't) selectively upgrade packages, and I don't mind upgrading the whole system when a security fix is available. It's more about update frequency.

A status indicator or even a small script I can run at login would be ideal.

reddit.com
u/kavaunix — 5 days ago
▲ 6 r/COSMICDE+1 crossposts

I love the general look and feel of the COSMIC desktop, but one thing I missed from my GNOME days is the ability single-tap Super (a.k.a. "Windows Key") to open the Launcher, and to double-tap the Super key in order to open the App Library.

The script below does just that.

Installation instructions:

  1. Copy the contents of the script to ~/bin/cosmic-tap.sh
  2. In COSMIC Settings > Desktop > Window management, set Super key action to "Disable". We're going to take the Super key into our own hands.
  3. In COSMIC Settings > Input devices > Keyboard > Keyboard shortcuts > Custom, create a shortcut with name Super Double Tap, command /home/<yourusername>/bin/cosmic-tap.sh, and assign it to the Super key.
  4. Adjust the TIMEOUT parameter as needed. If it feels a bit sluggish, try TIMEOUT=0.2.

That's it!

#!/bin/bash
#
# Launcher / App Library double-tap script for COSMIC desktop.

# For testing only:
# notify-send "cosmic-tap.sh started" "The Super key was pressed"

STATE_FILE="/dev/shm/cosmic_super_tap" # Path to the in-memory state file
TIMEOUT=0.3 # Timeout in seconds, adjust as needed

SINGLE_TAP_ACTION="cosmic-launcher" # Command to launch on single tap
DOUBLE_TAP_ACTION="cosmic-app-library" # Command to launch on double tap

if [ -f "$STATE_FILE" ]; then
    # If the file exists, this is the second tap
    rm "$STATE_FILE"
    $DOUBLE_TAP_ACTION
else
    # First tap: Create the timer file and wait for the second tap or timeout
    touch "$STATE_FILE"
    sleep $TIMEOUT

    # If the file still exists after sleep, the second tap never happened
    if [ -f "$STATE_FILE" ]; then
        rm "$STATE_FILE"
        $SINGLE_TAP_ACTION
    fi
fi

How it works:

Each tap on the Super key starts a new instance of the script. The first instance writes a state file and goes to sleep. If nothing happens in the next 0.3 seconds, it will wake up, check the state file, notice it's still there, delete it, then launch the Launcher.

If another tap occurs during the 0.3s window, the second instance will notice a state file is already present. It will delete the file and immediately launch the AppLibrary. When the first instance wakes up, it will find the state file gone, and exit without doing anything.

Enjoy!

reddit.com
u/kavaunix — 17 days ago