- Follow the original instructions at
- See more at
This file contains hidden or 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 python3 | |
import sys | |
import json | |
import subprocess | |
direction=bool(sys.argv[1] == 't' or sys.argv[1] == 'T') | |
swaymsg = subprocess.run(['swaymsg', '-t', 'get_tree'], stdout=subprocess.PIPE) | |
data = json.loads(swaymsg.stdout) | |
current = data["nodes"][1]["current_workspace"] |
This file contains hidden or 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/sh | |
# TODO: If using --criteria on a window in another workspace, sway switches to that workspace | |
USAGE="\ | |
${0} [--id|--criteria] <index|id|criteria> | |
Focus/hide the container at <index> in the scratchpad | |
Depends: | |
jq | |
Args: |
This file contains hidden or 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 | |
date=$(date +"%Y-%m-%d") | |
source_dir=/home/$USER/ | |
backup_dir=${source_dir}backup_${date}/ | |
mkdir -p ${backup_dir} | |
dconf dump / > gnome_dconf.conf | |
tar -zcvf ${backup_dir}gnome_extensions.tar.gz ${source_dir}.local/share/gnome-shell/extensions/ |
This file contains hidden or 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
function multiselect { | |
# little helpers for terminal print control and key input | |
ESC=$( printf "\033") | |
cursor_blink_on() { printf "$ESC[?25h"; } | |
cursor_blink_off() { printf "$ESC[?25l"; } | |
cursor_to() { printf "$ESC[$1;${2:-1}H"; } | |
print_inactive() { printf "$2 $1 "; } | |
print_active() { printf "$2 $ESC[7m $1 $ESC[27m"; } | |
get_cursor_row() { IFS=';' read -sdR -p $'\E[6n' ROW COL; echo ${ROW#*[}; } |
This file contains hidden or 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
{ | |
"$schema" : "https://aka.ms/winget-packages.schema.2.0.json", | |
"CreationDate" : "2021-12-16T13:02:46.391-00:00", | |
"Sources" : | |
[ | |
{ | |
"Packages" : | |
[ | |
{ | |
"PackageIdentifier" : "Bitwarden.Bitwarden" |
This file contains hidden or 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
envup() { | |
local file=$([ -z "$1" ] && echo ".env" || echo ".env.$1") | |
if [ -f $file ]; then | |
set -a | |
source $file | |
set +a | |
else | |
echo "No $file file found" 1>&2 | |
return 1 |
This file contains hidden or 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
/** Operators */ | |
const map = (mapper) => (reducer) => (acc, val) => reducer(acc, mapper(val)); | |
const filter = (predicate) => (reducer) => (acc, val) => | |
predicate(val) ? reducer(acc, val) : acc; | |
const some = (predicate) => (_) => (acc, val) => | |
acc !== true ? predicate(val) : true; | |
/** */ |
This file contains hidden or 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
pamac build direnv | |
flatpak install spotify | |
pamac build microsoft-edge-dev-bin | |
pamac build visual-studio-code-bin |
https://wiki.archlinux.fr/pacman
pacman -Sy