This commit is contained in:
Gregor Feierabend 2021-09-21 23:17:43 +02:00
parent a3dd587df1
commit 68ad4339e7
13 changed files with 53 additions and 79 deletions

View File

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

View File

@ -344,42 +344,53 @@ globalkeys = gears.table.join(
-- TODO: change /home/x to ~
awful.key({ modkey, "Shift" }, "x",
function () awful.spawn({"/home/x/.config/i3/scripts/lock.sh"}) end,
function () awful.spawn({"/home/x/.scripts/lock.sh"}) end,
{description = "lock screen", group = "user"}),
awful.key({ modkey, "Shift" }, "p",
function () awful.spawn({"pqiv", "-c", "-c", "-i", "/home/x/ANNOTATIONS"}) end,
{description = "lock screen", group = "user"}),
awful.key({ modkey, "Shift" }, "o",
function () awful.spawn({"/home/x/.config/i3/scripts/screenshot.sh"}) end,
function () awful.spawn({"/home/x/.scripts/screenshot.sh"}) end,
{description = "lock screen", group = "user"}),
awful.key({ modkey, "Shift" }, "g",
function () awful.spawn({"/home/x/.config/i3/scripts/grabscreen.sh"}) end,
function () awful.spawn({"/home/x/.scripts/grabscreen.sh"}) end,
{description = "lock screen", group = "user"}),
awful.key({ modkey, "Shift" }, "r",
function () awful.spawn({"/home/x/.config/i3/scripts/screenrec.sh"}) end,
function () awful.spawn({"/home/x/.scripts/screenrec.sh"}) end,
{description = "lock screen", group = "user"}),
awful.key({ modkey, "Shift" }, "w",
function () awful.spawn({"/usr/bin/killall", "ffmpeg"}) end,
{description = "lock screen", group = "user"}),
awful.key({ modkey, "Shift" }, "b",
function () awful.spawn({"/home/x/.config/i3/scripts/screencut.sh"}) end,
function () awful.spawn({"/home/x/.scripts/screencut.sh"}) end,
{description = "lock screen", group = "user"}),
awful.key({ modkey, "Control" }, "t",
function () awful.spawn({"/home/x/.config/i3/scripts/incop.sh"}) end,
awful.key({ modkey, "Shift" }, "t",
function () awful.spawn({"/home/x/.scripts/incop.sh"}) end,
{description = "lock screen", group = "user"}),
awful.key({ modkey, "Control", "Shift" }, "t",
function () awful.spawn({"/home/x/.config/i3/scripts/decop.sh"}) end,
function () awful.spawn({"/home/x/.scripts/decop.sh"}) end,
{description = "lock screen", group = "user"}),
awful.key({ modkey, "Control" }, "n",
function ()
local c = awful.client.restore()
-- Focus restored client
if c then
c:emit_signal(
"request::activate", "key.unminimize", {raise = true}
)
end
-- local c = awful.client.restore()
-- -- Focus restored client
-- if c then
-- c:emit_signal(
-- "request::activate", "key.unminimize", {raise = true}
-- )
-- end
local t = awful.screen.focused().selected_tag
local clients = t:clients()
for i = 1, table.maxn(clients), 1 do
if clients[i].minimized and clients[i].class ~= "URxvt" then
clients[i]:emit_signal(
"request::activate", "key.unminimize", {raise = true}
)
break
end
end
end,
{description = "restore minimized", group = "client"}),
@ -593,14 +604,14 @@ awful.rules.rules = {
},
-- Set Firefox to always map on the tag named "2" on screen 1.
{ rule = { class = "Firefox" },
properties = { screen = 1, tag = "7" } },
{ rule = { class = "Telegram" },
properties = { screen = 1, tag = "9" } },
{ rule = { class = "wbar" },
properties = {border_width = 0} },
{ rule = { class = "URxvt" },
properties = {maximized_horizontal = true, floating = false, ontop = true} },
properties = {maximized_horizontal = true, floating = false, ontop = true} },
{ rule = { class = "Pqiv" },
properties = {border_width = 0, floating = true, ontop = true} },
}
-- }}}
@ -672,21 +683,13 @@ client.connect_signal("focus",
c.border_color = beautiful.border_focus
-- keep focus on URxvt, if it's ontop
if c.class ~= "URxvt" then
if c.class ~= "URxvt" and c.class ~= "Pqiv"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

View File

@ -202,18 +202,18 @@ focus_follows_mouse no
# some personal keybindings
bindsym $mod+m floating enable; resize set 1400 850; move absolute position center; move scratchpad
bindsym $mod+n scratchpad show
bindsym $mod+Shift+x exec ~/.config/i3/scripts/lock.sh
bindsym $mod+Shift+x exec ~/.scripts/lock.sh
bindsym $mod+z [class="qpdfview"] scratchpad show
bindsym $mod+u [class="URxvt"] scratchpad show
bindsym $mod+c [title="Android Emulator*"] scratchpad show
bindsym $mod+t exec zsh ~/.config/i3/scripts/incop.sh
bindsym $mod+Shift+t exec zsh ~/.config/i3/scripts/decop.sh
bindsym $mod+o exec zsh ~/.config/i3/scripts/screenshot.sh
bindsym $mod+t exec zsh ~/.scripts/incop.sh
bindsym $mod+Shift+t exec zsh ~/.scripts/decop.sh
bindsym $mod+o exec zsh ~/.scripts/screenshot.sh
bindsym $mod+x move absolute position center
bindsym $mod+p exec pqiv -c -c -i ~/ANNOTATIONS
bindsym $mod+b exec zsh ~/.config/i3/scripts/screencut.sh
bindsym $mod+Ctrl+g exec zsh ~/.config/i3/scripts/grabscreen.sh
bindsym $mod+Ctrl+r exec zsh ~/.config/i3/scripts/screenrec.sh
bindsym $mod+b exec zsh ~/.scripts/screencut.sh
bindsym $mod+Ctrl+g exec zsh ~/.scripts/grabscreen.sh
bindsym $mod+Ctrl+r exec zsh ~/.scripts/screenrec.sh
bindsym $mod+Ctrl+q exec killall ffmpeg
bindsym $mod+Shift+f exec firefox -P Work -no-remote

View File

@ -1,11 +0,0 @@
#!/bin/zsh
if [ -e /tmp/compton.lock ]
then
echo locked
else
touch /tmp/compton.lock
awk -F= '{if($1 == "shadow-opacity " && $2+0.0 < 1) {$2=$2+0.1;$2 = $2 ";";}}1' OFS="= " ~/.compton.conf > /tmp/compton.conf
cat /tmp/compton.conf > ~/.compton.conf
kill -SIGUSR1 `pidof compton`
rm /tmp/compton.lock
fi

View File

@ -1,5 +0,0 @@
#!/bin/zsh
#sudo rmmod v4l2loopback
#sudo modprobe v4l2loopback video_nr=1,2
ffmpeg -f x11grab -show_region 1 -framerate 25 $(slop -f '-video_size %wx%h -i +%x,%y') -draw_mouse 1 -f v4l2 /dev/video2

View File

@ -1,11 +0,0 @@
#!/bin/zsh
if [ -e /tmp/compton.lock ]
then
echo locked
else
touch /tmp/compton.lock
awk -F= '{if($1 == "shadow-opacity " && $2+0.0 > 0) {$2=$2-0.1;$2 = $2 ";";}}1' OFS="= " ~/.compton.conf > /tmp/compton.conf
cat /tmp/compton.conf > ~/.compton.conf
kill -SIGUSR1 `pidof compton`
rm /tmp/compton.lock
fi

View File

@ -1,9 +0,0 @@
if `dunstctl is-paused`; then
#i3lock -n -c 222222
i3lock -n -i ~/.config/i3/locked.png
else
dunstctl set-paused true
i3lock -n -i ~/.config/i3/locked.png
dunstctl set-paused false
fi

View File

@ -1,4 +0,0 @@
#!/bin/sh
maim -u -g `slop -b 3 -c 1,0,0` | convert - -alpha off ~/CUTS/`date +%s`.jpg
#adb root
#adb push ~/CUTS /storage/emulated/0/Download/

View File

@ -1,2 +0,0 @@
#!/bin/sh
ffmpeg -y -threads 4 -i /dev/video2 -vcodec mpeg4 -b:v 800k MP4/`date +%s`.mp4

View File

@ -1 +0,0 @@
maim -u -m 10 -f png ~/PNG/`date +%s`.png

View File

@ -0,0 +1,2 @@
[Default Applications]
text/plain=vi.desktop

View File

@ -0,0 +1,12 @@
[Desktop Entry]
Categories=System;ConsoleOnly;
Comment=Vi[m]
Exec=spawn_urxvt_tmux.sh cd; vi "%F"
GenericName=Editor
Icon=vim
Name=Vim
Terminal=false
TryExec=vi
Type=Application
Keywords=File;
MimeType=text/plain;

View File

@ -1,7 +1,7 @@
[Desktop Entry]
Categories=System;FileTools;FileManager;Utility;ConsoleOnly;
Comment=Vi[m] like ncurses based file manager
Exec=spawn_urxvt_tmux.sh vifm %F
Exec=spawn_urxvt_tmux.sh vifm "%F"
GenericName=File Manager
Icon=vifm
Name=Vifm