Moved window manager relates scripts.

This commit is contained in:
sheldonmlee 2021-02-18 22:18:26 +08:00
parent 52feef486f
commit 9734029033
4 changed files with 67 additions and 3 deletions

View File

@ -381,9 +381,9 @@ globalkeys = gears.table.join(
{description = "open nemo", group = "launcher"}),
-- set to spawn after key release to work
awful.key({ modkey, }, "q", nil, function () awful.spawn.with_shell("~/.config/awesome/screenshot.sh") end,
awful.key({ modkey, }, "q", nil, function () awful.spawn.with_shell("~/.config/wm_scripts/screenshot.sh") end,
{description = "dmenu screenshot prompt", group = "launcher"}),
awful.key({ modkey, }, "1", function() awful.spawn.with_shell("~/.config/awesome/layout.sh") end,
awful.key({ modkey, }, "1", function() awful.spawn.with_shell("~/.config/wm_scripts/layout.sh") end,
{ description = "change keyboard layout", group = "launcher"})
-- layout
-- awful.key({ modkey, altkey, }, "Tab", function() awful.spawn.with_shell("~/.config/awesome/layout.sh") end,
@ -683,6 +683,6 @@ for _,rule in pairs(custom_rules) do
end
-- Autostart:
awful.spawn.with_shell("~/.config/awesome/autorun.sh")
awful.spawn.with_shell("~/.config/awesome/autostart.sh")

12
.config/wm_scripts/autostart.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
function run()
{
if ! pgrep -f $1; then
$1&
fi
}
run firefox
run discord
run "alacritty --working-directory $HOME/"

22
.config/wm_scripts/layout.sh Executable file
View File

@ -0,0 +1,22 @@
#!/bin/bash
# dmenu script to change Xorg layout
options="
1) US\n\
2) Colemak
"
# dmenu
#option=$(echo -e $options | dmenu -i)
# rofi emulation of dmenu
option=$(echo "1) US|2) Colemak" | rofi -dmenu -sep '|' -i)
echo $option
case $option in
1*)
setxkbmap us
;;
2*)
setxkbmap us -variant colemak
;;
esac

View File

@ -0,0 +1,30 @@
#!/bin/bash
#dmenu script for screenshots
CUSTOM_SCRIPTS_FILE=~/.custom_bash_scripts
if test -f $CUSTOM_SCRIPTS_FILE; then
source $CUSTOM_SCRIPTS_FILE
else
echo ".custom_bash_scripts.sh does not exist."
fi
options="
1) Fullscreen\n\
2) Selection
"
#echo -e $options
# -i case insensitive
# -l vertical lines
option=$(echo -e $options | dmenu -i)
#echo "\"$option\""
case $option in
1*)
sleep 0.5
f_scrot
;;
2*)
s_scrot
;;
esac