Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a2beb1301c |
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,6 +1,3 @@
|
|||||||
battery-widget
|
battery-widget
|
||||||
keyboard-layout-indicator
|
keyboard-layout-indicator
|
||||||
revelation
|
revelation
|
||||||
awesome-switcher
|
|
||||||
.idea
|
|
||||||
*.iml
|
|
||||||
|
|||||||
19
askme.sh
19
askme.sh
@ -1,19 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
rc=-1
|
|
||||||
# while [[ $rc != [01] ]]; do ✔ took 4s at 07:46:30
|
|
||||||
ans=$(zenity --info --title 'Choose!' \
|
|
||||||
--text 'Autostart apps?' \
|
|
||||||
--ok-label YES \
|
|
||||||
--extra-button NO \
|
|
||||||
--timeout 15)
|
|
||||||
rc=$?
|
|
||||||
echo "${rc}-${ans}"
|
|
||||||
# done
|
|
||||||
if [[ $rc = 1 ]]
|
|
||||||
then
|
|
||||||
echo "exiting"
|
|
||||||
else
|
|
||||||
echo "startng"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
42
autorun.sh
42
autorun.sh
@ -1,21 +1,12 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
function run {
|
function run {
|
||||||
if ! pgrep $1; then
|
if ! pgrep $1 ;
|
||||||
|
then
|
||||||
$@&
|
$@&
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
ans=$(zenity --info --title 'Choose!' \
|
|
||||||
--text 'Autostart tray icons?' \
|
|
||||||
--ok-label YES \
|
|
||||||
--extra-button NO \
|
|
||||||
--timeout 15)
|
|
||||||
rc1=$?
|
|
||||||
echo "${rc}-${ans}"
|
|
||||||
|
|
||||||
if [[ $rc1 = 1 ]]; then
|
|
||||||
echo "exiting"
|
|
||||||
else
|
|
||||||
# utilities in top bar
|
# utilities in top bar
|
||||||
# network manager
|
# network manager
|
||||||
run /usr/bin/nm-applet
|
run /usr/bin/nm-applet
|
||||||
@ -26,40 +17,21 @@ else
|
|||||||
# volume control
|
# volume control
|
||||||
run /usr/bin/pasystray
|
run /usr/bin/pasystray
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
ans=$(zenity --info --title 'Choose!' \
|
|
||||||
--text 'Autostart apps?' \
|
|
||||||
--ok-label YES \
|
|
||||||
--extra-button NO \
|
|
||||||
--timeout 15)
|
|
||||||
rc=$?
|
|
||||||
echo "${rc}-${ans}"
|
|
||||||
|
|
||||||
if [[ $rc = 1 ]]; then
|
|
||||||
echo "exiting"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# tag 1
|
# tag 1
|
||||||
#run /usr/local/bin/jetbrains-toolbox
|
run idea
|
||||||
run /snap/bin/intellij-idea-ultimate
|
|
||||||
# tag 2
|
# tag 2
|
||||||
run /opt/google/chrome/chrome
|
run /opt/google/chrome/chrome
|
||||||
# tag 3
|
# tag 3
|
||||||
run /usr/bin/terminator
|
run /usr/bin/terminator
|
||||||
# tag 4
|
# tag 4
|
||||||
run /snap/bin/code
|
run /usr/bin/code
|
||||||
# tag 5
|
# tag 5
|
||||||
run /usr/bin/zoom
|
run /usr/bin/zoom
|
||||||
#run /snap/bin/teams
|
run /usr/bin/teams
|
||||||
run /snap/bin/rambox
|
|
||||||
#tag 6
|
#tag 6
|
||||||
run /snap/bin/rocketchat-desktop
|
run /snap/bin/rocketchat-desktop
|
||||||
run /usr/bin/thunderbird
|
run /usr/bin/thunderbird
|
||||||
#run /snap/bin/discord
|
run /usr/bin/discord
|
||||||
# tag 7
|
# tag 7
|
||||||
run /snap/bin/bitwarden
|
run /usr/bin/bitwarden
|
||||||
# run /usr/bin/keepassx
|
# run /usr/bin/keepassx
|
||||||
# tag 12
|
|
||||||
run /snap/bin/firefox
|
|
||||||
|
|||||||
@ -1,6 +1,4 @@
|
|||||||
git clone https://github.com/deficient/battery-widget.git
|
git clone https://github.com/deficient/battery-widget.git
|
||||||
git clone https://github.com/deficient/keyboard-layout-indicator.git
|
git clone https://github.com/deficient/keyboard-layout-indicator.git
|
||||||
git clone https://github.com/guotsuan/awesome-revelation revelation
|
git clone https://github.com/guotsuan/awesome-revelation revelation
|
||||||
git clone https://github.com/berlam/awesome-switcher.git awesome-switcher
|
sudo apt-get install acpid
|
||||||
sudo apt update
|
|
||||||
sudo apt-get install acpid fonts-emojione fonts-noto-color-emoji
|
|
||||||
|
|||||||
386
rc.lua
386
rc.lua
@ -18,60 +18,24 @@ local battery_widget = require("battery-widget")
|
|||||||
local keyboard_layout_indicator = require("keyboard-layout-indicator")
|
local keyboard_layout_indicator = require("keyboard-layout-indicator")
|
||||||
local revelation=require("revelation")
|
local revelation=require("revelation")
|
||||||
|
|
||||||
revelation.curr_tag_only = true
|
|
||||||
|
|
||||||
-- Load Debian menu entries
|
-- Load Debian menu entries
|
||||||
local debian = require("debian.menu")
|
local debian = require("debian.menu")
|
||||||
local has_fdo, freedesktop = pcall(require, "freedesktop")
|
local has_fdo, freedesktop = pcall(require, "freedesktop")
|
||||||
|
|
||||||
local switcher = require("awesome-switcher")
|
|
||||||
|
|
||||||
switcher.settings.preview_box = true -- display preview-box
|
|
||||||
switcher.settings.preview_box_bg = "#ddddddaa" -- background color
|
|
||||||
switcher.settings.preview_box_border = "#22222200" -- border-color
|
|
||||||
switcher.settings.preview_box_fps = 30 -- refresh framerate
|
|
||||||
switcher.settings.preview_box_delay = 150 -- delay in ms
|
|
||||||
switcher.settings.preview_box_title_font = {"sans","italic","normal"}-- the font for cairo
|
|
||||||
switcher.settings.preview_box_title_font_size_factor = 0.8 -- the font sizing factor
|
|
||||||
switcher.settings.preview_box_title_color = {0,0,0,1} -- the font color
|
|
||||||
|
|
||||||
switcher.settings.client_opacity = false -- opacity for unselected clients
|
|
||||||
switcher.settings.client_opacity_value = 0.5 -- alpha-value for any client
|
|
||||||
switcher.settings.client_opacity_value_in_focus = 0.5 -- alpha-value for the client currently in focus
|
|
||||||
switcher.settings.client_opacity_value_selected = 1 -- alpha-value for the selected client
|
|
||||||
|
|
||||||
switcher.settings.cycle_raise_client = true -- raise clients on cycle
|
|
||||||
|
|
||||||
local KEY_ALT = "Mod1"
|
local KEY_ALT = "Mod1"
|
||||||
|
|
||||||
local tag1 = "1"
|
local tag1 = "1:idea"
|
||||||
local tag2 = "2"
|
local tag2 = "2:brow"
|
||||||
local tag3 = "3"
|
local tag3 = "3:term"
|
||||||
local tag4 = "4"
|
local tag4 = "4:code"
|
||||||
local tag5 = "5"
|
local tag5 = "5:zoom"
|
||||||
local tag6 = "6"
|
local tag6 = "6:chat"
|
||||||
local tag7 = "7"
|
local tag7 = "7:pass"
|
||||||
local tag8 = "8"
|
local tag8 = "8"
|
||||||
local tag9 = "9"
|
local tag9 = "9"
|
||||||
|
|
||||||
local tag10 = "10"
|
|
||||||
local tag11 = "11"
|
|
||||||
local tag12 = "12"
|
|
||||||
local tag13 = "13"
|
|
||||||
local tag14 = "14"
|
|
||||||
local tag15 = "15"
|
|
||||||
local tag16 = "16"
|
|
||||||
local tag17 = "17"
|
|
||||||
local tag18 = "18"
|
|
||||||
local tag19 = "19"
|
|
||||||
local tag20 = "20"
|
|
||||||
|
|
||||||
-- Numpad: [0-9] = [#90, #87-#89, #83-#85, #79-#81]
|
|
||||||
local numpadMap = { 87, 88, 89, 83, 84, 85, 79, 80, 81, 90 }
|
|
||||||
|
|
||||||
local tags = {
|
local tags = {
|
||||||
tag1,tag2,tag3,tag4,tag5,tag6,tag7,tag8,tag9,tag10,
|
tag1,tag2,tag3,tag4,tag5,tag6,tag7,tag8,tag9
|
||||||
tag11,tag12,tag13,tag14,tag15,tag16,tag17,tag18,tag19,tag20
|
|
||||||
}
|
}
|
||||||
|
|
||||||
local wibar_font="Deja Vu Sans Mono 14"
|
local wibar_font="Deja Vu Sans Mono 14"
|
||||||
@ -310,102 +274,6 @@ local function set_wallpaper(s)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- get count of elements in table
|
|
||||||
function tablelength(T)
|
|
||||||
local count = 0
|
|
||||||
for _ in pairs(T) do count = count + 1 end
|
|
||||||
return count
|
|
||||||
end
|
|
||||||
|
|
||||||
-- return all client from selected tag
|
|
||||||
local function getAllClient()
|
|
||||||
local focusedScreen = awful.screen.focused ()
|
|
||||||
local t = focusedScreen.selected_tag
|
|
||||||
local clientsOnTag = t:clients()
|
|
||||||
return clientsOnTag
|
|
||||||
end
|
|
||||||
|
|
||||||
-- restore the given client
|
|
||||||
local function restoreClient(currentClient)
|
|
||||||
currentClient.minimized = false
|
|
||||||
currentClient.maximized = false
|
|
||||||
currentClient.fullscreen = false
|
|
||||||
end
|
|
||||||
|
|
||||||
-- make all client minimized=false,maximized=false,fullscreen=false
|
|
||||||
local function restoreAll()
|
|
||||||
local clientsOnTag = getAllClient()
|
|
||||||
for k, currentClient in pairs(clientsOnTag) do
|
|
||||||
restoreClient(currentClient)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- minimize the given client
|
|
||||||
local function minimizeClient(currentClient)
|
|
||||||
currentClient.minimized = true
|
|
||||||
currentClient.maximized = false
|
|
||||||
currentClient.fullscreen = false
|
|
||||||
end
|
|
||||||
|
|
||||||
-- minimize all client
|
|
||||||
local function minimizeAll()
|
|
||||||
local clientsOnTag = getAllClient()
|
|
||||||
for k, currentClient in pairs(clientsOnTag) do
|
|
||||||
minimizeClient(currentClient)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- make all client minimized=false,maximized=false,fullscreen=false
|
|
||||||
local function selectClientIdx(idx)
|
|
||||||
local clientsOnTag = getAllClient()
|
|
||||||
local clientCount = tablelength(clientsOnTag)
|
|
||||||
minimizeAll()
|
|
||||||
if ( clientCount >= idx ) then
|
|
||||||
local clientToFocus = clientsOnTag[idx];
|
|
||||||
client.focus = clientToFocus
|
|
||||||
clientToFocus:raise()
|
|
||||||
restoreClient(clientToFocus)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- only the focused client will be opened, all other client minimized
|
|
||||||
local function normalizeClients()
|
|
||||||
local focusedScreen = awful.screen.focused ()
|
|
||||||
local focusedClient = client.focus
|
|
||||||
local t = focusedScreen.selected_tag
|
|
||||||
local clientsOnTag = t:clients()
|
|
||||||
|
|
||||||
for k, currentClient in pairs(clientsOnTag) do
|
|
||||||
currentClient.maximized = false
|
|
||||||
if currentClient == focusedClient then
|
|
||||||
currentClient.minimized = false
|
|
||||||
else
|
|
||||||
currentClient.minimized = true;
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function move_tag_to_focused_screen(tagName)
|
|
||||||
-- For all screens: find tag by name
|
|
||||||
print("looking for tag " .. tagName)
|
|
||||||
local tagByName = awful.tag.find_by_name(nil, tagName)
|
|
||||||
if tag then
|
|
||||||
print("tag found with name" .. tagName)
|
|
||||||
local screenFocused = awful.screen.focused()
|
|
||||||
tagByName.screen=screenFocused
|
|
||||||
tagByName:view_only()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function move_client_to_tag(tagName)
|
|
||||||
if client.focus then
|
|
||||||
local tag = awful.tag.find_by_name(nil, tagName)
|
|
||||||
if tag then
|
|
||||||
client.focus:move_to_tag(tag)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Re-set wallpaper when a screen's geometry changes (e.g. different resolution)
|
-- Re-set wallpaper when a screen's geometry changes (e.g. different resolution)
|
||||||
screen.connect_signal("property::geometry", set_wallpaper)
|
screen.connect_signal("property::geometry", set_wallpaper)
|
||||||
|
|
||||||
@ -483,40 +351,8 @@ root.buttons(gears.table.join(
|
|||||||
-- {{{ Key bindings
|
-- {{{ Key bindings
|
||||||
-- mod + s = show help
|
-- mod + s = show help
|
||||||
globalkeys = gears.table.join(
|
globalkeys = gears.table.join(
|
||||||
awful.key({ modkey, "Control" }, "v",
|
|
||||||
function ()
|
|
||||||
for _, c in ipairs(client.get()) do
|
|
||||||
awful.titlebar.show(c)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
{description = "show titles", group = "awesome"}
|
|
||||||
),
|
|
||||||
awful.key({ modkey }, "v",
|
|
||||||
function ()
|
|
||||||
for _, c in ipairs(client.get()) do
|
|
||||||
awful.titlebar.hide(c)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
{description = "hide titles", group = "awesome"}
|
|
||||||
),
|
|
||||||
awful.key({ modkey }, "b",
|
|
||||||
function ()
|
|
||||||
myscreen = awful.screen.focused()
|
|
||||||
myscreen.mywibox.visible = not myscreen.mywibox.visible
|
|
||||||
end,
|
|
||||||
{description = "toggle statusbar", group = "awesome"}
|
|
||||||
),
|
|
||||||
awful.key({ "Mod1", }, "Tab",
|
|
||||||
function ()
|
|
||||||
switcher.switch( 1, "Mod1", "Alt_L", "Shift", "Tab")
|
|
||||||
end),
|
|
||||||
|
|
||||||
awful.key({ "Mod1", "Shift" }, "Tab",
|
|
||||||
function ()
|
|
||||||
switcher.switch(-1, "Mod1", "Alt_L", "Shift", "Tab")
|
|
||||||
end),
|
|
||||||
-- mod + e -> custom widget revelation
|
-- mod + e -> custom widget revelation
|
||||||
awful.key({ modkey, }, "e", revelation),
|
-- awful.key({ modkey, }, "e", revelation),
|
||||||
awful.key({ modkey, }, "s", hotkeys_popup.show_help,
|
awful.key({ modkey, }, "s", hotkeys_popup.show_help,
|
||||||
{description="show help", group="awesome"}),
|
{description="show help", group="awesome"}),
|
||||||
-- mod + left|right -> view next/prev tag
|
-- mod + left|right -> view next/prev tag
|
||||||
@ -524,10 +360,6 @@ end,
|
|||||||
{description = "view previous", group = "tag"}),
|
{description = "view previous", group = "tag"}),
|
||||||
awful.key({ modkey, }, "Right", awful.tag.viewnext,
|
awful.key({ modkey, }, "Right", awful.tag.viewnext,
|
||||||
{description = "view next", group = "tag"}),
|
{description = "view next", group = "tag"}),
|
||||||
awful.key({ modkey, }, "End", awful.tag.viewprev,
|
|
||||||
{description = "view previous", group = "tag"}),
|
|
||||||
awful.key({ modkey, }, "Home", awful.tag.viewnext,
|
|
||||||
{description = "view next", group = "tag"}),
|
|
||||||
-- mod + Esc -> tag history resotre
|
-- mod + Esc -> tag history resotre
|
||||||
awful.key({ modkey, }, "Escape", awful.tag.history.restore,
|
awful.key({ modkey, }, "Escape", awful.tag.history.restore,
|
||||||
{description = "go back", group = "tag"}),
|
{description = "go back", group = "tag"}),
|
||||||
@ -535,7 +367,6 @@ end,
|
|||||||
awful.key({ modkey, }, "j",
|
awful.key({ modkey, }, "j",
|
||||||
function ()
|
function ()
|
||||||
awful.client.focus.byidx( 1)
|
awful.client.focus.byidx( 1)
|
||||||
--swapClient(1)
|
|
||||||
end,
|
end,
|
||||||
{description = "focus next by index", group = "client"}
|
{description = "focus next by index", group = "client"}
|
||||||
),
|
),
|
||||||
@ -545,44 +376,20 @@ end,
|
|||||||
end,
|
end,
|
||||||
{description = "focus previous by index", group = "client"}
|
{description = "focus previous by index", group = "client"}
|
||||||
),
|
),
|
||||||
awful.key({ modkey, }, "o",
|
|
||||||
function ()
|
|
||||||
restoreAll()
|
|
||||||
end,
|
|
||||||
{description = "restore all", group = "client"}
|
|
||||||
),
|
|
||||||
awful.key({ modkey}, "Prior",
|
|
||||||
function ()
|
|
||||||
restoreAll()
|
|
||||||
awful.client.focus.byidx( 1)
|
|
||||||
normalizeClients()
|
|
||||||
end,
|
|
||||||
{description = "focus next by index", group = "client"}
|
|
||||||
),
|
|
||||||
awful.key({ modkey }, "Next",
|
|
||||||
function ()
|
|
||||||
restoreAll()
|
|
||||||
awful.client.focus.byidx(-1)
|
|
||||||
normalizeClients()
|
|
||||||
end,
|
|
||||||
{description = "focus previous by index", group = "client"}
|
|
||||||
),
|
|
||||||
-- mod + w -> show main menu
|
-- mod + w -> show main menu
|
||||||
awful.key({ modkey, }, "w", function () mymainmenu:show() end,
|
awful.key({ modkey, }, "w", function () mymainmenu:show() end,
|
||||||
{description = "show main menu", group = "awesome"}),
|
{description = "show main menu", group = "awesome"}),
|
||||||
|
|
||||||
-- Layout manipulation
|
-- Layout manipulation
|
||||||
-- md + shift + j|k -> swap client wiht next|prev client in tag
|
-- mod + shift + j|k -> swap client wiht next|prev client in tag
|
||||||
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end,
|
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end,
|
||||||
{description = "swap with next client by index", group = "client"}),
|
{description = "swap with next client by index", group = "client"}),
|
||||||
awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end,
|
awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end,
|
||||||
{description = "swap with previous client by index", group = "client"}),
|
{description = "swap with previous client by index", group = "client"}),
|
||||||
-- mod + é|á|ű -> focus next|prev screen
|
-- mod + ctrl + j|k -> focus next|prev screen
|
||||||
awful.key({ modkey }, "é", function () awful.screen.focus( 1) end,
|
awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end,
|
||||||
{description = "focus the next screen", group = "screen"}),
|
{description = "focus the next screen", group = "screen"}),
|
||||||
awful.key({ modkey }, "á", function () awful.screen.focus(2) end,
|
awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end,
|
||||||
{description = "focus the previous screen", group = "screen"}),
|
|
||||||
awful.key({ modkey }, "ű", function () awful.screen.focus(3) end,
|
|
||||||
{description = "focus the previous screen", group = "screen"}),
|
{description = "focus the previous screen", group = "screen"}),
|
||||||
-- mod + u -> urgent client
|
-- mod + u -> urgent client
|
||||||
awful.key({ modkey, }, "u", awful.client.urgent.jumpto,
|
awful.key({ modkey, }, "u", awful.client.urgent.jumpto,
|
||||||
@ -716,12 +523,31 @@ clientkeys = gears.table.join(
|
|||||||
{description = "(un)maximize horizontally", group = "client"})
|
{description = "(un)maximize horizontally", group = "client"})
|
||||||
)
|
)
|
||||||
|
|
||||||
|
local function move_tag_to_focused_screen(tagName)
|
||||||
|
-- For all screens: find tag by name
|
||||||
|
print("looking for tag " .. tagName)
|
||||||
|
local tagByName = awful.tag.find_by_name(nil, tagName)
|
||||||
|
if tag then
|
||||||
|
print("tag found with name" .. tagName)
|
||||||
|
local screenFocused = awful.screen.focused()
|
||||||
|
tagByName.screen=screenFocused
|
||||||
|
tagByName:view_only()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function move_client_to_tag(tagName)
|
||||||
|
if client.focus then
|
||||||
|
local tag = awful.tag.find_by_name(nil, tagName)
|
||||||
|
if tag then
|
||||||
|
client.focus:move_to_tag(tag)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Bind all key numbers to tags.
|
-- Bind all key numbers to tags.
|
||||||
-- Be careful: we use keycodes to make it work on any keyboard layout.
|
-- Be careful: we use keycodes to make it work on any keyboard layout.
|
||||||
-- This should map on the top row of your keyboard, usually 1 to 9.
|
-- This should map on the top row of your keyboard, usually 1 to 9.
|
||||||
for i = 1, 10 do
|
for i = 1, 9 do
|
||||||
globalkeys = gears.table.join(globalkeys,
|
globalkeys = gears.table.join(globalkeys,
|
||||||
-- View tag only.
|
-- View tag only.
|
||||||
-- mod + i -> show tag
|
-- mod + i -> show tag
|
||||||
@ -736,13 +562,11 @@ for i = 1, 10 do
|
|||||||
end,
|
end,
|
||||||
{description = "view tag #"..i, group = "tag"}),
|
{description = "view tag #"..i, group = "tag"}),
|
||||||
|
|
||||||
-- awful.key({ modkey, KEY_ALT }, "#" .. i + 9,
|
awful.key({ modkey, KEY_ALT }, "#" .. i + 9,
|
||||||
-- awful.key({ modkey, KEY_ALT }, "#" .. i + 9,
|
|
||||||
awful.key({ modkey, KEY_ALT }, "#" .. numpadMap[i],
|
|
||||||
function ()
|
function ()
|
||||||
selectClientIdx(i)
|
move_tag_to_focused_screen(tags[i])
|
||||||
end,
|
end,
|
||||||
{description = "select client in active tag #"..i, group = "client"}),
|
{description = "view tag #"..i, group = "tag"}),
|
||||||
|
|
||||||
-- Toggle tag display.
|
-- Toggle tag display.
|
||||||
--
|
--
|
||||||
@ -768,76 +592,19 @@ for i = 1, 10 do
|
|||||||
-- end
|
-- end
|
||||||
move_client_to_tag(tags[i])
|
move_client_to_tag(tags[i])
|
||||||
end,
|
end,
|
||||||
{description = "move focused client to tag #"..i, group = "tag"})
|
{description = "move focused client to tag #"..i, group = "tag"}),
|
||||||
-- Toggle tag on focused client.
|
-- Toggle tag on focused client.
|
||||||
-- mod + ctrl + shift +i -> toggle focused client on tag
|
-- mod + ctrl + shift +i -> toggle focused client on tag
|
||||||
--awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
|
awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
|
||||||
-- function ()
|
|
||||||
-- if client.focus then
|
|
||||||
-- local tag = client.focus.screen.tags[i]
|
|
||||||
-- if tag then
|
|
||||||
-- client.focus:toggle_tag(tag)
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
-- end,
|
|
||||||
-- {description = "toggle focused client on tag #" .. i, group = "tag"})
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- tags 11-20
|
|
||||||
for i = 1, 10 do
|
|
||||||
globalkeys = gears.table.join(globalkeys,
|
|
||||||
-- View tag only.
|
|
||||||
-- mod + i -> show tag
|
|
||||||
awful.key({ modkey }, "#" .. numpadMap[i],
|
|
||||||
function ()
|
function ()
|
||||||
-- local screen = awful.screen.focused()
|
if client.focus then
|
||||||
-- local tag = screen.tags[i]
|
local tag = client.focus.screen.tags[i]
|
||||||
-- if tag then
|
|
||||||
-- tag:view_only()
|
|
||||||
-- end
|
|
||||||
move_tag_to_focused_screen(tags[10+ i])
|
|
||||||
end,
|
|
||||||
{description = "view tag #"..(10+i), group = "tag"}),
|
|
||||||
|
|
||||||
|
|
||||||
-- Toggle tag display.
|
|
||||||
--
|
|
||||||
-- mod + ctrl + i -> show/hide tag
|
|
||||||
awful.key({ modkey, "Control" }, "#" .. numpadMap[i],
|
|
||||||
function ()
|
|
||||||
local screen = awful.screen.focused()
|
|
||||||
local tag = screen.tags[10+i]
|
|
||||||
if tag then
|
if tag then
|
||||||
awful.tag.viewtoggle(tag)
|
client.focus:toggle_tag(tag)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
{description = "toggle tag #" .. (10+i), group = "tag"}),
|
{description = "toggle focused client on tag #" .. i, group = "tag"})
|
||||||
-- Move client to tag.
|
|
||||||
-- mod + shift + i -> move client to tag
|
|
||||||
awful.key({ modkey, "Shift" }, "#" .. numpadMap[i],
|
|
||||||
function ()
|
|
||||||
-- if client.focus then
|
|
||||||
-- local tag = client.focus.screen.tags[i]
|
|
||||||
-- if tag then
|
|
||||||
-- client.focus:move_to_tag(tag)
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
move_client_to_tag(tags[10+i])
|
|
||||||
end,
|
|
||||||
{description = "move focused client to tag #"..(10+i), group = "tag"})
|
|
||||||
-- Toggle tag on focused client.
|
|
||||||
-- mod + ctrl + shift +i -> toggle focused client on tag
|
|
||||||
-- awful.key({ modkey, "Control", "Shift" }, "#" .. np_map[i],
|
|
||||||
-- function ()
|
|
||||||
-- if client.focus then
|
|
||||||
-- local tag = client.focus.screen.tags[i]
|
|
||||||
-- if tag then
|
|
||||||
-- client.focus:toggle_tag(tag)
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
-- end,
|
|
||||||
-- {description = "toggle focused client on tag #" .. i, group = "tag"})
|
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -869,7 +636,6 @@ local function getTagByName(tagName)
|
|||||||
return awful.tag.find_by_name(nil, tagName)
|
return awful.tag.find_by_name(nil, tagName)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- {{{ Rules
|
-- {{{ Rules
|
||||||
-- Rules to apply to new clients (through the "manage" signal).
|
-- Rules to apply to new clients (through the "manage" signal).
|
||||||
awful.rules.rules = {
|
awful.rules.rules = {
|
||||||
@ -882,35 +648,39 @@ awful.rules.rules = {
|
|||||||
keys = clientkeys,
|
keys = clientkeys,
|
||||||
buttons = clientbuttons,
|
buttons = clientbuttons,
|
||||||
screen = awful.screen.preferred,
|
screen = awful.screen.preferred,
|
||||||
placement = awful.placement.no_overlap+awful.placement.no_offscreen
|
placement = awful.placement.no_overlap+awful.placement.no_offscreen,
|
||||||
|
maximized_vertical = false,
|
||||||
|
maximized_horizontal = false,
|
||||||
|
-- floating = false,
|
||||||
|
maximized = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Floating clients.
|
-- Floating clients.
|
||||||
-- { rule_any = {
|
{ rule_any = {
|
||||||
-- instance = {
|
instance = {
|
||||||
-- "DTA", -- Firefox addon DownThemAll.
|
"DTA", -- Firefox addon DownThemAll.
|
||||||
-- "copyq", -- Includes session name in class.
|
"copyq", -- Includes session name in class.
|
||||||
-- },
|
},
|
||||||
-- class = {
|
class = {
|
||||||
-- "Arandr",
|
"Arandr",
|
||||||
-- "Gpick",
|
"Gpick",
|
||||||
-- "Kruler",
|
"Kruler",
|
||||||
-- "MessageWin", -- kalarm.
|
"MessageWin", -- kalarm.
|
||||||
-- "Sxiv",
|
"Sxiv",
|
||||||
-- "Wpa_gui",
|
"Wpa_gui",
|
||||||
-- "pinentry",
|
"pinentry",
|
||||||
-- "veromix",
|
"veromix",
|
||||||
-- "xtightvncviewer"},
|
"xtightvncviewer"},
|
||||||
|
|
||||||
-- name = {
|
name = {
|
||||||
-- "Event Tester", -- xev.
|
"Event Tester", -- xev.
|
||||||
-- },
|
},
|
||||||
-- role = {
|
role = {
|
||||||
-- "AlarmWindow", -- Thunderbird's calendar.
|
"AlarmWindow", -- Thunderbird's calendar.
|
||||||
-- "pop-up", -- e.g. Google Chrome's (detached) Developer Tools.
|
"pop-up", -- e.g. Google Chrome's (detached) Developer Tools.
|
||||||
-- }
|
}
|
||||||
-- }, properties = { floating = true }},
|
}, properties = { floating = true }},
|
||||||
|
|
||||||
-- Add titlebars to normal clients and dialogs
|
-- Add titlebars to normal clients and dialogs
|
||||||
{ rule_any = {type = { "normal", "dialog" }
|
{ rule_any = {type = { "normal", "dialog" }
|
||||||
@ -934,10 +704,8 @@ awful.rules.rules = {
|
|||||||
{ rule = { instance = "zoom" },
|
{ rule = { instance = "zoom" },
|
||||||
properties = { screen = function () return getScreenByTagName(tag5) end, tag = tag5 } },
|
properties = { screen = function () return getScreenByTagName(tag5) end, tag = tag5 } },
|
||||||
-- microsoft teams - preview -> tag5
|
-- microsoft teams - preview -> tag5
|
||||||
-- { rule = { instance = "microsoft teams - preview" },
|
{ rule = { instance = "microsoft teams - preview" },
|
||||||
-- properties = { screen = function () return getScreenByTagName(tag5) end, tag = tag5 } },
|
properties = { screen = function () return getScreenByTagName(tag5) end, tag = tag5 } },
|
||||||
{ rule = { class = "rambox" },
|
|
||||||
properties = { screen = function () return getScreenByTagName(tag6) end, tag = tag6 } },
|
|
||||||
-- rocket.chat-> tag6
|
-- rocket.chat-> tag6
|
||||||
{ rule = { instance = "rocket.chat" },
|
{ rule = { instance = "rocket.chat" },
|
||||||
properties = { screen = function () return getScreenByTagName(tag6) end, tag = tag6 } },
|
properties = { screen = function () return getScreenByTagName(tag6) end, tag = tag6 } },
|
||||||
@ -945,17 +713,14 @@ awful.rules.rules = {
|
|||||||
{ rule = { instance = "discord" },
|
{ rule = { instance = "discord" },
|
||||||
properties = { screen = function () return getScreenByTagName(tag6) end, tag = tag6 } },
|
properties = { screen = function () return getScreenByTagName(tag6) end, tag = tag6 } },
|
||||||
-- Thunderbird -> tag6
|
-- Thunderbird -> tag6
|
||||||
{ rule = { class = "thunderbird" },
|
{ rule = { class = "Thunderbird" },
|
||||||
properties = { screen = function () return getScreenByTagName(tag6) end, tag = tag17 } },
|
properties = { screen = function () return getScreenByTagName(tag6) end, tag = tag6 } },
|
||||||
-- Bitwarden -> tag7
|
-- Bitwarden -> tag7
|
||||||
{ rule = { instance = "bitwarden" },
|
{ rule = { instance = "bitwarden" },
|
||||||
properties = { screen = function () return getScreenByTagName(tag7) end, tag = tag7 } },
|
properties = { screen = function () return getScreenByTagName(tag7) end, tag = tag7 } },
|
||||||
-- keepass2 -> tag7
|
-- keepass2 -> tag7
|
||||||
{ rule = { instance = "keepassx" },
|
{ rule = { instance = "keepassx" },
|
||||||
properties = { screen = function () return getScreenByTagName(tag7) end, tag = tag7 } },
|
properties = { screen = function () return getScreenByTagName(tag7) end, tag = tag7 } },
|
||||||
-- fireefox -> tag12
|
|
||||||
{ rule = { class = "firefox" },
|
|
||||||
properties = { screen = function () return getScreenByTagName(tag12) end, tag = tag12 } },
|
|
||||||
-- Set Firefox to always map on the tag named "2" on screen 1.
|
-- Set Firefox to always map on the tag named "2" on screen 1.
|
||||||
-- { rule = { class = "Firefox" },
|
-- { rule = { class = "Firefox" },
|
||||||
-- properties = { screen = 1, tag = "2" } },
|
-- properties = { screen = 1, tag = "2" } },
|
||||||
@ -969,6 +734,7 @@ client.connect_signal("manage", function (c)
|
|||||||
-- i.e. put it at the end of others instead of setting it master.
|
-- i.e. put it at the end of others instead of setting it master.
|
||||||
-- if not awesome.startup then awful.client.setslave(c) end
|
-- if not awesome.startup then awful.client.setslave(c) end
|
||||||
|
|
||||||
|
awful.placement.no_offscreen(c)
|
||||||
if awesome.startup and
|
if awesome.startup and
|
||||||
not c.size_hints.user_position
|
not c.size_hints.user_position
|
||||||
and not c.size_hints.program_position then
|
and not c.size_hints.program_position then
|
||||||
|
|||||||
34
readme.md
34
readme.md
@ -1,34 +0,0 @@
|
|||||||
# AwesomeWM config
|
|
||||||
|
|
||||||
Features:
|
|
||||||
- fix set of tags 1-20 (super+num|super+numpad)
|
|
||||||
- tags can be moved across multiple screen (super+num|super+numpad)
|
|
||||||
- move client to tag (super+shift+num|super+shift+numpad)
|
|
||||||
- revelation widget (super+e)
|
|
||||||
- battery-widget
|
|
||||||
- keyboard-layout-indicator
|
|
||||||
- awesome-switcher(alt+tab)
|
|
||||||
|
|
||||||
Main keyboard shortcuts
|
|
||||||
|
|
||||||
select next client in current tag: super u, super i
|
|
||||||
restore all clients in current tag: super o
|
|
||||||
minimize/open client: super+n
|
|
||||||
maximaze client: super+m
|
|
||||||
revelation plugin: super+e
|
|
||||||
show help: super+s
|
|
||||||
select tag 1-10: super+num
|
|
||||||
select tag 11-20: super+numpad
|
|
||||||
next/prev tag: super+arrow(left|right)
|
|
||||||
select client by index: super+alt+num
|
|
||||||
|
|
||||||
|
|
||||||
## Checkout
|
|
||||||
|
|
||||||
Checkout the awesome folder and copy it to
|
|
||||||
~/.cofig/awesome
|
|
||||||
|
|
||||||
## install dependencies
|
|
||||||
```bash
|
|
||||||
sudo bash install-deps.sh
|
|
||||||
```
|
|
||||||
Loading…
Reference in New Issue
Block a user