awesome update

This commit is contained in:
Gregor Feierabend 2021-09-21 21:06:55 +02:00
parent a213e059b3
commit 04aa07a158
8 changed files with 98 additions and 13 deletions

View File

@ -1,4 +1,4 @@
shadow-opacity = 0.7;
shadow-opacity = 0.9;
shadow = true;
shadow-radius = 0;

View File

@ -291,8 +291,35 @@ globalkeys = gears.table.join(
{description = "go back", group = "client"}),
-- Standard program
awful.key({ modkey, }, "Return", function () awful.spawn(terminal_tmux) end,
{description = "open a terminal", group = "launcher"}),
awful.key({ modkey, }, "Return",
function ()
local t = awful.screen.focused().selected_tag
local clients = t:clients()
local found = false
local i = 1
while (i <= table.maxn(clients)) do
if clients[i].class == "URxvt" then
clients[i].minimized = not clients[i].minimized
if not clients[i].minimized then
clients[i]:raise()
clients[i]:emit_signal("request::activate")
end
-- naughty.notify({ title = "Restoring:"
-- , text = clients[i].name
-- , bg="#ff0000"
-- , fg="#000000"
-- , timeout = 15
-- , position = "top_right"
-- })
found = true
end
i = i + 1
end
if not found then
awful.spawn(terminal_tmux)
end
end, {description = "open a terminal", group = "launcher"}),
awful.key({ modkey, "Control" }, "r", awesome.restart,
{description = "reload awesome", group = "awesome"}),
awful.key({ modkey, "Shift" }, "q", awesome.quit,
@ -356,6 +383,21 @@ globalkeys = gears.table.join(
end,
{description = "restore minimized", group = "client"}),
-- awful.key({ modkey, "Shift" }, "n",
-- function ()
-- local d = awful.client.restore()
-- -- Focus restored client
-- if d then
-- d:emit_signal(
-- "request::activate", "key.unminimize", {raise = true}
-- )
-- else
-- local c = client.focus
-- c.minimized = true
-- end
-- end,
-- {description = "toggle minimized", group = "client"}),
-- Prompt
awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end,
{description = "run prompt", group = "launcher"}),
@ -442,9 +484,9 @@ for i = 1, 9 do
local screen = awful.screen.focused()
local tag = screen.tags[i]
if tag then
current_layout = awful.layout.get(screen)
-- current_layout = awful.layout.get(screen)
awful.tag.viewtoggle(tag)
awful.layout.set(current_layout)
-- awful.layout.set(current_layout)
-- focus on client from activated tag
local clients = tag:clients()
@ -557,6 +599,8 @@ awful.rules.rules = {
properties = { screen = 1, tag = "9" } },
{ rule = { class = "wbar" },
properties = {border_width = 0} },
{ rule = { class = "URxvt" },
properties = {maximized_horizontal = true, floating = false, ontop = true} },
}
-- }}}
@ -623,7 +667,30 @@ end)
-- c:emit_signal("request::activate", "mouse_enter", {raise = false})
--end)
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
client.connect_signal("focus",
function(c)
c.border_color = beautiful.border_focus
-- keep focus on URxvt, if it's ontop
if c.class ~= "URxvt" then
local t = awful.screen.focused().selected_tag
local clients = t:clients()
for i = 1, table.maxn(clients), 1 do
if not clients[i].minimized and clients[i].ontop and clients[i].class == "URxvt" then
clients[i]:raise()
clients[i]:emit_signal("request::activate")
-- naughty.notify({ title = "Focusing on:"
-- , text = clients[i].name
-- , bg="#ff0000"
-- , fg="#000000"
-- , timeout = 15
-- , position = "top_right"
-- })
end
end
end
end)
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
-- }}}

View File

@ -7,7 +7,7 @@ highlightAll=true
highlightCurrentThumbnail=true
highlightDuration=5000
invertColors=false
layoutMode=1
layoutMode=0
limitThumbnailsToResults=true
matchCase=false
minimalScrolling=true
@ -19,7 +19,7 @@ prefetch=true
prefetchDistance=10
rotateModifiers=33554432
rotation=0
scaleFactor=0.9476203308283557
scaleFactor=0.5800653594771242
scaleMode=1
scrollModifiers=134217728
sourceEditor=
@ -44,7 +44,7 @@ geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\x12\0\0\x5\x9f\0\0\x3
instanceNameInWindowTitle=true
keepRecentlyClosed=false
newTabNextToCurrentTab=true
openPath=/SHARED/academics/2021/pdf/CS354/projects
openPath=/SHARED/academics/2021/pdf
recentlyClosedCount=5
recentlyUsed=@Invalid()
recentlyUsedCount=10

View File

@ -19,7 +19,7 @@ set vicmd=vi
" standard utilities like `cp`. While using `cp` and alike is a more universal
" solution, it's also much slower and doesn't support progress measuring.
" set syscalls
set syscalls
" Trash Directory
" The default is to move files that are deleted with dd or :d to
@ -484,3 +484,5 @@ nnoremap <f8> :delete<cr>
" Block particular shortcut
"
" nnoremap <left> <nop>
au DirEnter '/SHARED/academics/cocalc-shared/**/*' setl previewprg='git log --color -- %c 2>&1'

3
.local/bin/spawn_urxvt_tmux.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
#TODO: add support for more parameters :D
urxvt -e tmux new $1' '$2' '$3'; $SHELL'

View File

@ -0,0 +1,12 @@
[Desktop Entry]
Categories=System;FileTools;FileManager;Utility;ConsoleOnly;
Comment=Vi[m] like ncurses based file manager
Exec=spawn_urxvt_tmux.sh vifm %F
GenericName=File Manager
Icon=vifm
Name=Vifm
Terminal=false
TryExec=vifm
Type=Application
Keywords=File;Directory;Browse;
MimeType=inode/directory;

View File

@ -1,6 +1,3 @@
alias vv="vi -S"
alias tt="tmux attach"
alias ll="ls -al"
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
alias vimtex="vim --servername vimtex"

4
.zshrc
View File

@ -26,6 +26,10 @@ bindkey -M vicmd ' ' edit-command-line
PROMPT="$ "
export PATH="${PATH}:${HOME}/.local/bin"
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
#echo -ne "\033]0;$(basename `dirname $PWD`)/$(basename ${PWD})\007"
#chpwd() {
# echo -ne "\033]0;$(basename `dirname $PWD`)/$(basename ${PWD})\007"