Merge branch 'master' of gitlab.com:chriscochrun/dotfiles
This commit is contained in:
		
						commit
						4f4bf30170
					
				
					 10 changed files with 145 additions and 82 deletions
				
			
		
							
								
								
									
										116
									
								
								awesome/init.fnl
									
										
									
									
									
								
							
							
						
						
									
										116
									
								
								awesome/init.fnl
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -28,8 +28,8 @@
 | 
			
		|||
;; another config (This code will only ever execute for the fallback config)
 | 
			
		||||
(when awesome.startup_errors
 | 
			
		||||
  (naughty.notify {:preset naughty.config.presets.critical
 | 
			
		||||
                   :title "Oops, there were errors during startup!"
 | 
			
		||||
                   :text awesome.startup_errors}))
 | 
			
		||||
                           :title "Oops, there were errors during startup!"
 | 
			
		||||
                           :text awesome.startup_errors}))
 | 
			
		||||
 | 
			
		||||
;; Handle runtime errors after startup
 | 
			
		||||
(do
 | 
			
		||||
| 
						 | 
				
			
			@ -83,9 +83,9 @@
 | 
			
		|||
 | 
			
		||||
;; Table of layouts to cover with awful.layout.inc, order matters.
 | 
			
		||||
(set awful.layout.layouts [
 | 
			
		||||
                           bling.layout.mstab
 | 
			
		||||
                           awful.layout.suit.tile
 | 
			
		||||
                           ;;bling.layout.centered
 | 
			
		||||
                           bling.layout.mstab
 | 
			
		||||
                           bling.layout.centered
 | 
			
		||||
                           awful.layout.suit.floating
 | 
			
		||||
                           ;; awful.layout.suit.tile.left
 | 
			
		||||
                           ;; awful.layout.suit.tile.bottom
 | 
			
		||||
| 
						 | 
				
			
			@ -354,13 +354,13 @@
 | 
			
		|||
                                        :layout wibox.layout.fixed.horizontal
 | 
			
		||||
                                        })
 | 
			
		||||
                               :widget wibox.container.margin
 | 
			
		||||
                               :left (dpi 10)}
 | 
			
		||||
                               :left (dpi 5)}
 | 
			
		||||
                             :widget wibox.container.background
 | 
			
		||||
                             :shape gears.shape.rounded_bar
 | 
			
		||||
                             :bg beautiful.bg_normal
 | 
			
		||||
                             :fg beautiful.base09}
 | 
			
		||||
                          :widget wibox.container.margin
 | 
			
		||||
                          :right (dpi 10)})
 | 
			
		||||
                          :right (dpi 5)})
 | 
			
		||||
 | 
			
		||||
     (set s.batterytext (awful.widget.watch "cat /sys/class/power_supply/BAT1/capacity" 30))
 | 
			
		||||
     (set s.batterytext2 (awful.widget.watch "cat /sys/class/power_supply/BAT2/capacity" 30))
 | 
			
		||||
