diff --git a/.compton.conf b/.compton.conf index 6cd36cf..fbfbad4 100644 --- a/.compton.conf +++ b/.compton.conf @@ -1,4 +1,4 @@ -shadow-opacity = 0.7; +shadow-opacity = 0.9; shadow = true; shadow-radius = 0; diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index dfa7bbf..67a37ae 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -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) -- }}} diff --git a/.config/qpdfview/qpdfview.conf b/.config/qpdfview/qpdfview.conf index 06e6d5a..9f0af6d 100644 --- a/.config/qpdfview/qpdfview.conf +++ b/.config/qpdfview/qpdfview.conf @@ -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 diff --git a/.config/vifm/vifmrc b/.config/vifm/vifmrc index bbb3a0a..881a45d 100755 --- a/.config/vifm/vifmrc +++ b/.config/vifm/vifmrc @@ -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 :delete " Block particular shortcut " " nnoremap + +au DirEnter '/SHARED/academics/cocalc-shared/**/*' setl previewprg='git log --color -- %c 2>&1' diff --git a/.local/bin/spawn_urxvt_tmux.sh b/.local/bin/spawn_urxvt_tmux.sh new file mode 100755 index 0000000..95f5311 --- /dev/null +++ b/.local/bin/spawn_urxvt_tmux.sh @@ -0,0 +1,3 @@ +#!/bin/bash +#TODO: add support for more parameters :D +urxvt -e tmux new $1' '$2' '$3'; $SHELL' diff --git a/.local/share/applications/vifm.desktop b/.local/share/applications/vifm.desktop new file mode 100644 index 0000000..d89d634 --- /dev/null +++ b/.local/share/applications/vifm.desktop @@ -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; diff --git a/.zlogin b/.zlogin index c445f0b..84ea99e 100644 --- a/.zlogin +++ b/.zlogin @@ -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" diff --git a/.zshrc b/.zshrc index ef05daf..10db48e 100644 --- a/.zshrc +++ b/.zshrc @@ -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"