Sway : Replace bin dir with shell functions and dmenu support.
This commit is contained in:
parent
f8ea04d40b
commit
8f3899b7bf
|
@ -35,8 +35,7 @@
|
|||
variables = {
|
||||
FOOT_CONFIG = ./foot/Foot.ini;
|
||||
SWAY_CONFIG = ./sway/module;
|
||||
PATH = [ "/etc/swaybin" ];
|
||||
# PATH = [ "/etc/swaybin" ]; # NOTE: Kept as an example on PATH modification.
|
||||
};
|
||||
etc.swaybin.source = ./sway/bin;
|
||||
};
|
||||
}
|
||||
|
|
9
module/common/Monitor.sh
Normal file
9
module/common/Monitor.sh
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Enable monitors.
|
||||
function monon() {
|
||||
swaymsg 'output "ASUSTek COMPUTER INC ASUS VA24E R2LMTF127165" power on'
|
||||
}
|
||||
|
||||
# Disable monitors.
|
||||
function monoff() {
|
||||
swaymsg 'output "ASUSTek COMPUTER INC ASUS VA24E R2LMTF127165" power off'
|
||||
}
|
5
module/common/bash/module/Dmenu.sh
Normal file
5
module/common/bash/module/Dmenu.sh
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Wrapped dmenu_path to include my functions.
|
||||
function _dmenu_path_wrapped() {
|
||||
dmenu_path
|
||||
find_function | grep -v ^_
|
||||
}
|
9
module/common/bash/module/Network.sh
Normal file
9
module/common/bash/module/Network.sh
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Open bluetooth control panel.
|
||||
function bluetooth() {
|
||||
blueman-manager
|
||||
}
|
||||
|
||||
# Open network control panel.
|
||||
function network() {
|
||||
nm-connection-editor
|
||||
}
|
4
module/common/bash/module/Sound.sh
Normal file
4
module/common/bash/module/Sound.sh
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Open a sound control panel.
|
||||
function sound() {
|
||||
pavucontrol
|
||||
}
|
9
module/common/bash/module/Vrr.sh
Normal file
9
module/common/bash/module/Vrr.sh
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Enable VRR.
|
||||
function vrron() {
|
||||
swaymsg 'output "Huawei Technologies Co., Inc. ZQE-CBA 0xC080F622" adaptive_sync on'
|
||||
}
|
||||
|
||||
# Disable VRR.
|
||||
function vrroff() {
|
||||
swaymsg 'output "Huawei Technologies Co., Inc. ZQE-CBA 0xC080F622" adaptive_sync off'
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
blueman-manager
|
|
@ -1,3 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
poweroff
|
|
@ -1,3 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
swaymsg 'output "ASUSTek COMPUTER INC ASUS VA24E R2LMTF127165" power off'
|
|
@ -1,3 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
swaymsg 'output "ASUSTek COMPUTER INC ASUS VA24E R2LMTF127165" power on'
|
|
@ -1,3 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
nm-connection-editor
|
|
@ -1,3 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
systemctl suspend
|
|
@ -1,3 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
pavucontrol
|
|
@ -1,3 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
swaymsg 'output "Huawei Technologies Co., Inc. ZQE-CBA 0xC080F622" adaptive_sync off'
|
|
@ -1,3 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
swaymsg 'output "Huawei Technologies Co., Inc. ZQE-CBA 0xC080F622" adaptive_sync on'
|
|
@ -1,4 +1,4 @@
|
|||
# Application launcher.
|
||||
# Note: pass the final command to swaymsg so that the resulting window can be opened
|
||||
# on the original workspace that the command was run on.
|
||||
set $menu dmenu_path | wmenu -S d79921 -s 000000 -f "SF Pro Display Medium 14" | xargs swaymsg exec --
|
||||
set $menu _dmenu_path_wrapped | wmenu -S d79921 -s 000000 -f "SF Pro Display Medium 14" | xargs swaymsg exec --
|
||||
|
|
Loading…
Reference in a new issue