-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Glenn Wurr
committed
Aug 27, 2020
1 parent
d6ae693
commit b897473
Showing
11 changed files
with
168 additions
and
22 deletions.
There are no files selected for viewing
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
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
18 changes: 18 additions & 0 deletions
18
Library/Application Support/Übersicht/widgets/nibar/scripts/spaces_tertiary.sh
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/sh | ||
|
||
PATH=/usr/local/bin/:$PATH | ||
|
||
# Check if yabai exists | ||
if ! [ -x "$(command -v yabai)" ]; then | ||
echo "{\"error\":\"yabai binary not found\"}" | ||
exit 1 | ||
fi | ||
|
||
SPACES_TERTIARY=$(yabai -m query --space3 --display 3) | ||
|
||
echo $(cat <<-EOF | ||
{ | ||
"spaces_tertiary": $SPACES_TERTIARY | ||
} | ||
EOF | ||
) |
48 changes: 48 additions & 0 deletions
48
Library/Application Support/Übersicht/widgets/nibar/spaces-tertiary.jsx
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import Desktop from "./lib/Desktop.jsx"; | ||
import Error from "./lib/Error.jsx"; | ||
import parse from "./lib/parse.jsx"; | ||
import styles from "./lib/styles.jsx"; | ||
|
||
const style = { | ||
padding: "0 8px", | ||
display: "grid", | ||
gridAutoFlow: "column", | ||
gridGap: "16px", | ||
position: "fixed", | ||
overflow: "hidden", | ||
left: "0px", | ||
top: "0px", | ||
fontFamily: styles.fontFamily, | ||
lineHeight: styles.lineHeight, | ||
fontSize: styles.fontSize, | ||
color: styles.colors.dim, | ||
fontWeight: styles.fontWeight | ||
}; | ||
|
||
export const refreshFrequency = false; | ||
export const command = "./nibar/scripts/spaces_tertiary.sh"; | ||
|
||
export const render = ({ output }) => { | ||
const data = parse(output); | ||
if (typeof data === "undefined") { | ||
return ( | ||
<div style={style}> | ||
<Error msg="Error: unknown script output" side="left" /> | ||
</div> | ||
); | ||
} | ||
if (typeof data.error !== "undefined") { | ||
return ( | ||
<div style={style}> | ||
<Error msg={`Error: ${data.error}`} side="left" /> | ||
</div> | ||
); | ||
} | ||
return ( | ||
<div style={style}> | ||
<Desktop output={data.spaces_tertiary} /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default null; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ssh -v -N -D 22223 awsgw |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
virt-manager -c 'qemu+ssh://mack/system?socket=/var/run/libvirt/libvirt-sock' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
osascript -e 'tell application "Übersicht" to refresh widget id "nibar-spaces-primary-jsx"' | ||
osascript -e 'tell application "Übersicht" to refresh widget id "nibar-spaces-secondary-jsx"' | ||
osascript -e 'tell application "Übersicht" to refresh widget id "nibar-spaces-tertiary-jsx"' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
function _kill() { | ||
pgrep Übersicht | xargs kill | ||
} | ||
|
||
function _run() { | ||
( "/Applications/Übersicht.app/Contents/MacOS/Übersicht" 2>&1 | tee -a "${HOME}/.uber.log" ) & | ||
} | ||
|
||
|
||
_kill || true | ||
_kill || true | ||
|
||
_run & | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#! /bin/bash | ||
#script to change all desktop backgrounds | ||
if [ -z "$1" ]; then | ||
echo "Please specify an absolute path to an image as first parameter" | ||
exit -1 | ||
fi | ||
|
||
osascript -e "tell application \"System Events\" to set picture of every desktop to \"$1\"" | ||
killall Dock |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
|
||
TMPFILE=`mktemp -q -t tmp.vipe.XXXXXXXXX` | ||
trap "rm -f ${TMPFILE}" EXIT | ||
|
||
# read from stdin | ||
if [ ! -t 0 ]; then | ||
cat - > $TMPFILE | ||
fi | ||
|
||
# spawn editor with stdio connected | ||
${EDITOR} "${TMPFILE}" < /dev/tty > /dev/tty || exit $? | ||
|
||
# write to stdout | ||
cat $TMPFILE && exit 0 || exit $? | ||
|