| 
						 | 
				
			
			@ -376,16 +376,16 @@
 | 
			
		|||
                                         6 s.batteryspace
 | 
			
		||||
                                         :layout wibox.layout.fixed.horizontal})
 | 
			
		||||
                                     :widget wibox.container.margin
 | 
			
		||||
                                     :left (dpi 10)}
 | 
			
		||||
                                     :left (dpi 5)}
 | 
			
		||||
                                  :widget wibox.container.background
 | 
			
		||||
                                  :shape gears.shape.rounded_bar
 | 
			
		||||
                                  :bg beautiful.bg_normal
 | 
			
		||||
                                  :fg beautiful.base0C}
 | 
			
		||||
                               :widget wibox.container.margin
 | 
			
		||||
                               :right (dpi 10)})
 | 
			
		||||
                               :right (dpi 5)})
 | 
			
		||||
 | 
			
		||||
     (set s.cputext (awful.widget.watch "cpu" 5))
 | 
			
		||||
     (set s.cpuicon (wibox.widget.textbox " "))
 | 
			
		||||
     (set s.cpuicon (wibox.widget.textbox " "))
 | 
			
		||||
     (set s.cpuspace (wibox.widget.textbox " "))
 | 
			
		||||
 | 
			
		||||
     (set s.cpuwidget { 1 { 1 { 1 (wibox.widget {
 | 
			
		||||
| 
						 | 
				
			
			@ -395,13 +395,51 @@
 | 
			
		|||
                                        :layout wibox.layout.fixed.horizontal
 | 
			
		||||
                                        })
 | 
			
		||||
                                :widget wibox.container.margin
 | 
			
		||||
                                :left (dpi 9)}
 | 
			
		||||
                                :left (dpi 5)}
 | 
			
		||||
                            :widget wibox.container.background
 | 
			
		||||
                            :shape gears.shape.rounded_bar
 | 
			
		||||
                            :bg beautiful.bg_normal
 | 
			
		||||
                            :fg beautiful.base0A}
 | 
			
		||||
                      :widget wibox.container.margin
 | 
			
		||||
                      :right (dpi 10)})
 | 
			
		||||
                      :right (dpi 5)})
 | 
			
		||||
 | 
			
		||||
     (set s.memtext (awful.widget.watch "mem" 2))
 | 
			
		||||
     (set s.memicon (wibox.widget.textbox " "))
 | 
			
		||||
     (set s.memspace (wibox.widget.textbox " "))
 | 
			
		||||
 | 
			
		||||
     (set s.memwidget { 1 { 1 { 1 (wibox.widget {
 | 
			
		||||
                                         1 s.memicon
 | 
			
		||||
                                         2 s.memtext
 | 
			
		||||
                                         3 s.memspace
 | 
			
		||||
                                        :layout wibox.layout.fixed.horizontal
 | 
			
		||||
                                        })
 | 
			
		||||
                                :widget wibox.container.margin
 | 
			
		||||
                                :left (dpi 5)}
 | 
			
		||||
                            :widget wibox.container.background
 | 
			
		||||
                            :shape gears.shape.rounded_bar
 | 
			
		||||
                            :bg beautiful.bg_normal
 | 
			
		||||
                            :fg beautiful.base0E}
 | 
			
		||||
                      :widget wibox.container.margin
 | 
			
		||||
                      :right (dpi 5)})
 | 
			
		||||
 | 
			
		||||
     (set s.nettext (awful.widget.watch "netwidget" 10))
 | 
			
		||||
     (set s.neticon (wibox.widget.textbox "  "))
 | 
			
		||||
     (set s.netspace (wibox.widget.textbox " "))
 | 
			
		||||
 | 
			
		||||
     (set s.netwidget { 1 { 1 { 1 (wibox.widget {
 | 
			
		||||
                                         ;; 1 s.neticon
 | 
			
		||||
                                         2 s.nettext
 | 
			
		||||
                                         3 s.netspace
 | 
			
		||||
                                        :layout wibox.layout.fixed.horizontal
 | 
			
		||||
                                        })
 | 
			
		||||
                                :widget wibox.container.margin
 | 
			
		||||
                                :left (dpi 5)}
 | 
			
		||||
                            :widget wibox.container.background
 | 
			
		||||
                            :shape gears.shape.rounded_bar
 | 
			
		||||
                            :bg beautiful.bg_normal
 | 
			
		||||
                            :fg beautiful.base08}
 | 
			
		||||
                      :widget wibox.container.margin
 | 
			
		||||
                      :right (dpi 5)})
 | 
			
		||||
 | 
			
		||||
     (set s.mailtext (awful.widget.watch "muunread" 360))
 | 
			
		||||
     (set s.mailicon (wibox.widget.textbox " "))
 | 
			
		||||
| 
						 | 
				
			
			@ -414,13 +452,13 @@
 | 
			
		|||
                                        :layout wibox.layout.fixed.horizontal
 | 
			
		||||
                                        })
 | 
			
		||||
                                :widget wibox.container.margin
 | 
			
		||||
                                :left (dpi 9)}
 | 
			
		||||
                                :left (dpi 5)}
 | 
			
		||||
                            :widget wibox.container.background
 | 
			
		||||
                            :shape gears.shape.rounded_bar
 | 
			
		||||
                            :bg beautiful.bg_normal
 | 
			
		||||
                            :fg beautiful.base0C}
 | 
			
		||||
                            :fg beautiful.base0D}
 | 
			
		||||
                      :widget wibox.container.margin
 | 
			
		||||
                      :right (dpi 10)})
 | 
			
		||||
                      :right (dpi 5)})
 | 
			
		||||
 | 
			
		||||
     (set s.wttrtext (awful.widget.watch "wttr" 1200))
 | 
			
		||||
     (set s.wttrspace (wibox.widget.textbox " "))
 | 
			
		||||
