mirror of
https://github.com/tuxdotrs/tawm.git
synced 2025-07-06 13:06:35 +05:30
add bindings for apps
This commit is contained in:
@ -22,6 +22,7 @@
|
|||||||
"90:class_g = 'discord'"
|
"90:class_g = 'discord'"
|
||||||
"90:class_g = 'code'"
|
"90:class_g = 'code'"
|
||||||
"90:class_g = 'org.wezfurlong.wezterm'"
|
"90:class_g = 'org.wezfurlong.wezterm'"
|
||||||
|
"90:class_g = 'wezterm-floating'"
|
||||||
];
|
];
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -16,13 +16,40 @@ awful.keyboard.append_global_keybindings({
|
|||||||
),
|
),
|
||||||
awful.key({ modkey, mod.shift }, "r", awesome.restart, { description = "reload awesome", group = "awesome" }),
|
awful.key({ modkey, mod.shift }, "r", awesome.restart, { description = "reload awesome", group = "awesome" }),
|
||||||
awful.key({ modkey, mod.shift }, "q", awesome.quit, { description = "quit awesome", group = "awesome" }),
|
awful.key({ modkey, mod.shift }, "q", awesome.quit, { description = "quit awesome", group = "awesome" }),
|
||||||
awful.key({ modkey }, "Return", function()
|
|
||||||
awful.spawn(apps.terminal)
|
-- Apps related keybindings
|
||||||
end, { description = "open a terminal", group = "launcher" }),
|
|
||||||
awful.key({ modkey }, "a", function()
|
awful.key({ modkey }, "a", function()
|
||||||
awful.spawn("rofi -show drun")
|
awful.spawn("rofi -show drun")
|
||||||
end, { description = "run prompt", group = "launcher" }),
|
end, { description = "run prompt", group = "launcher" }),
|
||||||
|
|
||||||
|
awful.key({ modkey }, "Return", function()
|
||||||
|
awful.spawn(apps.terminal)
|
||||||
|
end, { description = "open terminal", group = "launcher" }),
|
||||||
|
|
||||||
|
awful.key({ modkey, mod.shift }, "Return", function()
|
||||||
|
awful.spawn(apps.terminal_floating)
|
||||||
|
end, { description = "open floating terminal", group = "launcher" }),
|
||||||
|
|
||||||
|
awful.key({ modkey }, "v", function()
|
||||||
|
awful.spawn(apps.editor_cmd)
|
||||||
|
end, { description = "open neovim", group = "launcher" }),
|
||||||
|
|
||||||
|
awful.key({ modkey }, "n", function()
|
||||||
|
awful.spawn(apps.neovide)
|
||||||
|
end, { description = "open neovide", group = "launcher" }),
|
||||||
|
|
||||||
|
awful.key({ modkey }, "b", function()
|
||||||
|
awful.spawn(apps.browser)
|
||||||
|
end, { description = "open browser", group = "launcher" }),
|
||||||
|
|
||||||
|
awful.key({ modkey }, "d", function()
|
||||||
|
awful.spawn("discord")
|
||||||
|
end, { description = "open discord", group = "launcher" }),
|
||||||
|
|
||||||
|
awful.key({ modkey }, "t", function()
|
||||||
|
awful.spawn(apps.file_explorer)
|
||||||
|
end, { description = "open file explorer", group = "launcher" }),
|
||||||
|
|
||||||
-- Focus related keybindings.
|
-- Focus related keybindings.
|
||||||
awful.key({ modkey }, "Left", function()
|
awful.key({ modkey }, "Left", function()
|
||||||
awful.client.focus.bydirection("left")
|
awful.client.focus.bydirection("left")
|
||||||
|
@ -1,8 +1,12 @@
|
|||||||
-- This is used later as the default terminal and editor to run.
|
-- This is used later as the default terminal and editor to run.
|
||||||
local apps = {}
|
local apps = {}
|
||||||
apps.terminal = "wezterm"
|
apps.terminal = "wezterm"
|
||||||
|
apps.terminal_floating = "wezterm start --class wezterm-floating"
|
||||||
apps.editor = "nvim"
|
apps.editor = "nvim"
|
||||||
apps.editor_cmd = apps.terminal .. " -e " .. apps.editor
|
apps.editor_cmd = apps.terminal .. " -e " .. apps.editor
|
||||||
|
apps.neovide = "neovide"
|
||||||
|
apps.browser = "firefox"
|
||||||
|
apps.file_explorer = "thunar"
|
||||||
|
|
||||||
-- Set the terminal for the menubar.
|
-- Set the terminal for the menubar.
|
||||||
require("menubar").utils.terminal = apps.terminal
|
require("menubar").utils.terminal = apps.terminal
|
||||||
|
@ -25,17 +25,13 @@ ruled.client.connect_signal("request::rules", function()
|
|||||||
"Arandr",
|
"Arandr",
|
||||||
".blueman-manager-wrapped",
|
".blueman-manager-wrapped",
|
||||||
"Gpick",
|
"Gpick",
|
||||||
},
|
"wezterm-floating",
|
||||||
-- Note that the name property shown in xprop might be set slightly after creation of the client
|
|
||||||
-- and the name shown there might not match defined rules here.
|
|
||||||
name = {
|
|
||||||
"Event Tester", -- xev.
|
|
||||||
},
|
|
||||||
role = {
|
|
||||||
"pop-up", -- e.g. Google Chrome's (detached) Developer Tools.
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
properties = { floating = true },
|
properties = {
|
||||||
|
floating = true,
|
||||||
|
placement = awful.placement.centered,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Add titlebars to normal clients and dialogs.
|
-- Add titlebars to normal clients and dialogs.
|
||||||
@ -45,9 +41,29 @@ ruled.client.connect_signal("request::rules", function()
|
|||||||
-- properties = { titlebars_enabled = true },
|
-- properties = { titlebars_enabled = true },
|
||||||
-- })
|
-- })
|
||||||
|
|
||||||
-- Set Firefox to always map on the tag named '2' on screen 1.
|
-- Map newly created windows to specific tags
|
||||||
-- ruled.client.append_rule({
|
ruled.client.append_rule({
|
||||||
-- rule = { class = 'Firefox' },
|
rule = { class = "org.wezfurlong.wezterm" },
|
||||||
-- properties = { screen = 1, tag = '2' }
|
properties = { screen = 1, tag = "1" },
|
||||||
-- })
|
})
|
||||||
|
|
||||||
|
ruled.client.append_rule({
|
||||||
|
rule = { class = "neovide" },
|
||||||
|
properties = { screen = 1, tag = "1" },
|
||||||
|
})
|
||||||
|
|
||||||
|
ruled.client.append_rule({
|
||||||
|
rule = { class = "firefox" },
|
||||||
|
properties = { screen = 1, tag = "3" },
|
||||||
|
})
|
||||||
|
|
||||||
|
ruled.client.append_rule({
|
||||||
|
rule = { class = "Thunar" },
|
||||||
|
properties = { screen = 1, tag = "3" },
|
||||||
|
})
|
||||||
|
|
||||||
|
ruled.client.append_rule({
|
||||||
|
rule = { class = "discord" },
|
||||||
|
properties = { screen = 1, tag = "4" },
|
||||||
|
})
|
||||||
end)
|
end)
|
||||||
|
Reference in New Issue
Block a user