From 29a3a101c40e2f7fd77081d8cdf647ac79130dde Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Tue, 16 Feb 2021 11:13:11 -0600 Subject: [PATCH] Adding a lot of better awesome stuff and rofi-pass --- awesome/init.fnl | 14 +-- awesome/keybindings.fnl | 2 +- awesome/notifications.fnl | 6 +- awesome/theme.lua | 14 +++ .../B616B30830C2718C31094DBF25824AF7 | 1 + qutebrowser/autoconfig.yml | 1 + qutebrowser/qsettings/QtProject.conf | 4 +- rofi/rofi-pass/config | 99 +++++++++++++++++++ 8 files changed, 126 insertions(+), 15 deletions(-) create mode 100644 mpv/watch_later/B616B30830C2718C31094DBF25824AF7 create mode 100644 rofi/rofi-pass/config diff --git a/awesome/init.fnl b/awesome/init.fnl index 782aaa4..304f810 100644 --- a/awesome/init.fnl +++ b/awesome/init.fnl @@ -21,7 +21,7 @@ ;; my splits (local clientrules (require "rules")) (local keybindings (require "keybindings")) -;; (local notifications (require "notifications")) +(local notifications (require "notifications")) ;; Error handling ;; Check if awesome encountered an error during startup and fall back to @@ -72,13 +72,6 @@ (local hostname (hostname-handle:read "a")) (hostname-handle:close) (local laptop (= hostname "chris-linuxlaptop\n")) -;; (local laptop false) -;; (fn set-laptop [str] -;; (set laptop str)) -;; (fn get-hostname [?callback] -;; (awful.spawn.easy_async "hostname" (fn [ stdout ] stdout))) -(naughty.notify {:text (tostring laptop)}) -;; (if laptop (naughty.notify {:text "laptop detected"}) (naughty.notify {:text "laptop not detected"})) ;; Table of layouts to cover with awful.layout.inc, order matters. (set awful.layout.layouts [ @@ -453,6 +446,10 @@ ;; Rules (ruled.client.append_rules clientrules) +(ruled.notification.connect_signal + "request::rules" + (fn [] + (ruled.notification.append_rules notifications))) ;; Signals ;; Signal function to execute when a new client appears. @@ -481,7 +478,6 @@ (awful.spawn "feh --bg-fill /home/chris/Pictures/wallpapers/RoyalKing.png") (awful.spawn "flameshot") (awful.spawn "caffeine") -;; (awful.spawn "nextcloud --background") (awful.spawn "libinput-gestures-setup start") (awful.spawn "bluetoothctl power on") (awful.spawn "emacs --daemon") diff --git a/awesome/keybindings.fnl b/awesome/keybindings.fnl index 3588f8c..fe844a2 100644 --- a/awesome/keybindings.fnl +++ b/awesome/keybindings.fnl @@ -138,7 +138,7 @@ {:description "launch eshell in new emacs frame" :group "apps" }) (awful.key [ modkey ] "e" (fn [] (awful.spawn "emacsclient -c -a 'emacs'")) {:description "launch new emacs frame" :group "apps" }) - (awful.key [ modkey ] "p" (fn [] (awful.spawn "emacsclient -c -e '(pass)'")) + (awful.key [ modkey ] "p" (fn [] (awful.spawn "rofi-pass")) {:description "select pass" :group "apps" }) (awful.key [ modkey shift ] "w" (fn [] (awful.spawn "libreoffice --writer")) {:description "Open Writer" :group "apps" }) diff --git a/awesome/notifications.fnl b/awesome/notifications.fnl index 6d679a8..fac3ff4 100644 --- a/awesome/notifications.fnl +++ b/awesome/notifications.fnl @@ -9,11 +9,11 @@ (local rules [ ;; All notifications match this rule { - :rule { } + :rule { } :propertites { :border-width beautiful.border_width - :border_color beautiful.border_normal - :opacity 0.7 + :border_color "#000000" + :opacity 0.1 :shape gears.shape.rounded_rect } } diff --git a/awesome/theme.lua b/awesome/theme.lua index e7eeca5..65b0505 100644 --- a/awesome/theme.lua +++ b/awesome/theme.lua @@ -105,6 +105,20 @@ theme.menu_width = dpi(100) -- beautiful.variable in your rc.lua --theme.bg_widget = "#cc0000" +-- mstab +theme.mstab_bar_ontop = true -- whether you want to allow the bar to be ontop of clients +theme.mstab_dont_resize_slaves = false -- whether the tabbed stack windows should be smaller than the + -- currently focused stack window (set it to true if you use + -- transparent terminals. False if you use shadows on solid ones +theme.mstab_bar_padding = "default" -- how much padding there should be between clients and your tabbar + -- by default it will adjust based on your useless gaps. + -- If you want a custom value. Set it to the number of pixels (int) +theme.mstab_border_radius = 10 -- border radius of the tabbar +theme.mstab_bar_height = 50 -- height of the tabbar +theme.mstab_tabbar_position = "top" -- position of the tabbar (mstab currently does not support left,right) +theme.mstab_tabbar_style = "default" -- style of the tabbar ("default", "boxes" or "modern") + -- defaults to the tabbar_style so only change if you want a + -- different style for mstab and tabbed -- wibar theme.wibar_shape = gears.shape.rounded_bar theme.wibar_bg = theme.bg_normal diff --git a/mpv/watch_later/B616B30830C2718C31094DBF25824AF7 b/mpv/watch_later/B616B30830C2718C31094DBF25824AF7 new file mode 100644 index 0000000..c3b236e --- /dev/null +++ b/mpv/watch_later/B616B30830C2718C31094DBF25824AF7 @@ -0,0 +1 @@ +start=1511.822000 diff --git a/qutebrowser/autoconfig.yml b/qutebrowser/autoconfig.yml index 9117204..b9e72fa 100644 --- a/qutebrowser/autoconfig.yml +++ b/qutebrowser/autoconfig.yml @@ -10,4 +10,5 @@ settings: https://openweathermap.org: false content.notifications: https://jelly.cochrun.xyz: true + https://nc.cochrun.xyz: false https://www.reddit.com: false diff --git a/qutebrowser/qsettings/QtProject.conf b/qutebrowser/qsettings/QtProject.conf index 7ade212..633a489 100644 --- a/qutebrowser/qsettings/QtProject.conf +++ b/qutebrowser/qsettings/QtProject.conf @@ -1,6 +1,6 @@ [FileDialog] -history=file:///home/chris, file:///home/chris/Downloads, file:///home/chris/Downloads/Takeout/Contacts/All Contacts, file:///home/chris/Pictures/Newsletter, file:///home/chris/org, file:///home/chris/storage/digikam/Photos/Camera/Camera -lastVisited=file:///home/chris/storage/digikam/Photos/Camera/Camera +history=file:///home/chris/Downloads, file:///home/chris/Downloads/Takeout/Contacts/All Contacts, file:///home/chris/Pictures/Newsletter, file:///home/chris/org, file:///home/chris/storage/digikam/Photos/Camera/Camera +lastVisited=file:///home/chris/org qtVersion=5.15.2 shortcuts=file:, file:///home/chris sidebarWidth=116 diff --git a/rofi/rofi-pass/config b/rofi/rofi-pass/config new file mode 100644 index 0000000..95b31b7 --- /dev/null +++ b/rofi/rofi-pass/config @@ -0,0 +1,99 @@ +# permanently set alternative root dir. Use ":" to separate multiple roots +# which can be switched at runtime with shift+left/right +# root=/path/to/root + +# rofi command. Make sure to have "$@" as last argument +_rofi () { + rofi -i -no-auto-select "$@" +} + +# default command to generate passwords +_pwgen () { + pwgen -yc 28 "$@" +} + +# image viewer to display qrcode of selected entry +# qrencode is needed to generate the image and a viewer +# that can read from pipes. Known viewers to work are feh and display +_image_viewer () { + sxiv - +# display +} + +# xdotool needs the keyboard layout to be set using setxkbmap +# You can do this in your autostart scripts (e.g. xinitrc) + +# If for some reason, you cannot do this, you can set the command here. +# and set fix_layout to true +fix_layout=false + +layout_cmd () { + setxkbmap us +} + +# fields to be used +URL_field='url' +USERNAME_field='user' +AUTOTYPE_field='autotype' + +# delay to be used for :delay keyword +delay=2 + +# rofi-pass needs to close itself before it can type passwords. Set delay here. +wait=0.2 + +# delay between keypresses when typing (in ms) +xdotool_delay=6 + +## Programs to be used +# Editor +EDITOR='emacsclient -c' + +# Browser +BROWSER='xdg-open' + +## Misc settings + +default_do='menu' # menu, autotype, copyPass, typeUser, typePass, copyUser, copyUrl, viewEntry, typeMenu, actionMenu, copyMenu, openUrl +auto_enter='false' +notify='false' +default_autotype='user :tab pass' + +# color of the help messages +# leave empty for autodetection +help_color="#4872FF" + +# Clipboard settings +# Possible options: primary, clipboard, both +clip=primary + +# Seconds before clearing pass from clipboard +clip_clear=45 + +## Options for generating new password entries + +# open new password entries in editor +edit_new_pass="true" + +# default_user is also used for password files that have no user field. +#default_user="${ROFI_PASS_DEFAULT_USER-$(whoami)}" +#default_user2=mary_ann +#password_length=12 + +# Custom Keybindings +autotype="Alt+1" +type_user="Alt+2" +type_pass="Alt+3" +open_url="Alt+4" +copy_name="Alt+u" +copy_url="Alt+l" +copy_pass="Alt+p" +show="Alt+o" +copy_entry="Alt+2" +type_entry="Alt+1" +copy_menu="Alt+c" +action_menu="Alt+a" +type_menu="Alt+t" +help="Alt+h" +switch="Alt+x" +insert_pass="Alt+n"