• 3 Posts
  • 295 Comments
Joined 3 years ago
cake
Cake day: June 20th, 2023

help-circle






  • Malware is the least of your worries with Linux. The real reason malware has historically been more prevalent on Windows isn’t necessarily because of market share, it’s in the way software is distributed. In the Windows world, you go to random websites and install proprietary software; you have no idea if it’s trustworthy, even when you’ve found the official site. On Linux, you get your software from repositories (like the app store on your phone) where the software is open source and has been reviewed. All this software comes from trusted sources, you’re never accidentally going to get malware from your OS.














  • There used to be a thing in KDE where you could execute actions and macros based on window titles, but it’s since been removed. I’ve had to recreate this behavior with a shell script, here’s a modified version you can use if you use Xorg:

    #!/bin/bash
    
    xprop -spy -root _NET_ACTIVE_WINDOW | grep --line-buffered -o '0[xX][a-zA-Z0-9]\{7\}' |
    while read -r id; do
        class="`xprop -id $id WM_CLASS 2> /dev/null | grep Viber`"
        if [ -n "$class" ]; then
            if xprop -id "$id" | grep -q 'WM_NAME(STRING) = "Viber Window Name"'; then
                echo "key alt+f4" | xdotool -
                # wait for the window to be closed
                xprop -spy -id $id > /dev/null 2>&1
                fi
        fi
    done
    

    The first Viber is is looking for the Viber in the application name, replace “Viber Window Name” with the actual window title you want to be closed. If you don’t use Xorg, you’ll have to find a replacement for both xprop and xdotool.