aboutsummaryrefslogtreecommitdiff
path: root/shellrc.d/sway
blob: 0145bff863cc3b96f0140a8d1816b98d907ce24d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# vim: ft=sh:
# These are utility functions loaded when we are running in Sway
[ "$XDG_CURRENT_DESKTOP" != "sway" ] && return

alias swm='swaymsg'


# Clip stdin to clipboard
clip() {
	wl-copy --trim-newline
}


sway_outputs() {
	swaymsg -t get_outputs
}
sway_inputs() {
	swaymsg -t get_inputs
}

if command -v nix >/dev/null; then

unetbootin() (
	nix shell 'nixpkgs#xorg.xhost' 'nixpkgs#unetbootin' \
		-c 'bash' -c "xhost local:root && sudo QT_X11_NO_MITSHM=1 unetbootin $*"
)

fi