From c28510ac087f85738ee2e716b346eb1bbc8baba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaroslav=20de=20la=20Pe=C3=B1a=20Smirnov?= Date: Thu, 19 May 2022 01:07:22 +0300 Subject: WIP: rofi Fix websurf menu. --- artix.sh | 2 ++ dotfiles/.config/rofi/config.rasi | 4 ++-- dotfiles/.config/rofi/file-browser | 2 ++ dotfiles/.config/sway/config | 2 +- dotfiles/.local/bin/rofiwebsurf | 3 ++- dotfiles/.profile | 3 ++- 6 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 dotfiles/.config/rofi/file-browser diff --git a/artix.sh b/artix.sh index a318ac2..828d70e 100755 --- a/artix.sh +++ b/artix.sh @@ -59,6 +59,8 @@ pacman -Sy \ pkg-config \ fakeroot \ papirus-icon-theme \ + arc-icon-theme \ + elementary-icon-theme \ alsa-utils \ pipewire \ pipewire-alsa \ diff --git a/dotfiles/.config/rofi/config.rasi b/dotfiles/.config/rofi/config.rasi index 181ce21..7941d48 100644 --- a/dotfiles/.config/rofi/config.rasi +++ b/dotfiles/.config/rofi/config.rasi @@ -1,5 +1,5 @@ configuration { - modi: "drun,run,file-browser-extended,ssh,combi"; + modi: ""; /* font: "mono 12";*/ location: 2; /* yoffset: 0;*/ @@ -109,7 +109,7 @@ configuration { /* kb-custom-9: "Alt+9";*/ /* kb-custom-10: "Alt+0";*/ kb-custom-11: "Alt+exclam,Alt+Return"; -/* kb-custom-12: "Alt+at";*/ + kb-custom-12: "Alt+at,Alt+h"; /* kb-custom-13: "Alt+numbersign";*/ /* kb-custom-14: "Alt+dollar";*/ /* kb-custom-15: "Alt+percent";*/ diff --git a/dotfiles/.config/rofi/file-browser b/dotfiles/.config/rofi/file-browser new file mode 100644 index 0000000..615da87 --- /dev/null +++ b/dotfiles/.config/rofi/file-browser @@ -0,0 +1,2 @@ +open-multi-key "kb-custom-11" +toggle-hidden-key "kb-custom-12" diff --git a/dotfiles/.config/sway/config b/dotfiles/.config/sway/config index f20c23d..c691386 100644 --- a/dotfiles/.config/sway/config +++ b/dotfiles/.config/sway/config @@ -172,7 +172,7 @@ bindsym --to-code { $mod+q kill # rofi launcher - $mod+d exec rofi -show drun -sidebar-mode + $mod+d exec rofi -show drun -sidebar-mode -modi "drun,run,file-browser-extended,ssh,combi" # Mako (notifications) $mod+Ctrl+space exec "makoctl dismiss" diff --git a/dotfiles/.local/bin/rofiwebsurf b/dotfiles/.local/bin/rofiwebsurf index b6f6e87..bcba65f 100755 --- a/dotfiles/.local/bin/rofiwebsurf +++ b/dotfiles/.local/bin/rofiwebsurf @@ -3,7 +3,8 @@ if [ "$ROFI_RETV" != 0 ]; then choice="$1" if echo "$choice" | egrep ".*://.*" >/dev/null 2>&1; then - choice="$(echo "$choice" | sed -E 's/(.*:\/\/([^[:space:]])*).*/\1/g' | + choice="$(echo "$choice" | grep -Eo "[^[:space:]]*:\/\/[^[:space:]]*" | + head -n1 | grep -E "https?:" || echo "$choice")" mimeo "$choice" > /dev/null else diff --git a/dotfiles/.profile b/dotfiles/.profile index 7d6f809..0ad601e 100644 --- a/dotfiles/.profile +++ b/dotfiles/.profile @@ -38,10 +38,11 @@ eval "$(dircolors "$HOME/.config/dir_colors")" . "$HOME/.config/lf/icons" +export $(dbus-launch) + # Start sway automatically upon login on tty1 or tty2 if [ -z $DISPLAY ] && [ $(tty) = /dev/tty1 ] || [ $(tty) = /dev/tty2 ]; then # DBUS variables (for Artix) - export $(dbus-launch) sway -d 2> ~/.cache/sway.log 1> /dev/null && clear && exit mv ~/.cache/sway.log ~/.cache/sway-crash-$(date +"%Y-%m-%dT%H:%M").log fi -- cgit v1.2.3