| 
						 | 
				
			
			@ -442,10 +480,10 @@
 | 
			
		|||
     
 | 
			
		||||
     (set s.mysystray { 1 { 1 { 1 (wibox.widget.systray)
 | 
			
		||||
                           :widget wibox.container.margin
 | 
			
		||||
                           :right (dpi 10)
 | 
			
		||||
                           :right (dpi 2)
 | 
			
		||||
                           :top (dpi 2)
 | 
			
		||||
                           :bottom (dpi 2)
 | 
			
		||||
                           :left (dpi 10)}
 | 
			
		||||
                           :left (dpi 2)}
 | 
			
		||||
                       :widget wibox.container.background
 | 
			
		||||
                       :shape gears.shape.rounded_bar
 | 
			
		||||
                       :bg beautiful.bg_normal
 | 
			
		||||
| 
						 | 
				
			
			@ -456,13 +494,14 @@
 | 
			
		|||
     (set s.myrightwidgets {
 | 
			
		||||
                            1 {
 | 
			
		||||
                               :layout wibox.layout.fixed.horizontal
 | 
			
		||||
                               ;; 1 s.wttrwidget
 | 
			
		||||
                               1 s.netwidget
 | 
			
		||||
                               2 s.mailwidget
 | 
			
		||||
                               3 s.cpuwidget
 | 
			
		||||
                               4 s.volumewidget
 | 
			
		||||
                               5 (if laptop s.batterywidget s.myemptywidget)
 | 
			
		||||
                               6 (if (= s.index 1) s.mysystray)
 | 
			
		||||
                               7 s.mylayoutbox
 | 
			
		||||
                               3 s.memwidget
 | 
			
		||||
                               4 s.cpuwidget
 | 
			
		||||
                               5 s.volumewidget
 | 
			
		||||
                               6 (if laptop s.batterywidget s.myemptywidget)
 | 
			
		||||
                               7 (if (= s.index 1) s.mysystray)
 | 
			
		||||
                               8 s.mylayoutbox
 | 
			
		||||
                               }
 | 
			
		||||
                            :widget wibox.container.background
 | 
			
		||||
                            })
 | 
			
		||||
| 
						 | 
				
			
			@ -486,7 +525,7 @@
 | 
			
		|||
                            :opacity 0.95
 | 
			
		||||
                            :screen s }))
 | 
			
		||||
 | 
			
		||||
     (: s.mywibox :struts { :bottom (dpi 45) })
 | 
			
		||||
     (: s.mywibox :struts { :bottom (dpi 40) })
 | 
			
		||||
 | 
			
		||||
   ;; Add widgets to the wibox
 | 
			
		||||
   (: s.mywibox :setup {
 | 
			
		||||
| 
						 | 
				
			
			@ -575,10 +614,19 @@
 | 
			
		|||
 | 
			
		||||
;; Rules
 | 
			
		||||
(ruled.client.append_rules clientrules)
 | 
			
		||||
 | 
			
		||||
(ruled.notification.connect_signal
 | 
			
		||||
 "request::rules"
 | 
			
		||||
 (fn []
 | 
			
		||||
     (ruled.notification.append_rules notifications)))
 | 
			
		||||
     (ruled.notification.append_rules notifications
 | 
			
		||||
                                      ;; {
 | 
			
		||||
                                      ;;  :rule { }
 | 
			
		||||
                                      ;;  :properties {
 | 
			
		||||
                                      ;;               :border-width 0
 | 
			
		||||
                                      ;;               :border_color "#000000"
 | 
			
		||||
                                      ;;               :opacity 0.9
 | 
			
		||||
                                      ;;               :shape gears.shape.rounded_rect}}
 | 
			
		||||
                                      )))
 | 
			
		||||
 | 
			
		||||
;; Signals
 | 
			
		||||
;; Signal function to execute when a new client appears.
 | 
			
		||||
| 
						 | 
				
			
			@ -595,21 +643,25 @@
 | 
			
		|||
       ;; Prevent clients from being unreachable after screen count changes.
 | 
			
		||||
       (awful.placement.no_offscreen c))
 | 
			
		||||
     ;; MPV wasn't centering right
 | 
			
		||||
     (when (= c.class "mpv") (awful.placement.centered c))
 | 
			
		||||
     ;; (when (= c.class "mpv") (awful.placement.centered c))
 | 
			
		||||
     (awful.client.focus.byidx 1)
 | 
			
		||||
     (: c :activate [])))
 | 
			
		||||
 | 
			
		||||
(client.connect_signal "property::fullscreen"
 | 
			
		||||
                       (fn [c]
 | 
			
		||||
                           (set c.shape (fn [cr w h]
 | 
			
		||||
                                            (gears.shape.rectangle cr w h)))))
 | 
			
		||||
