From 16abf0a670c22da3aea52a960cdde89573c1e88f Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Sun, 1 Nov 2020 12:50:33 -0500 Subject: Set up rofi --- common/bin/P | 2 +- desktop/.config/rofi/config.rasi | 4 + desktop/.config/rofi/glue_pro_blue.rasi | 145 ++++++++++++++++++++++++++++++++ setup.sh | 1 + zsh/.zshenv | 4 + zsh/.zshrc | 6 +- 6 files changed, 156 insertions(+), 6 deletions(-) create mode 100644 desktop/.config/rofi/config.rasi create mode 100644 desktop/.config/rofi/glue_pro_blue.rasi diff --git a/common/bin/P b/common/bin/P index 492d3d8..7fb5a4b 100755 --- a/common/bin/P +++ b/common/bin/P @@ -13,7 +13,7 @@ password_files=( "$prefix"/**/*.gpg ) password_files=( "${password_files[@]#"$prefix"/}" ) password_files=( "${password_files[@]%.gpg}" ) -password=$(printf '%s\n' "${password_files[@]}" | dmenu -fn "-*-*-*-*-*-*-20-*-*-*-*-*-*-*" "$@") +password=$(printf '%s\n' "${password_files[@]}" | rofi -dmenu "$@") [[ -n $password ]] || exit diff --git a/desktop/.config/rofi/config.rasi b/desktop/.config/rofi/config.rasi new file mode 100644 index 0000000..0479b0d --- /dev/null +++ b/desktop/.config/rofi/config.rasi @@ -0,0 +1,4 @@ +configuration { + font: "Noto Sans 20"; + theme: "glue_pro_blue"; +} diff --git a/desktop/.config/rofi/glue_pro_blue.rasi b/desktop/.config/rofi/glue_pro_blue.rasi new file mode 100644 index 0000000..39a9a38 --- /dev/null +++ b/desktop/.config/rofi/glue_pro_blue.rasi @@ -0,0 +1,145 @@ +/****************************************************************************** + * ROFI Color theme + * User: Rasi + * Copyright: Rasmus Steinke + ******************************************************************************/ +* { + selected-normal-foreground: rgba ( 255, 255, 255, 100 % ); + foreground: rgba ( 255, 255, 255, 100 % ); + normal-foreground: @foreground; + alternate-normal-background: transparent; + red: rgba ( 220, 50, 47, 100 % ); + selected-urgent-foreground: rgba ( 255, 195, 156, 100 % ); + blue: rgba ( 38, 139, 210, 100 % ); + urgent-foreground: rgba ( 243, 132, 61, 100 % ); + alternate-urgent-background: transparent; + active-foreground: rgba ( 38, 139, 210, 100 % ); + lightbg: rgba ( 238, 232, 213, 100 % ); + selected-active-foreground: rgba ( 32, 81, 113, 100 % ); + alternate-active-background: transparent; + background: transparent; + bordercolor: rgba ( 57, 57, 57, 100 % ); + alternate-normal-foreground: @foreground; + normal-background: transparent; + lightfg: rgba ( 88, 104, 117, 100 % ); + selected-normal-background: rgba ( 38, 139, 210, 100 % ); + border-color: @foreground; + spacing: 2; + separatorcolor: rgba ( 38, 139, 210, 100 % ); + urgent-background: transparent; + selected-urgent-background: rgba ( 38, 139, 210, 100 % ); + alternate-urgent-foreground: @urgent-foreground; + background-color: rgba ( 0, 0, 0, 0 % ); + alternate-active-foreground: @active-foreground; + active-background: rgba ( 57, 57, 57, 100 % ); + selected-active-background: rgba ( 38, 139, 210, 100 % ); +} +#window { + background-color: rgba ( 57, 57, 57, 95 % ); + border: 1; + padding: 5; +} +#mainbox { + border: 0; + padding: 0; +} +#message { + border: 1px dash 0px 0px ; + border-color: @separatorcolor; + padding: 1px ; +} +#textbox { + text-color: @foreground; +} +#listview { + fixed-height: 0; + border: 2px dash 0px 0px ; + border-color: @separatorcolor; + spacing: 2px ; + scrollbar: true; + padding: 2px 0px 0px ; +} +#element { + border: 0; + padding: 1px ; +} +#element.normal.normal { + background-color: @normal-background; + text-color: @normal-foreground; +} +#element.normal.urgent { + background-color: @urgent-background; + text-color: @urgent-foreground; +} +#element.normal.active { + background-color: @active-background; + text-color: @active-foreground; +} +#element.selected.normal { + background-color: @selected-normal-background; + text-color: @selected-normal-foreground; +} +#element.selected.urgent { + background-color: @selected-urgent-background; + text-color: @selected-urgent-foreground; +} +#element.selected.active { + background-color: @selected-active-background; + text-color: @selected-active-foreground; +} +#element.alternate.normal { + background-color: @alternate-normal-background; + text-color: @alternate-normal-foreground; +} +#element.alternate.urgent { + background-color: @alternate-urgent-background; + text-color: @alternate-urgent-foreground; +} +#element.alternate.active { + background-color: @alternate-active-background; + text-color: @alternate-active-foreground; +} +#scrollbar { + width: 4px ; + border: 0; + handle-width: 8px ; + padding: 0; +} +#mode-switcher { + border: 2px dash 0px 0px ; + border-color: @separatorcolor; +} +#button.selected { + background-color: @selected-normal-background; + text-color: @selected-normal-foreground; +} +#button { + background-color: @background; + text-color: @foreground; +} +#inputbar { + spacing: 0; + text-color: @normal-foreground; + padding: 1px ; +} +#case-indicator { + spacing: 0; + text-color: @normal-foreground; +} +#entry { + spacing: 0; + text-color: @normal-foreground; +} +#prompt { + spacing: 0; + text-color: @normal-foreground; +} +#inputbar { + children: [ prompt,textbox-prompt-colon,entry,case-indicator ]; +} +#textbox-prompt-colon { + expand: false; + str: ":"; + margin: 0px 0.3em 0em 0em ; + text-color: @normal-foreground; +} diff --git a/setup.sh b/setup.sh index 8638b39..9b0f1d8 100755 --- a/setup.sh +++ b/setup.sh @@ -42,6 +42,7 @@ tools=( emacs git zoxide + rofi ) for tool in "${tools[@]}"; do if ! type "$tool" &>/dev/null; then diff --git a/zsh/.zshenv b/zsh/.zshenv index 957ab52..24577bb 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -3,3 +3,7 @@ export EDITOR=nvim export TERMINAL=urxvt export EMACSDIR=$HOME/.emacs.d PATH="$HOME/bin:$HOME/.emacs.d/bin:$PATH" + +alias e="emacsclient -n" +alias dmenu=rofi +alias dmenu_run="rofi -show run" diff --git a/zsh/.zshrc b/zsh/.zshrc index f633d97..611fd40 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -35,13 +35,9 @@ setopt autocd setopt interactivecomments alias ls="ls --color" - alias e="emacsclient -n" (( $+commands[exa] )) && alias ls="exa" -# if (( $+commands[most] )); then -# alias less="most" -# export PAGER="most" -# fi + if (( $+commands[fzf] )); then if (( $+commands[fzf-share] )); then # Nixos -- cgit v1.2.3