From 907dc10bada32c66e2ed84f1bba3a29aed4e3eb0 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Wed, 7 Oct 2020 07:36:56 -0500 Subject: [PATCH] picom, mpv, tridactyl, and new transmission script --- awesome/init.fnl | 269 ++++++++-------- awesome/rc.lua | 298 +++++++++--------- .../navbar_tabs_oneliner_tabs_on_left.css | 2 +- mpv/mpv.conf | 2 + picom.conf | 10 +- scripts/transadd.sh | 3 + tridactyl/tridactylrc | 5 +- 7 files changed, 298 insertions(+), 291 deletions(-) create mode 100755 scripts/transadd.sh diff --git a/awesome/init.fnl b/awesome/init.fnl index cb1cda4..5b2d1c7 100644 --- a/awesome/init.fnl +++ b/awesome/init.fnl @@ -33,148 +33,149 @@ ;;; panel -;; (awful.screen.connect_for_each_screen -;; (fn [s] -;; ;; Wallpaper -;; (set_wallpaper s) +(awful.screen.connect_for_each_screen + (fn [s] + ;; Wallpaper + (set_wallpaper s) -;; ;; Each screen has its own tag table. -;; (awful.tag [ "" "" "" "" ] s (. awful.layout.layouts 1)) + ;; Each screen has its own tag table. + (awful.tag [ "" "" "" "" ] s (. awful.layout.layouts 1)) -;; ;; Create a promptbox for each screen -;; (set s.mypromptbox (awful.widget.prompt)) -;; ;; Create an imagebox widget which will contain an icon indicating which layout we're using. -;; ;; We need one layoutbox per screen. -;; (set s.mylayoutbox (awful.widget.layoutbox s)) -;; (: s.mylayoutbox :buttons (gears.table.join -;; (awful.button [] 1 (fn [] (awful.layout.inc 1 s awful.layout.layouts))) -;; (awful.button [] 3 (fn [] (awful.layout.inc -1 s))) -;; (awful.button [] 4 (fn [] (awful.layout.inc 1 s))) -;; (awful.button [] 5 (fn [] (awful.layout.inc -1 s))))) + ;; Create a promptbox for each screen + (set s.mypromptbox (awful.widget.prompt)) + ;; Create an imagebox widget which will contain an icon indicating which layout we're using. + ;; We need one layoutbox per screen. + (set s.mylayoutbox (awful.widget.layoutbox s)) + (: s.mylayoutbox :buttons (gears.table.join + (awful.button [] 1 (fn [] (awful.layout.inc 1 s awful.layout.layouts))) + (awful.button [] 3 (fn [] (awful.layout.inc -1 s))) + (awful.button [] 4 (fn [] (awful.layout.inc 1 s))) + (awful.button [] 5 (fn [] (awful.layout.inc -1 s))))) -;; ;; create a systray widget -;; (set s.mysystray { -;; 1 (wibox.widget.systray) -;; :widget wibox.container.background -;; }) -;; ;; Create a taglist widget -;; (set s.mytaglist (awful.widget.taglist { -;; :screen s -;; :filter awful.widget.taglist.filter.all -;; :buttons taglist_buttons -;; })) + ;; create a systray widget + (set s.mysystray { + 1 (wibox.widget.systray) + :widget wibox.container.background + }) + ;; Create a taglist widget + (set s.mytaglist (awful.widget.taglist { + :screen s + :filter awful.widget.taglist.filter.all + :buttons taglist_buttons + })) -;; ;; Create a tasklist widget -;; (set s.mytasklist (awful.widget.tasklist { -;; :screen s -;; :filter awful.widget.tasklist.filter.currenttags -;; :buttons tasklist_buttons -;; :style { -;; :border_width 0 -;; :border_color "#777777" -;; :shape gears.shape.rounded_bar -;; } -;; :layout { -;; :spacing 20 -;; :spacing_widget { -;; 1 { -;; :forced_width 5 -;; :forced_height (dpi 20) -;; :widget wibox.widget.seperator -;; } -;; :valign "center" -;; :halign "center" -;; :widget wibox.container.place -;; } -;; :layout wibox.layout.flex.horizontal } -;; } -;; :widget_template { -;; 1 { -;; 1 { -;; 1 { -;; 1 { -;; :id "icon_role" -;; :widget wibox.widget.imagebox -;; } -;; :margins 2 -;; :widget wibox.container.margin -;; } -;; 2 { -;; :id "text_role" -;; :widget wibox.widget.textbox -;; } -;; :layout wibox.layout.align.horizontal -;; } -;; :left 10 -;; :right 10 -;; :widget wibox.container.margin -;; } -;; :id "background_role" -;; :widget wibox.container.background})) + ;; Create a tasklist widget + (set s.mytasklist (awful.widget.tasklist { + :screen s + :filter awful.widget.tasklist.filter.currenttags + :buttons tasklist_buttons + :style { + :border_width 0 + :border_color "#777777" + :shape gears.shape.rounded_bar + } + :layout { + :spacing 20 + :spacing_widget { + 1 { + :forced_width 5 + :forced_height (dpi 20) + :widget wibox.widget.seperator + } + :valign "center" + :halign "center" + :widget wibox.container.place + } + :layout wibox.layout.flex.horizontal + } + } + :widget_template { + 1 { + 1 { + 1 { + 1 { + :id "icon_role" + :widget wibox.widget.imagebox + } + :margins 2 + :widget wibox.container.margin + } + 2 { + :id "text_role" + :widget wibox.widget.textbox + } + :layout wibox.layout.align.horizontal + } + :left 10 + :right 10 + :widget wibox.container.margin + } + :id "background_role" + :widget wibox.container.background})) -;; ;; create battery network and volume widgets -;; (set s.battery (require widget.battery)) -;; (set s.volume (require widget.volume)) -;; (set s.updater (require widget.package-updater)) + ;; create battery network and volume widgets + (set s.battery (require widget.battery)) + (set s.volume (require widget.volume)) + (set s.updater (require widget.package-updater)) -;; ;; create right widgets -;; (set s.myrightwidgets { -;; 1 { -;; :layout wibox.layout.fixed.horizontal -;; 1 s.volume -;; 2 s.mysystray -;; 3 s.updater -;; 4 s.battery -;; 5 (wibox.container.margin (s.mylayoutbox 0 (dpi 25) 0 0)) -;; } -;; :widget wibox.container.background}) + ;; create right widgets + (set s.myrightwidgets { + 1 { + :layout wibox.layout.fixed.horizontal + 1 s.volume + 2 s.mysystray + 3 s.updater + 4 s.battery + 5 (wibox.container.margin (s.mylayoutbox 0 (dpi 25) 0 0)) + } + :widget wibox.container.background}) -;; ;; empty widget to use for spacing -;; (set s.myemptywidget (wibox.widget { -;; :markup "" -;; :align "" -;; :valign "" -;; :widget wibox.widget.textbox -;; })) + ;; empty widget to use for spacing + (set s.myemptywidget (wibox.widget { + :markup "" + :align "" + :valign "" + :widget wibox.widget.textbox + })) -;; (local yoffset (dpi 45)) -;; (local xoffset (dpi 18)) -;; (set s.mypanel (wibox.wibox { -;; :x (+ s.geometry.x xoffset) -;; :y (- s.geometry.height yoffset) -;; :height (dpi 30) -;; :width (- s.geometry.width (* xoffset 2)) -;; :ontop false -;; :stretch false -;; :type "dock" -;; :shape gears.shape.rounded_bar -;; :bg beautiful.bg_normal -;; :fg beautiful.fg_normal -;; :opacity 0.65 -;; })) -;; (: s.mypanel :struts { -;; :bottom (dpi 40) -;; }) -;; (: s.mypanel :setup { -;; :layout wibox.layout.align.horizontal -;; :expand "outside" -;; 1 { -;; :layout wibox.layout.align.horizontal -;; 1 (wibox.container.margin (s.mytaglist (dpi 15) 0 (dpi -3) 0)) -;; 2 (wibox.container.margin (s.mytasklist (dpi 25) (dpi 25) 0 0)) -;; 3 s.myemptywidget -;; :spacing (dpi 15) -;; } -;; 2 mytextclock -;; 3 { -;; :layout wibox.layout.align.horizontal -;; 1 s.myemptywidget -;; 2 (wibox.container.margin (s.mypromptbox (dpi 25) (dpi 25) 0 0)) -;; 3 s.myrightwidgets -;; } -;; :visible true -;; }) -;; )) + (local yoffset (dpi 45)) + (local xoffset (dpi 18)) + (set s.mypanel (wibox.wibox { + :x (+ s.geometry.x xoffset) + :y (- s.geometry.height yoffset) + :height (dpi 30) + :width (- s.geometry.width (* xoffset 2)) + :ontop false + :stretch false + :type "dock" + :shape gears.shape.rounded_bar + :bg beautiful.bg_normal + :fg beautiful.fg_normal + :opacity 0.65 + })) + (: s.mypanel :struts { + :bottom (dpi 40) + }) + (: s.mypanel :setup { + :layout wibox.layout.align.horizontal + :expand "outside" + 1 { + :layout wibox.layout.align.horizontal + 1 (wibox.container.margin (s.mytaglist (dpi 15) 0 (dpi -3) 0)) + 2 (wibox.container.margin (s.mytasklist (dpi 25) (dpi 25) 0 0)) + 3 s.myemptywidget + :spacing (dpi 15) + } + 2 mytextclock + 3 { + :layout wibox.layout.align.horizontal + 1 s.myemptywidget + 2 (wibox.container.margin (s.mypromptbox (dpi 25) (dpi 25) 0 0)) + 3 s.myrightwidgets + } + :visible true + }) + )) (root.keys globalkeys) diff --git a/awesome/rc.lua b/awesome/rc.lua index 0271023..e7b64ab 100644 --- a/awesome/rc.lua +++ b/awesome/rc.lua @@ -147,168 +147,168 @@ end screen.connect_signal("property::geometry", set_wallpaper) -awful.screen.connect_for_each_screen(function(s) - -- Wallpaper - set_wallpaper(s) +-- awful.screen.connect_for_each_screen(function(s) +-- -- Wallpaper +-- set_wallpaper(s) - -- Each screen has its own tag table. - awful.tag({ "  ", "  ", "  ", "  "}, s, awful.layout.layouts[1]) +-- -- Each screen has its own tag table. +-- awful.tag({ "  ", "  ", "  ", "  "}, s, awful.layout.layouts[1]) - s.padding = { - bottom = dpi(20) - } +-- s.padding = { +-- bottom = dpi(20) +-- } - yoffset = dpi(45) - xoffset = dpi(18) +-- yoffset = dpi(45) +-- xoffset = dpi(18) - mypanel = wibox - ({ - x = s.geometry.x + xoffset, - y = s.geometry.height - yoffset, - height = dpi(30), - width = s.geometry.width - (xoffset * 2), - ontop = false, - stretch = false, - type = "dock", - screen = s, - shape = gears.shape.rounded_bar, - bg = beautiful.bg_normal, - fg = beautiful.fg_normal, - opacity = 0.65, - }) +-- mypanel = wibox +-- ({ +-- x = s.geometry.x + xoffset, +-- y = s.geometry.height - yoffset, +-- height = dpi(30), +-- width = s.geometry.width - (xoffset * 2), +-- ontop = false, +-- stretch = false, +-- type = "dock", +-- screen = s, +-- shape = gears.shape.rounded_bar, +-- bg = beautiful.bg_normal, +-- fg = beautiful.fg_normal, +-- opacity = 0.65, +-- }) - mypanel:struts { - bottom = dpi(40) - } +-- mypanel:struts { +-- bottom = dpi(40) +-- } - -- Create a promptbox for each screen - s.mypromptbox = awful.widget.prompt() - -- Create an imagebox widget which will contain an icon indicating which layout we're using. - -- We need one layoutbox per screen. - s.mylayoutbox = awful.widget.layoutbox(s) - s.mylayoutbox:buttons(gears.table.join( - awful.button({ }, 1, function () awful.layout.inc( 1) end), - awful.button({ }, 3, function () awful.layout.inc(-1) end), - awful.button({ }, 4, function () awful.layout.inc( 1) end), - awful.button({ }, 5, function () awful.layout.inc(-1) end))) - -- Create a taglist widget - s.mytaglist = awful.widget.taglist { - screen = s, - filter = awful.widget.taglist.filter.all, - buttons = taglist_buttons - } +-- -- Create a promptbox for each screen +-- s.mypromptbox = awful.widget.prompt() +-- -- Create an imagebox widget which will contain an icon indicating which layout we're using. +-- -- We need one layoutbox per screen. +-- s.mylayoutbox = awful.widget.layoutbox(s) +-- s.mylayoutbox:buttons(gears.table.join( +-- awful.button({ }, 1, function () awful.layout.inc( 1) end), +-- awful.button({ }, 3, function () awful.layout.inc(-1) end), +-- awful.button({ }, 4, function () awful.layout.inc( 1) end), +-- awful.button({ }, 5, function () awful.layout.inc(-1) end))) +-- -- Create a taglist widget +-- s.mytaglist = awful.widget.taglist { +-- screen = s, +-- filter = awful.widget.taglist.filter.all, +-- buttons = taglist_buttons +-- } - -- Create a systray widget - s.mysystray = { - wibox.widget.systray(), - -- bg = "#00FF0066", - widget = wibox.container.background, - } +-- -- Create a systray widget +-- s.mysystray = { +-- wibox.widget.systray(), +-- -- bg = "#00FF0066", +-- widget = wibox.container.background, +-- } - s.mytasklist = awful.widget.tasklist { - screen = s, - filter = awful.widget.tasklist.filter.currenttags, - buttons = tasklist_buttons, - style = { - border_width = 0, - border_color = '#777777', - shape = gears.shape.rounded_bar, +-- s.mytasklist = awful.widget.tasklist { +-- screen = s, +-- filter = awful.widget.tasklist.filter.currenttags, +-- buttons = tasklist_buttons, +-- style = { +-- border_width = 0, +-- border_color = '#777777', +-- shape = gears.shape.rounded_bar, - }, - layout = { - spacing = 20, - spacing_widget = { - { - forced_width = 5, - forced_height = dpi(20), - -- shape = gears.shape.circle, - widget = wibox.widget.separator - }, - valign = 'center', - halign = 'center', - widget = wibox.container.place, - }, - layout = wibox.layout.flex.horizontal - }, - -- notice that there is *no* wibox.wibox prefix, it is a template, - -- not a widget instance. - widget_template = { - { - { - { - { - id = 'icon_role', - widget = wibox.widget.imagebox, - }, - margins = 2, - widget = wibox.container.margin, - }, - { - id = 'text_role', - widget = wibox.widget.textbox, - }, - layout = wibox.layout.align.horizontal, - }, - left = 10, - right = 10, - widget = wibox.container.margin - }, - id = 'background_role', - widget = wibox.container.background, - }, - } - -- Create Battery, Network, and Volume widget - s.battery = require('widget.battery')() - -- s.network = require('widget.network')() - s.volume = require('widget.volume')() - s.updater = require('widget.package-updater')() +-- }, +-- layout = { +-- spacing = 20, +-- spacing_widget = { +-- { +-- forced_width = 5, +-- forced_height = dpi(20), +-- -- shape = gears.shape.circle, +-- widget = wibox.widget.separator +-- }, +-- valign = 'center', +-- halign = 'center', +-- widget = wibox.container.place, +-- }, +-- layout = wibox.layout.flex.horizontal +-- }, +-- -- notice that there is *no* wibox.wibox prefix, it is a template, +-- -- not a widget instance. +-- widget_template = { +-- { +-- { +-- { +-- { +-- id = 'icon_role', +-- widget = wibox.widget.imagebox, +-- }, +-- margins = 2, +-- widget = wibox.container.margin, +-- }, +-- { +-- id = 'text_role', +-- widget = wibox.widget.textbox, +-- }, +-- layout = wibox.layout.align.horizontal, +-- }, +-- left = 10, +-- right = 10, +-- widget = wibox.container.margin +-- }, +-- id = 'background_role', +-- widget = wibox.container.background, +-- }, +-- } +-- -- Create Battery, Network, and Volume widget +-- s.battery = require('widget.battery')() +-- -- s.network = require('widget.network')() +-- s.volume = require('widget.volume')() +-- s.updater = require('widget.package-updater')() - s.myrightwidgets = - { - { -- Right widgets - layout = wibox.layout.fixed.horizontal, - s.volume, - s.mysystray, - s.updater, - -- s.network, - s.battery, - wibox.container.margin (s.mylayoutbox,0,dpi(25),0,0), - }, - -- bg = "#00FF0066", - widget = wibox.container.background, - } +-- s.myrightwidgets = +-- { +-- { -- Right widgets +-- layout = wibox.layout.fixed.horizontal, +-- s.volume, +-- s.mysystray, +-- s.updater, +-- -- s.network, +-- s.battery, +-- wibox.container.margin (s.mylayoutbox,0,dpi(25),0,0), +-- }, +-- -- bg = "#00FF0066", +-- widget = wibox.container.background, +-- } - -- Empty widget to use for spacing - s.myemptywidget = wibox.widget{ - markup = '', - align = '', - valign = '', - widget = wibox.widget.textbox - } +-- -- Empty widget to use for spacing +-- s.myemptywidget = wibox.widget{ +-- markup = '', +-- align = '', +-- valign = '', +-- widget = wibox.widget.textbox +-- } --- -- Add widgets to the wibox - mypanel:setup { - layout = wibox.layout.align.horizontal, - expand = "outside", - { -- Left widgets - layout = wibox.layout.align.horizontal, - wibox.container.margin (s.mytaglist,dpi(15),0,dpi(-3),0), - wibox.container.margin (s.mytasklist,dpi(25),dpi(25),0,0), -- Middle widget - s.myemptywidget, - spacing = dpi(15) - }, - mytextclock, - { -- Right widgets - layout = wibox.layout.align.horizontal, - s.myemptywidget, - wibox.container.margin (s.mypromptbox,dpi(25),dpi(25),0,0), -- Middle widget - s.myrightwidgets, - }, - visible = true, - } +-- -- -- Add widgets to the wibox +-- mypanel:setup { +-- layout = wibox.layout.align.horizontal, +-- expand = "outside", +-- { -- Left widgets +-- layout = wibox.layout.align.horizontal, +-- wibox.container.margin (s.mytaglist,dpi(15),0,dpi(-3),0), +-- wibox.container.margin (s.mytasklist,dpi(25),dpi(25),0,0), -- Middle widget +-- s.myemptywidget, +-- spacing = dpi(15) +-- }, +-- mytextclock, +-- { -- Right widgets +-- layout = wibox.layout.align.horizontal, +-- s.myemptywidget, +-- wibox.container.margin (s.mypromptbox,dpi(25),dpi(25),0,0), -- Middle widget +-- s.myrightwidgets, +-- }, +-- visible = true, +-- } - mypanel.visible = true - end) +-- mypanel.visible = true +-- end) -- }}} -- {{{ Mouse bindings diff --git a/firefox/chrome/chrome/navbar_tabs_oneliner_tabs_on_left.css b/firefox/chrome/chrome/navbar_tabs_oneliner_tabs_on_left.css index 24da18e..383a0f4 100644 --- a/firefox/chrome/chrome/navbar_tabs_oneliner_tabs_on_left.css +++ b/firefox/chrome/chrome/navbar_tabs_oneliner_tabs_on_left.css @@ -1,5 +1,5 @@ /* Modify these to change relative widths or default height */ -#navigator-toolbox{ --uc-navigationbar-width: -2vw; --uc-toolbar-height: 10px; --window-drag-space-width: 0px} +#navigator-toolbox{ --uc-navigationbar-width: -2vw; --uc-toolbar-height: 27px; --window-drag-space-width: 0px} /* Override for other densities */ :root[uidensity="compact"] > #navigator-toolbox{ --uc-toolbar-height: 22px;} :root[uidensity="touch"] > #navigator-toolbox{ --uc-toolbar-height: 40px; } diff --git a/mpv/mpv.conf b/mpv/mpv.conf index 4d6ec3c..4aa8847 100644 --- a/mpv/mpv.conf +++ b/mpv/mpv.conf @@ -2,3 +2,5 @@ vo=gpu af=scaletempo2 speed=2 +autofit=70% +geometry=50%:50% diff --git a/picom.conf b/picom.conf index 2282527..1d92582 100644 --- a/picom.conf +++ b/picom.conf @@ -33,18 +33,18 @@ shadow = true; # The blur radius for shadows, in pixels. (defaults to 12) # shadow-radius = 12 -shadow-radius = 8; +shadow-radius = 6; # The opacity of shadows. (0.0 - 1.0, defaults to 0.75) shadow-opacity = .75 # The left offset for shadows, in pixels. (defaults to -15) # shadow-offset-x = -15 -shadow-offset-x = 3; +shadow-offset-x = 1; # The top offset for shadows, in pixels. (defaults to -15) # shadow-offset-y = -15 -shadow-offset-y = 3; +shadow-offset-y = 1; # Avoid drawing shadows on dock/panel windows. This option is deprecated, # you should use the *wintypes* option in your config file instead. @@ -85,7 +85,7 @@ shadow-offset-y = 3; shadow-exclude = [ "name = 'Notification'", "class_g = 'Conky'", - # "class_g = 'firefox'", + "class_g = 'firefox'", "class_g ?= 'Notify-osd'", "class_g = 'Cairo-clock'", "class_g = 'slop'", @@ -98,7 +98,7 @@ shadow-exclude = [ # shadow-exclude-reg = "x10+0+0" # for example, if the 10 pixels on the bottom of the screen should not have shadows painted on. # -shadow-exclude-reg = "x0+0+0" +shadow-exclude-reg = "x50+0+0" # Crop shadow of a window fully on a particular Xinerama screen to the screen. # xinerama-shadow-crop = false diff --git a/scripts/transadd.sh b/scripts/transadd.sh new file mode 100755 index 0000000..18a097f --- /dev/null +++ b/scripts/transadd.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +transmission-remote -a "$@" && notify-send "Transmission-daemon" "Torrent added" diff --git a/tridactyl/tridactylrc b/tridactyl/tridactylrc index eb586f2..627ad39 100644 --- a/tridactyl/tridactylrc +++ b/tridactyl/tridactylrc @@ -11,7 +11,7 @@ set searchurls.y https://www.yewtu.be/search?q= set searchurls.aw https://wiki.archlinux.org/index.php?search= set searchurls.qt https://doc.qt.io/qt-5/search-results.html?q= set searchurls.mel https://melpa.org/#/?q= -set searchurls.ser https://searx.xyz/?q= +set searchurls.ser https://search.snopyta.org/?q= set searchurls.fel https://felgo.com/search-results?q= set searchurls.o https://www.office.com/search?auth=2&q= set searchurls.wiki https://en.wikipedia.org/wiki/Special:Search/ @@ -41,8 +41,9 @@ set searchengine ser " For syntax highlighting see https://github.com/tridactyl/vim-tridactyl " vim: set filetype=tridactyl - bind v hint -W mpvsafe +bind F hint -w +bind gy hint -y bind gc composite get_current_url | org-capture bind gC hint -W org-capture command org-capture js -p tri.excmds.exclaim_quiet('org-capture ' + JS_ARG)