(client.connect_signal "manage"
 | 
			
		||||
  (fn [c]
 | 
			
		||||
    ;; Rounded windows done right
 | 
			
		||||
   (when (not c.fullscreen)
 | 
			
		||||
    (set c.shape (fn [cr w h]
 | 
			
		||||
               (gears.shape.rounded_rect cr w h (dpi 15)))))))
 | 
			
		||||
                       (fn [c]
 | 
			
		||||
                           ;; Rounded windows done right
 | 
			
		||||
                           (when (not c.fullscreen)
 | 
			
		||||
                             (set c.shape (fn [cr w h]
 | 
			
		||||
                                              (gears.shape.rounded_rect cr w h (dpi 15)))))))
 | 
			
		||||
 | 
			
		||||
(client.connect_signal "focus" (fn [c] (set c.border_color beautiful.border_focus)))
 | 
			
		||||
(client.connect_signal "unfocus" (fn [c] (set c.border_color beautiful.border_normal)))
 | 
			
		||||
 | 
			
		||||
(client.connect_signal "request::manage" (fn [c] (if c.floating (set c.placement awful.placement.centered))))
 | 
			
		||||
(client.connect_signal "request::manage" (fn [c] (if c.floating (set c.placement (+ awful.placement.centered awful.placement.no_offscreen)))))
 | 
			
		||||
 | 
			
		||||
(awful.screen.focus 1)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -620,5 +672,5 @@
 | 
			
		|||
(awful.spawn "libinput-gestures-setup start")
 | 
			
		||||
(awful.spawn "bluetoothctl power on")
 | 
			
		||||
(awful.spawn "nextcloud --background")
 | 
			
		||||
(awful.spawn "rbw-agent")
 | 
			
		||||
;; (awful.spawn "rbw-agent")
 | 
			
		||||
(awful.spawn "xset r rate 220 90")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -145,7 +145,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 "rofi-pass"))
 | 
			
		||||
                     (awful.key [ modkey ] "p" (fn [] (awful.spawn "rofi-rbw"))
 | 
			
		||||
                                {:description "select pass" :group "apps" })
 | 
			
		||||
                     (awful.key [ modkey shift ] "w" (fn [] (awful.spawn "libreoffice --writer"))
 | 
			
		||||
                                {:description "Open Writer" :group "apps" })
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,8 +13,9 @@
 | 
			
		|||
               :propertites {
 | 
			
		||||
                             :border-width beautiful.border_width
 | 
			
		||||
                             :border_color "#000000"
 | 
			
		||||
                             :opacity 0.1
 | 
			
		||||
                             :opacity 0.9
 | 
			
		||||
                             :shape gears.shape.rounded_rect
 | 
			
		||||
                             :position "bottom_middle"
 | 
			
		||||
                             }
 | 
			
		||||
               }
 | 
			
		||||
              ])
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -94,8 +94,9 @@ theme.tasklist_bg = theme.red
 | 
			
		|||
-- notification_[bg|fg]
 | 
			
		||||
-- notification_[width|height|margin]
 | 
			
		||||
theme.notification_margin = dpi(10)
 | 
			
		||||
theme.notification_border_width = dpi(0)
 | 
			
		||||
theme.notification_border_width = 0
 | 
			
		||||
theme.notification_shape = gears.shape.rounded_rect
 | 
			
		||||
theme.notification_position = "bottom_middle"
 | 
			
		||||
-- notification_[border_color|border_width|shape|opacity]
 | 
			
		||||
 | 
			
		||||
-- Variables set for theming the menu:
 | 
			
		||||
| 
						 | 
				
			
			@ -119,8 +120,8 @@ theme.mstab_bar_padding = "default"         -- how much padding there should be
 | 
			
		|||
-- 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_bar_height = 100
 | 
			
		||||
theme.mstab_border_radius = 10              -- border radius of the tabbar
 | 
			
		||||
theme.mstab_tabbar_height = dpi(100)
 | 
			
		||||
theme.mstab_border_radius = dpi(5)              -- border radius 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")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -29,7 +29,7 @@
 | 
			
		|||
    # the top and down respectively.
 | 
			
		||||
    # The width can be negative.  In this case the actual width is the
 | 
			
		||||
    # screen width minus the width defined in within the geometry option.
 | 
			
		||||
    geometry = "250x5-50+50"
 | 
			
		||||
    geometry = "500-1300+1700"
 | 
			
		||||
 | 
			
		||||
    # Show how many messages are currently hidden (because of geometry).
 | 
			
		||||
    indicate_hidden = yes
 | 
			
		||||
