From 6925aafdf5cf456cfe14693696a52a97cf25f3fd Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Sat, 7 Nov 2020 15:19:32 -0600 Subject: [PATCH] Make rofi use different sizes for desktop and laptop --- rofi/config.rasi | 2 + rofi/launchers-git/blurry-hidpi.rasi | 155 +-------------------------- rofi/launchers-git/blurry.rasi | 1 - rofi/launchers-git/desktop.rasi | 15 +++ rofi/launchers-git/laptop.rasi | 15 +++ rofi/launchers-git/launcher.sh | 16 ++- 6 files changed, 42 insertions(+), 162 deletions(-) create mode 100644 rofi/launchers-git/desktop.rasi create mode 100644 rofi/launchers-git/laptop.rasi diff --git a/rofi/config.rasi b/rofi/config.rasi index 34ca67e..9dd5630 100644 --- a/rofi/config.rasi +++ b/rofi/config.rasi @@ -1,5 +1,7 @@ +/*-*- mode: css; -*-*/ /** Configured For Applets **/ + configuration { show-icons: true; icon-theme: "Papirus"; diff --git a/rofi/launchers-git/blurry-hidpi.rasi b/rofi/launchers-git/blurry-hidpi.rasi index bcb7962..061ca4b 100644 --- a/rofi/launchers-git/blurry-hidpi.rasi +++ b/rofi/launchers-git/blurry-hidpi.rasi @@ -8,157 +8,8 @@ * */ + configuration { - font: "VictorMono Nerd Font 28.0"; - show-icons: true; - icon-theme: "Papirus"; - display-drun: " "; - drun-display-format: "{name} {description}"; - threads: 0; - scroll-method: 0; - disable-history: false; - fullscreen: false; - hide-scrollbar: true; - sidebar-mode: false; -} - -* { - background: #12121222; - background-color: #00222b33; - background-entry: #000000; - background-alt: #323232; - foreground: #f2f2f2; - foreground-selected: #ffffff; - urgent: #E91E63; - urgent-selected: #E91E63; - transparent: #00000000; -} - -window { - background-color: #44444444; - text-color: @foreground; - border-radius: 0px; - border: 0px; -// height: 60%; - width: 50%; - location: center; - anchor: center; - x-offset: 0; - y-offset: 0; - margin: 0px; - padding: 0px; -} - -mainbox { - border-radius: 35px; - background-color: @background-color; - text-color: @foreground; - transparency: "real"; -} - -inputbar { - background-color: @background-alt; - text-color: @foreground; - expand: false; - border-radius: 36px; - margin: 0px 0px 0px 0px; - padding: 6px 6px 6px 6px; - position: north; -} - -prompt { - enabled: true; - padding: 0px 6px 0px 5px; - background-color: @transparent; - text-color: @foreground; - // font: "FantasqueSansMono Nerd Font 16"; - border: 0px; -} - -entry { - background-color: @transparent; - placeholder-color: @foreground; - text-color: @foreground; - expand: true; - horizontal-align: 0; - placeholder: "Search"; - blink: true; - border: 0px; - padding: 0px 0px 0px 6px; -} - -case-indicator { - background-color: @transparent; - text-color: @foreground; - spacing: 0; - border: 0px; -} - - -listview { - background-color: @background; - columns: 1; - spacing: 4px; - cycle: false; - dynamic: true; - layout: vertical; - lines: 10; - scrollbar: false; - border: 0px; - fixed-height: false; -} - -mainbox { - background-color: @transparent; - text-color: @transparent; - children: [ inputbar, listview ]; - spacing: 5px; - padding: 10px 10px 10px 10px; -} - -element { - background-color: @background; - text-color: @foreground; - orientation: horizontal; - border-radius: 6px; - padding: 5px 0px 5px 0px; -} - -element-icon { - size: 20px; - border: 0px; - padding: 0px 10px 0px; -} - -element-text { - expand: true; - vertical-align: 0.5; -} - -element normal.urgent, -element alternate.urgent { - background-color: @urgent; - text-color: @foreground; - border-radius: 9px; -} - -element normal.active, -element alternate.active { - background-color: @background-alt; - text-color: @foreground; -} - -element selected { - background-color: @background-alt; - text-color: @foreground-selected; -} - -element selected.urgent { - background-color: @urgent-selected; - text-color: @foreground; -} - -element selected.active { - background-color: @background-alt; - color: @foreground-selected; + font: "VictorMono Nerd Font 30.0"; } +@import "/home/chris/.dotfiles/rofi/launchers-git/blurry.rasi" diff --git a/rofi/launchers-git/blurry.rasi b/rofi/launchers-git/blurry.rasi index 4080741..4fa8859 100644 --- a/rofi/launchers-git/blurry.rasi +++ b/rofi/launchers-git/blurry.rasi @@ -9,7 +9,6 @@ */ configuration { - font: "VictorMono Nerd Font 14.0"; display-drun: " "; drun-display-format: "{name} {description} - {command}"; threads: 0; diff --git a/rofi/launchers-git/desktop.rasi b/rofi/launchers-git/desktop.rasi new file mode 100644 index 0000000..f3a05db --- /dev/null +++ b/rofi/launchers-git/desktop.rasi @@ -0,0 +1,15 @@ +/*-*- mode: css; -*-*/ +/* + * + * Author : Aditya Shakya (adi1090x) + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Reddit : @adi1090x + * + */ + + +configuration { + font: "VictorMono Nerd Font 14.0"; +} +@import "/home/chris/.dotfiles/rofi/launchers-git/blurry.rasi" diff --git a/rofi/launchers-git/laptop.rasi b/rofi/launchers-git/laptop.rasi new file mode 100644 index 0000000..061ca4b --- /dev/null +++ b/rofi/launchers-git/laptop.rasi @@ -0,0 +1,15 @@ +/*-*- mode: css; -*-*/ +/* + * + * Author : Aditya Shakya (adi1090x) + * Mail : adi1090x@gmail.com + * Github : @adi1090x + * Reddit : @adi1090x + * + */ + + +configuration { + font: "VictorMono Nerd Font 30.0"; +} +@import "/home/chris/.dotfiles/rofi/launchers-git/blurry.rasi" diff --git a/rofi/launchers-git/launcher.sh b/rofi/launchers-git/launcher.sh index 406ccb3..c112d9d 100755 --- a/rofi/launchers-git/launcher.sh +++ b/rofi/launchers-git/launcher.sh @@ -13,14 +13,12 @@ # row row_center screen row_dock row_dropdown -# if [ $(hostname) = "chris-linuxlaptop" ]; then -# style="blurry-hidpi" -# #echo "this is hidpi" -# else -# style="blurry" -# #echo "this is not hidpi" -# fi - -style="blurry" +if [ $(hostname) = "chris-linuxlaptop" ]; then + style="laptop" + #echo "this is hidpi" +else + style="desktop" + #echo "this is not hidpi" +fi rofi -no-lazy-grab -show drun -modi drun,window,calc,ssh,run,emoji -theme launchers-git/"$style".rasi