This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
SERVICE="org.kde.KWin" | |
DBUS_PATH="/org/kde/KWin/InputDevice" | |
INTERFACE="org.kde.KWin.InputDevice" | |
METHOD_GET="org.freedesktop.DBus.Properties.Get" | |
METHOD_SET="org.freedesktop.DBus.Properties.Set" | |
declare -A devices=( | |
["asus_numpad"]='' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/evhz.c b/evhz.c | |
index 3b4d0cf..c7ba33d 100644 | |
--- a/evhz.c | |
+++ b/evhz.c | |
@@ -118,13 +118,13 @@ int main(int argc, char *argv[]) { | |
unsigned long long time, timediff; | |
unsigned hz = 0; | |
- time = (unsigned long long)event.time.tv_sec * 1000ULL; | |
- time += (unsigned long long)event.time.tv_usec / 1000ULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![warn(clippy::all, clippy::pedantic, clippy::nursery)] | |
use flume::bounded; | |
use std::sync::mpsc::sync_channel; | |
use std::thread; | |
const NUM_DIVISORS: i64 = 2000; | |
fn main() { | |
// create a channel to dequeue work |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/composite.cpp b/composite.cpp | |
index c529f398e..ce5b0bd08 100644 | |
--- a/composite.cpp | |
+++ b/composite.cpp | |
@@ -109,11 +109,16 @@ Compositor::Compositor(QObject* workspace) | |
: QObject(workspace) | |
, m_state(State::Off) | |
, m_selectionOwner(nullptr) | |
+ , forceUnredirectCheck(false) | |
, m_scene(nullptr) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Set default pulseaudio sink and move all sink inputs there | |
# Requires | |
# load-module module-stream-restore restore_device=false | |
# in /etc/pulse/default.pa | |
[ -z "$1" ] && echo "You must specify a sink (either index or name): | |
$(pacmd list-sinks | grep index -A 1)" && exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Toggle between two pulseaudio sinks | |
# Requires | |
# load-module module-stream-restore restore_device=false | |
# to be set in /etc/pulse/default.pa | |
# Current default sink | |
CURR_SINK_INDEX="$(pacmd list-sinks | grep \* | awk '{print $3}')" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE KSysGuardWorkSheet> | |
<WorkSheet title="Nvidia" columns="2" rows="4" locked="0" interval="1"> | |
<host name="127.0.0.1" port="-1" shell="" command="nvidia-gpu-sensor.pl"/> | |
<display labels="1" svgBackground="" vScroll="1" version="1" class="FancyPlotter" vLines="1" unit="" row="0" hScale="3" autoRange="1" fontSize="8" manualRange="0" rowSpan="1" columnSpan="1" showUnit="0" vDistance="30" column="0" stacked="0" title="GPU Temp" hLines="1"> | |
<beam sensorName="gpu_temp" sensorType="integer" color="0xff0057ae" hostName="127.0.0.1"/> | |
</display> | |
<display labels="1" svgBackground="" vScroll="1" version="1" class="FancyPlotter" vLines="1" unit="" row="0" hScale="3" autoRange="1" fontSize="8" manualRange="0" rowSpan="1" columnSpan="1" showUnit="0" vDistance="30" column="1" stacked="0" title="GPU Fan Speed" hLines="1"> | |
<beam sensorName="gpu_fan_speed" sensorType="integer" color="0xff0057ae" hostName="127.0.0.1"/> | |
</display> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
# act as a KSysGuard sensor | |
# provides NVIDIA GPU info via `nvidia-smi` | |
# Usage: | |
# 1. Save this script, make it executable and move it to a directory in your $PATH | |
# 2. Save this ksysguard sensor file for Nvidia: https://gist.github.com/Sporif/31f0d8d9efc3315752aa4031f7080d79 | |
# 2. In KSysGuard's menu, open "File > Import Tab From File option" | |
# 3. Open the sensor file (nvidia.srgd) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# A simple script that sets environment variables to allow launching applications using Proton's wine | |
# You can either source the script for use in the current shell, after which you can use wine commands as usual | |
# Or execute it with a program as the arguments e.g `protonenv winetricks` or `protonenv winecfg` | |
# Paths to check for Steam installation | |
STEAM_DIRS=" | |
$HOME/.local/share/Steam | |
$HOME/.steam/steam |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Suspend KWin X11 compositing when certain windows are in focus and fullscreen | |
# Requirements: | |
# qdbus: suspend compositing, check status of compositing | |
# xprop: find window in focus and if fullscreen | |
# The "Suspend Compositing" global shortcut to be present and enabled | |
# Credits to: https://askubuntu.com/a/1017567, https://bbs.archlinux.org/viewtopic.php?pid=994356#p994356 |
NewerOlder