| 
						 | 
				
			
			@ -41,7 +41,7 @@
 | 
			
		|||
    # The transparency of the window.  Range: [0; 100].
 | 
			
		||||
    # This option will only work if a compositing window manager is
 | 
			
		||||
    # present (e.g. xcompmgr, compiz, etc.).
 | 
			
		||||
    transparency = 30
 | 
			
		||||
    transparency = 1
 | 
			
		||||
 | 
			
		||||
    # The height of the entire notification.  If the height is smaller
 | 
			
		||||
    # than the font height and padding combined, it will be raised
 | 
			
		||||
| 
						 | 
				
			
			@ -61,7 +61,7 @@
 | 
			
		|||
 | 
			
		||||
    # Defines width in pixels of frame around the notification window.
 | 
			
		||||
    # Set to 0 to disable.
 | 
			
		||||
    frame_width = 3
 | 
			
		||||
    frame_width = 0
 | 
			
		||||
 | 
			
		||||
    # Defines color of the frame around the notification window.
 | 
			
		||||
    frame_color = "#282a36"
 | 
			
		||||
| 
						 | 
				
			
			@ -265,7 +265,7 @@
 | 
			
		|||
    # dunst will attempt to calculate an appropriate dpi value for each monitor
 | 
			
		||||
    # using the resolution and physical size. This might be useful in setups
 | 
			
		||||
    # where there are multiple screens with very different dpi values.
 | 
			
		||||
    per_monitor_dpi = false
 | 
			
		||||
    per_monitor_dpi = true
 | 
			
		||||
 | 
			
		||||
[shortcuts]
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,4 +10,4 @@ configuration {
 | 
			
		|||
  run-command:        "fish -c {cmd}";
 | 
			
		||||
  run-list-command:   "fish -c functions";
 | 
			
		||||
}
 | 
			
		||||
@import "/home/chris/.dotfiles/rofi/launchers-git/desktop.rasi"
 | 
			
		||||
