diff --git a/awesome/bling b/awesome/bling index 0fb8534..3164486 160000 --- a/awesome/bling +++ b/awesome/bling @@ -1 +1 @@ -Subproject commit 0fb85341916b6de1c5cd6ddf3e8472292a93a303 +Subproject commit 3164486da072d22b1bd62e670805566f4418f8a1 diff --git a/awesome/init.fnl b/awesome/init.fnl index 0f09f62..52a00ec 100644 --- a/awesome/init.fnl +++ b/awesome/init.fnl @@ -26,9 +26,9 @@ ;; Check if awesome encountered an error during startup and fall back to ;; 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})) + (naughty.notification {:preset naughty.config.presets.critical + :title "Oops, there were errors during startup!" + :text awesome.startup_errors})) ;; Handle runtime errors after startup @@ -38,9 +38,9 @@ ;; Make sure we don't go into an endless error loop (when (not in_error) (set in_error true) - (naughty.notify {:preset naughty.config.presets.critical - :title "Oops, an error happened!" - :text (tostring err)}) + (naughty.notification {:preset naughty.config.presets.critical + :title "Oops, an error happened!" + :text (tostring err)}) (set in_error false))))) @@ -50,16 +50,22 @@ (beautiful.init "/home/chris/.config/awesome/theme.lua") ;; Import the bling modules and layouts -(local bling (require "bling")) +(local bling (require :bling)) ;; (local awestore (require "awestore")) +(ruled.notification.connect_signal + "request::rules" + (fn [] + (ruled.notification.append_rules notifications))) + +(naughty.notification {:title beautiful.mstab_bar_padding}) + (set naughty.config.defaults.position "bottom_middle") (set naughty.config.defaults.margin 10) (set naughty.config.defaults.border_width 0) (set naughty.config.defaults.hover_timeout 3) (set naughty.config.defaults.max_width (dpi 700)) - ;; { ;; :rule { } ;; :properties { @@ -95,8 +101,8 @@ ;; Table of layouts to cover with awful.layout.inc, order matters. (set awful.layout.layouts [ - awful.layout.suit.tile bling.layout.mstab + awful.layout.suit.tile bling.layout.centered awful.layout.suit.floating ;; awful.layout.suit.tile.left @@ -661,11 +667,6 @@ ;; 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. (client.connect_signal diff --git a/awesome/rc.lua b/awesome/rc.lua index 2b98ecd..0419d69 100644 --- a/awesome/rc.lua +++ b/awesome/rc.lua @@ -15,5 +15,6 @@ searcher = fennel.make_searcher({ table.insert(package.loaders or package.searchers, fennel.searcher) debug.traceback = fennel.traceback + require("init") -- load ~/.config/awesome/init.fnl diff --git a/awesome/theme.lua b/awesome/theme.lua index 548e722..49a8f81 100644 --- a/awesome/theme.lua +++ b/awesome/theme.lua @@ -11,6 +11,7 @@ local gfs = require("gears.filesystem") local themes_path = gfs.get_themes_dir() local wallpaperdir = "/home/chris/Pictures/wallpapers/" local bling = require("bling") +local configdir = gfs.get_configuration_dir() local theme = {} @@ -52,7 +53,7 @@ theme.fg_minimize = theme.base04 theme.red = "#ff5c57" -theme.useless_gap = dpi(11) +theme.useless_gap = dpi(9) theme.border_width = dpi(0) theme.transparent = "#00000000" theme.bg_systray = "#282a36AA" @@ -61,19 +62,19 @@ theme.border_focus = "#00000000" theme.border_marked = "#00000000" -theme.mstab_tabbar_height = 400 +-- theme.mstab_tabbar_height = 400 theme.tabbar_bg_normal = theme.bg_normal theme.tabbar_fg_normal = theme.fg_normal theme.tabbar_bg_focus = theme.bg_focus theme.tabbar_fg_focus = theme.fg_focus theme.mstab_bar_padding = "default" -- how much padding there should be between clients and your tabbar -theme.mstab_tabbar_position = "bottom" -- position of the tabbar (mstab currently does not support left,right) -theme.mstab_tabbar_style = "default" -- style of the tabbar ("default", "boxes" or "modern") +-- theme.mstab_tabbar_position = "bottom" -- 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 -theme.tabbar_bar_ontop = false -- whether you want to allow the bar to be ontop of clients +-- theme.tabbar_bar_ontop = false -- whether you want to allow the bar to be ontop of clients theme.tabbar_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 @@ -108,8 +109,8 @@ theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel( -- mstab -theme.mstab_bar_ontop = false -- 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 +-- theme.mstab_bar_ontop = false -- 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 -- by default it will adjust based on your useless gaps. @@ -119,10 +120,10 @@ theme.mstab_dont_resize_slaves = false -- whether the tabbed stack windows -- theme.tabbar_fg_normal = theme.fg_normal -- theme.tabbar_bg_focus = theme.bg_focus -- theme.tabbar_fg_focus = theme.fg_focus -theme.mstab_border_radius = 30 -- border radius of the tabbar -theme.mstab_bar_padding = "default" -- how much padding there should be between clients and your 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") +-- theme.mstab_border_radius = 30 -- border radius of the tabbar +-- theme.mstab_bar_padding = "default" -- how much padding there should be between clients and your 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 @@ -160,48 +161,6 @@ theme.menu_width = dpi(100) -- beautiful.variable in your rc.lua --theme.bg_widget = "#cc0000" --- mstab -theme.mstab_bar_ontop = false -- 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 --- 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_tabbar_height = 400 -theme.tabbar_bg_normal = theme.bg_normal -theme.tabbar_fg_normal = theme.fg_normal -theme.tabbar_bg_focus = theme.bg_focus -theme.tabbar_fg_focus = theme.fg_focus -theme.mstab_border_radius = 50 -- border radius of the tabbar - -theme.mstab_bar_padding = "default" -- how much padding there should be between clients and your tabbar -theme.mstab_tabbar_position = "bottom" -- 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 - -theme.tabbar_bar_ontop = false -- whether you want to allow the bar to be ontop of clients -theme.tabbar_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 --- 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.tabbar_tabbar_height = 400 --- theme.tabbar_bg_normal = theme.bg_normal --- theme.tabbar_fg_normal = theme.fg_normal --- theme.tabbar_bg_focus = theme.bg_focus --- theme.tabbar_fg_focus = theme.fg_focus -theme.tabbar_border_radius = 50 -- border radius of the tabbar - -theme.tabbar_bar_padding = "default" -- how much padding there should be between clients and your tabbar -theme.tabbar_tabbar_position = "bottom" -- position of the tabbar (mstab currently does not support left,right) -theme.tabbar_tabbar_style = "modern" -- 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 @@ -268,6 +227,7 @@ theme.layout_cornernw = themes_path.."default/layouts/cornernww.png" theme.layout_cornerne = themes_path.."default/layouts/cornernew.png" theme.layout_cornersw = themes_path.."default/layouts/cornersww.png" theme.layout_cornerse = themes_path.."default/layouts/cornersew.png" +theme.layout_mstab = configdir.."bling/icons/layouts/mstab.png" -- Notifications diff --git a/greenclip.toml b/greenclip.toml new file mode 100644 index 0000000..014b1b0 --- /dev/null +++ b/greenclip.toml @@ -0,0 +1,10 @@ +[greenclip] + blacklisted_applications = [] + enable_image_support = true + history_file = "/home/chris/.cache/greenclip.history" + image_cache_directory = "/tmp/greenclip" + max_history_length = 50 + max_selection_size_bytes = 0 + static_history = ["Chris Cochrun"] + trim_space_from_selection = true + use_primary_selection_as_input = false \ No newline at end of file diff --git a/mpv/mpv.conf b/mpv/mpv.conf index 17b96fd..442eebe 100644 --- a/mpv/mpv.conf +++ b/mpv/mpv.conf @@ -3,7 +3,7 @@ osc=no vo=gpu af=scaletempo2 autofit=90% -geometry=80%:80% +geometry=90%:90% # input-ipc-server="/tmp/mpvsocket" hwdec=auto rtsp-transport=udp diff --git a/rofi/launchers-git/laptop-clipboard.rasi b/rofi/launchers-git/laptop-clipboard.rasi new file mode 100644 index 0000000..d21629a --- /dev/null +++ b/rofi/launchers-git/laptop-clipboard.rasi @@ -0,0 +1,25 @@ +/*-*- mode: css; -*-*/ +configuration { + font: "VictorMono Nerd Font 24.0"; + show-icons: true; + display-clipboard: " "; +} + +@import "/home/chris/.config/rofi/config.rasi" + +window { + width: 70%; +} + +element { + padding: 5px 5px 5px 10px; +} + +element-icon { + size: 0px; + padding: 0px 0px 0px; +} + +element-text { + vertical-align: 0.5; +} diff --git a/scripts/kderofi-rbw b/scripts/kderofi-rbw index 9ad8427..b4f77e7 100755 --- a/scripts/kderofi-rbw +++ b/scripts/kderofi-rbw @@ -66,16 +66,16 @@ fi case ${option} in Password ) echo "${SECRET}" - xdotool type $(rbw get "${SECRET}") + ydotool type --key-delay 6ms $(rbw get "${SECRET}") ;; User ) echo "$(rbw get --full "${SECRET}" | rg Username: | awk '{print $2}')" - xdotool type "$(rbw get --full "${SECRET}" | rg Username: | awk '{print $2}')" + ydotool type --key-delay 6ms "$(rbw get --full "${SECRET}" | rg Username: | awk '{print $2}')" ;; "User and password" ) - xdotool type $(rbw get --full "${SECRET}" | rg Username: | awk '{print $2}') - xdotool key Tab - xdotool type $(rbw get "${SECRET}") + ydotool type --key-delay 6ms $(rbw get --full "${SECRET}" | rg Username: | awk '{print $2}') + ydotool key 15:1 15:0 + ydotool type --key-delay 6ms $(rbw get "${SECRET}") ;; "QR-Code" ) if [[ $SECRET =~ wifi$ ]]; then @@ -90,7 +90,7 @@ case ${option} in fi ;; OTP ) - xdotool type $(rbw code "${SECRET}") + ydotool type --key-delay 6ms $(rbw code "${SECRET}") ;; esac diff --git a/scripts/plasma-startup.sh b/scripts/plasma-startup.sh index 7affb91..5c48360 100755 --- a/scripts/plasma-startup.sh +++ b/scripts/plasma-startup.sh @@ -5,6 +5,7 @@ export MOZ_ENABLE_WAYLAND=1 exec ydotoold & exec systemctl enable --user --now libinput-gestures & exec emacs --daemon & +exec greenclip daemon & xcape -e 'Super_L=Super_L|Control_L|Escape' & diff --git a/scripts/rofi-clip b/scripts/rofi-clip index 0363aaf..0822970 100755 --- a/scripts/rofi-clip +++ b/scripts/rofi-clip @@ -1,4 +1,26 @@ #!/usr/bin/env bash -style="desktop" -rofi -modi "clipboard:greenclip print" -show clipboard -run-command '{cmd}' -theme ~/.config/rofi/launchers-git/$style-clipboard.rasi +if [ $(hostname) = "syl" ]; then + if [ $XDG_SESSION_TYPE = "x11" ]; then + style="laptop" + echo "this is x11" + else + style="laptop-wayland" + echo "this is wayland" + fi +else + style="desktop" + #echo "this is not hidpi" +fi + +if [ $XDG_SESSION_TYPE = "x11" ]; then + rofi -modi "clipboard:greenclip print" -show clipboard -run-command '{cmd}' -theme ~/.config/rofi/launchers-git/$style-clipboard.rasi $@ & + c=0 + while ! xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $(xdotool search -class 'rofi') ; do + sleep .1 + c=$((c+1)) + [[ c = 50 ]] && exit; # stop script window didn't appear after 5 seconds + done +else + rofi -modi "clipboard:greenclip print" -show clipboard -run-command '{cmd}' -theme ~/.config/rofi/launchers-git/$style-clipboard.rasi +fi