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 -e | |
declare -i last_called=0 | |
declare -i throttle_by=4 | |
@throttle() { | |
local -i now=$(date +%s) | |
if (($now - $last_called > $throttle_by)) | |
then |
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
#!/bin/bash | |
function move() { | |
# move a workspace to the appropriate monitor | |
local workspace_id=$1 | |
shift | |
local monitors=($@) | |
if [[ ${#monitors[@]} == 0 ]]; then | |
monitors=($(hyprctl monitors -j | jq -r '.[].name')) |