From f395ed8f03eb9c87070302a4eabf2feac4769a7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20Fernando=20S=C3=A1nchez?= Date: Mon, 28 Dec 2020 16:21:25 +0100 Subject: [PATCH] Add rofi themes and bluetooth menu + Fixed dunst --- dunst/.config/dunst/{dunst.conf => dunstrc} | 0 i3/.config/i3/config | 1 + scripts/.bin/btmenu | 19 +++ scripts/.bin/filemenu | 9 +- scripts/.bin/myrofi | 2 + scripts/.bin/netmenu | 4 +- scripts/.bin/passmenu | 4 +- scripts/.bin/rofi-black-colors.rasi | 36 +++++ scripts/.bin/rofi-slate-theme.rasi | 139 ++++++++++++++++++++ scripts/.bin/runmenu | 2 +- scripts/.bin/winmenu.sh | 2 +- 11 files changed, 207 insertions(+), 11 deletions(-) rename dunst/.config/dunst/{dunst.conf => dunstrc} (100%) create mode 100755 scripts/.bin/btmenu create mode 100755 scripts/.bin/myrofi create mode 100644 scripts/.bin/rofi-black-colors.rasi create mode 100644 scripts/.bin/rofi-slate-theme.rasi diff --git a/dunst/.config/dunst/dunst.conf b/dunst/.config/dunst/dunstrc similarity index 100% rename from dunst/.config/dunst/dunst.conf rename to dunst/.config/dunst/dunstrc diff --git a/i3/.config/i3/config b/i3/.config/i3/config index eeb512b..4461048 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -66,6 +66,7 @@ bindsym $mod+q kill #bindsym $mod+Space exec --no-startup-id dmenu_run bindsym $mod+space exec --no-startup-id runmenu bindsym $mod+o exec --no-startup-id filemenu $HOME +bindsym $mod+b exec btmenu # diff --git a/scripts/.bin/btmenu b/scripts/.bin/btmenu new file mode 100755 index 0000000..9f5d302 --- /dev/null +++ b/scripts/.bin/btmenu @@ -0,0 +1,19 @@ +#!/bin/bash + +if command -v myrofi >/dev/null 2>&1; +then + program="myrofi -no-show-icons -dmenu" +else + program="dmenu" +fi + +bluetoothctl power on +bluetoothctl agent on +bluetoothctl default-agent +# bluetoothctl scan on +list=$(bluetoothctl paired-devices); +device=$(echo -ne "$list" | cut -d' ' -f 3- | $program "$@" ) + +addr=$(echo "$list" | grep "$device" | cut -d' ' -f2) + +bluetoothctl connect "$addr" diff --git a/scripts/.bin/filemenu b/scripts/.bin/filemenu index 1559646..6ca86be 100755 --- a/scripts/.bin/filemenu +++ b/scripts/.bin/filemenu @@ -21,12 +21,11 @@ else fi fi -if command -v rofi >/dev/null 2>&1; +if command -v myrofi >/dev/null 2>&1; then - launcher="rofi -dmenu -i -mesg '""$input""'" + myrofi -show file-browser $input else launcher="dmenu -fn "-*-cure-medium-*-*-*-11-*-*-*-*-*-*-*" -nb "#101010" -nf "#5f5f5f" -sb "#191 + # find "$input" -maxdepth 1 ! -path "$input" -print | sh -c "$launcher" | xargs $0 + ls -t1 "$input" | sh -c "$launcher" | xargs -I '{}' $0 "$input/{}" fi - - # find "$input" -maxdepth 1 ! -path "$input" -print | sh -c "$launcher" | xargs $0 -ls -t1 "$input" | sh -c "$launcher" | xargs -I '{}' $0 "$input/{}" diff --git a/scripts/.bin/myrofi b/scripts/.bin/myrofi new file mode 100755 index 0000000..08bec3d --- /dev/null +++ b/scripts/.bin/myrofi @@ -0,0 +1,2 @@ +#1/bin/sh +rofi -theme ~/.bin/rofi-slate-theme.rasi -i "$@" \ No newline at end of file diff --git a/scripts/.bin/netmenu b/scripts/.bin/netmenu index 823403d..014dc95 100755 --- a/scripts/.bin/netmenu +++ b/scripts/.bin/netmenu @@ -1,8 +1,8 @@ #!/bin/sh -if command -v rofi >/dev/null 2>&1; +if command -v myrofi >/dev/null 2>&1; then - launcher="rofi -dmenu -i -mesg '""$input""'" + launcher="myrofi -dmenu -no-show-icons -i -mesg '""$input""'" else launcher="dmenu -fn "-*-cure-medium-*-*-*-11-*-*-*-*-*-*-*" -nb "#101010" -nf "#5f5f5f" -sb "#191 fi diff --git a/scripts/.bin/passmenu b/scripts/.bin/passmenu index df34f61..c2fb164 100755 --- a/scripts/.bin/passmenu +++ b/scripts/.bin/passmenu @@ -3,9 +3,9 @@ shopt -s nullglob globstar -if command -v rofi >/dev/null 2>&1; +if command -v myrofi >/dev/null 2>&1; then - program="rofi -dmenu" + program="myrofi -no-show-icons -dmenu" else program="dmenu" fi diff --git a/scripts/.bin/rofi-black-colors.rasi b/scripts/.bin/rofi-black-colors.rasi new file mode 100644 index 0000000..ec8c1fb --- /dev/null +++ b/scripts/.bin/rofi-black-colors.rasi @@ -0,0 +1,36 @@ +/* -- Gray -- */ + +* { +shade1: #000000; +shade2: #050505; +shade3: #101010; +shade4: #151515; +shade5: #202020; +shade6: #252525; +shade7: #303030; +shade8: #353535; +} + +/**** Comment One First To Use Another ****/ + +/* -- Dark -- */ +* { + border: @shade2; + border-alt: @shade3; + background: @shade4; + background-alt: @shade5; + selected: @shade5; + foreground: #ffffff; + urgent: #DA4453; +} + +/* -- light -- */ +* { + border: @shade8; + border-alt: @shade7; + background: @shade6; + background-alt: @shade6; + selected: @shade5; + foreground: #ffffff; + urgent: #DA4453; +} diff --git a/scripts/.bin/rofi-slate-theme.rasi b/scripts/.bin/rofi-slate-theme.rasi new file mode 100644 index 0000000..4b5a9f8 --- /dev/null +++ b/scripts/.bin/rofi-slate-theme.rasi @@ -0,0 +1,139 @@ +/* + * Based on a theme by: + * + * Author : Aditya Shakya + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Twitter : @adi1090x + * + */ + +configuration { + font: "FantasqueSansMono Nerd Font 10"; + show-icons: true; + icon-theme: "Papirus"; + display-drun: ""; + drun-display-format: "{name}"; + disable-history: false; + fullscreen: false; + hide-scrollbar: false; + sidebar-mode: false; +} + +@import "rofi-black-colors.rasi" + +window { + transparency: "real"; + background-color: @background; + text-color: @foreground; + border: 2% 1% 2% 1%; + border-color: @border; + border-radius: 0% 0% 0% 0%; + height: 70%; + width: 70%; + location: center; + x-offset: 0; + y-offset: 0; +} + +prompt { + enabled: true; + padding: 0% 1% 0% 0%; + background-color: @background; + text-color: @foreground; + font: "FantasqueSansMono Nerd Font 12"; +} + +entry { + background-color: @background; + text-color: @foreground; + placeholder-color: @foreground; + expand: true; + horizontal-align: 0; + placeholder: "Search"; + padding: 0.15% 0% 0% 0%; + blink: true; +} + +inputbar { + children: [ prompt, entry ]; + background-color: @background; + text-color: @foreground; + expand: false; + border: 0% 0% 0.3% 0%; + border-radius: 0% 0% 0% 0%; + border-color: @border-alt; + margin: 0% 38.25% 0% 0%; + padding: 1%; + position: center; +} + +listview { + background-color: @background; + columns: 8; + spacing: 1%; + cycle: false; + dynamic: true; + layout: vertical; +} + +mainbox { + background-color: @background; + border: 2% 1% 2% 1%; + border-radius: 0% 0% 0% 0%; + border-color: @border-alt; + children: [ inputbar, listview ]; + spacing: 2%; + padding: 6% 3% 6% 3%; +} + +element { + background-color: @background; + text-color: @foreground; + orientation: vertical; + border-radius: 0%; + padding: 1% 0% 1% 0%; +} + +element-icon { + size: 64px; + border: 0px; +} + +element-text { + expand: true; + horizontal-align: 0.5; + vertical-align: 0.5; + margin: 0.5% 1% 0% 1%; +} + +element normal.urgent, +element alternate.urgent { + background-color: @urgent; + text-color: @foreground; + border-radius: 1%; +} + +element normal.active, +element alternate.active { + background-color: @background-alt; + text-color: @foreground; +} + +element selected { + background-color: @selected; + text-color: @foreground; + border: 0% 0% 0.3% 0%; + border-radius: 0% 0% 0% 0%; + border-color: @border-alt; +} + +element selected.urgent { + background-color: @urgent; + text-color: @foreground; +} + +element selected.active { + background-color: @background-alt; + color: @foreground; +} diff --git a/scripts/.bin/runmenu b/scripts/.bin/runmenu index af41bfe..4687dfb 100755 --- a/scripts/.bin/runmenu +++ b/scripts/.bin/runmenu @@ -2,7 +2,7 @@ if command -v rofi >/dev/null 2>&1; then - launcher="rofi -show combi -combi-hide-mode-prefix -combi-modi drun,run" + launcher="rofi -show combi -combi-hide-mode-prefix -combi-modi window,drun,run -theme .bin/rofi-slate-theme.rasi" else launcher="dmenu_run -fn "-*-cure-medium-*-*-*-11-*-*-*-*-*-*-*" -nb "#101010" -nf "#5f5f5f" -sb "#191919" -sf "#b72f62" -b" fi diff --git a/scripts/.bin/winmenu.sh b/scripts/.bin/winmenu.sh index 7bce529..7cbf266 100755 --- a/scripts/.bin/winmenu.sh +++ b/scripts/.bin/winmenu.sh @@ -3,7 +3,7 @@ if command -v rofi >/dev/null 2>&1; then - program="rofi -show window" + program="rofi -show window -combi-hide-mode-prefix -combi-modi drun,run -theme .bin/rofi-slate-theme.rasi" else program="i3-winmenu.py" fi