@import "/home/chris/.dotfiles/rofi/launchers-git/laptop.rasi"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -45,7 +45,7 @@ sub get_de {
 | 
			
		|||
    unless ($de) { $de = $ENV{XDG_SESSION_DESKTOP} };
 | 
			
		||||
    unless ($de) { $de = $ENV{DESKTOP_SESSION} };
 | 
			
		||||
    # return $de;
 | 
			
		||||
    return "river";
 | 
			
		||||
    return "awesome";
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub shell {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,4 +6,6 @@ percent=$(bc -l <<< "100 * $total / $used")
 | 
			
		|||
 | 
			
		||||
mem=$(awk -v u=$used -v t=$total -v p=$percent 'BEGIN {printf "%sMi/%sMi %.1f% ", t, u, p}')
 | 
			
		||||
 | 
			
		||||
echo $mem
 | 
			
		||||
memperc=$(echo $mem | awk '{print $2}')
 | 
			
		||||
 | 
			
		||||
echo $memperc
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										7
									
								
								scripts/netwidget
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										7
									
								
								scripts/netwidget
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,7 @@
 | 
			
		|||
#!/bin/bash
 | 
			
		||||
net=$(nmcli | head -1 | awk '{print $4}')
 | 
			
		||||
if [[ $net == "Wired" ]]; then
 | 
			
		||||
    echo " $net"
 | 
			
		||||
else
 | 
			
		||||
    echo "  $net"
 | 
			
		||||
fi
 | 
			
		||||
| 
						 | 
				
			
			@ -11,48 +11,48 @@ list_passwords() {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
prompt='search for passwords...'
 | 
			
		||||
SECRET=$(list_passwords | rofi -i -p="${prompt}" -dmenu --no-lazy-grab)
 | 
			
		||||
SECRET=$(list_passwords | rofi -i -p="${prompt}" -dmenu)
 | 
			
		||||
 | 
			
		||||
# Ask whether pass, user or both are required
 | 
			
		||||
 | 
			
		||||
# options=("Password" \
 | 
			
		||||
    #         "User" \
 | 
			
		||||
    #         "User and password" \
 | 
			
		||||
    #         "QR-Code" \
 | 
			
		||||
    # 	"OTP")
 | 
			
		||||
options=("Password" \
 | 
			
		||||
             "User" \
 | 
			
		||||
             "User and password" \
 | 
			
		||||
             "QR-Code" \
 | 
			
		||||
	     "OTP")
 | 
			
		||||
 | 
			
		||||
# option=$(printf '%s\n' "${options[@]%}" | rofi -i -dmenu -width 400 -lines 4 -prompt="...")
 | 
			
		||||
option=$(printf '%s\n' "${options[@]%}" | rofi -i -dmenu -width 400 -lines 4 -prompt="...")
 | 
			
		||||
 | 
			
		||||
# echo $option
 | 
			
		||||
echo $option
 | 
			
		||||
 | 
			
		||||
# case ${option} in
 | 
			
		||||
#     Password )
 | 
			
		||||
# 	echo "${SECRET}"
 | 
			
		||||
# 	xdotool type $(rbw get "${SECRET}")
 | 
			
		||||
# 	;;
 | 
			
		||||
#     User )
 | 
			
		||||
# 	xdotool type $(rbw get --full "${SECRET}" | rg Username: | awk '{$1 = ""; print $0}')
 | 
			
		||||
# 	;;
 | 
			
		||||
#     "User and password" )
 | 
			
		||||
# 	xdotool type $(rbw get --full "${SECRET}" | rg Username: | awk '{$1 = ""; print $0}')
 | 
			
		||||
# 	xdotool key Tab
 | 
			
		||||
# 	xdotool type $(rbw get "${SECRET}")
 | 
			
		||||
# 	;;
 | 
			
		||||
#     "QR-Code" )
 | 
			
		||||
# 	if [[ $SECRET =~ wifi$ ]]; then
 | 
			
		||||
# 	    # Produce a valid wifi QR-code
 | 
			
		||||
# 	    WIFISSID=$(pass get_user ${SECRET})
 | 
			
		||||
# 	    WIFIPASS=$(pass get_pass ${SECRET})
 | 
			
		||||
# 	    WIFIQR="WIFI:T:WPA;S:${WIFISSID};P:${WIFIPASS};;"
 | 
			
		||||
# 	    qrencode -s 8 -o - $WIFIQR | feh --title "pass: QR-WIFI" -
 | 
			
		||||
# 	else
 | 
			
		||||
# 	    # Only password
 | 
			
		||||
# 	    pass show -q1 ${SECRET}
 | 
			
		||||
# 	fi
 | 
			
		||||
# 	;;
 | 
			
		||||
#     "OTP" )
 | 
			
		||||
# 	xdotool type $(rbw code ${SECRET})
 | 
			
		||||
# 	;;
 | 
			
		||||
# esac
 | 
			
		||||
case ${option} in
 | 
			
		||||
    Password )
 | 
			
		||||
	echo "${SECRET}"
 | 
			
		||||
	xdotool type $(rbw get "${SECRET}")
 | 
			
		||||
	;;
 | 
			
		||||
    User )
 | 
			
		||||
	xdotool type $(rbw get --full "${SECRET}" | rg Username: | awk '{$1 = ""; print $0}')
 | 
			
		||||
	;;
 | 
			
		||||
    "User and password" )
 | 
			
		||||
	xdotool type $(rbw get --full "${SECRET}" | rg Username: | awk '{$1 = ""; print $0}')
 | 
			
		||||
	xdotool key Tab
 | 
			
		||||
	xdotool type $(rbw get "${SECRET}")
 | 
			
		||||
	;;
 | 
			
		||||
    "QR-Code" )
 | 
			
		||||
	if [[ $SECRET =~ wifi$ ]]; then
 | 
			
		||||
	    # Produce a valid wifi QR-code
 | 
			
		||||
	    WIFISSID=$(pass get_user ${SECRET})
 | 
			
		||||
	    WIFIPASS=$(pass get_pass ${SECRET})
 | 
			
		||||
	    WIFIQR="WIFI:T:WPA;S:${WIFISSID};P:${WIFIPASS};;"
 | 
			
		||||
	    qrencode -s 8 -o - $WIFIQR | feh --title "pass: QR-WIFI" -
 | 
			
		||||
	else
 | 
			
		||||
	    # Only password
 | 
			
		||||
	    pass show -q1 ${SECRET}
 | 
			
		||||
	fi
 | 
			
		||||
	;;
 | 
			
		||||
    "OTP" )
 | 
			
		||||
	xdotool type $(rbw code ${SECRET})
 | 
			
		||||
	;;
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
# # wl-copy -o -s ${seat} ${PASSWD_PASS}
 | 
			
		||||
# wl-copy -o -s ${seat} ${PASSWD_PASS}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue