update notifications, bar

This commit is contained in:
azpsen
2024-01-28 11:44:50 -06:00
parent dad3ba234d
commit 89516a6ce1
9 changed files with 263 additions and 55 deletions

View File

@@ -1,57 +1,15 @@
/* Dark theme. */
// @import "~/.cache/wal/colors-rofi-dark"
/* Light theme. */
// @import "~/.cache/wal/colors-rofi-light"
@import "squared-everforest"
* {
font: "JetBrainsMonoNL Nerd Font Medium 12";
/* margin: 0;
padding: 0;
spacing: 0; */
}
window {
/*
margin: 0;
padding: 0;
spacing: 0;
location: center;
width: 720;
border: 2px;
border-color: @selected-active-background;
*/
}
/*
inputbar {
spacing: 8px;
padding: 8px;
margin: 8px;
configuration {
display-drun: "  apps ";
display-ssh: " 󱘖 ssh ";
display-run: "  run ";
show-icons: true;
drun-display-format: "{icon} {name}";
sidebar-mode: true;
terminal: "kitty";
}
prompt, entry, element-icon, element-text {
vertical-align: 0.5;
}
listview {
padding: 4px 0;
lines: 8;
columns: 1;
fixed-height: false;
}
element {
padding: 8px;
spacing: 8px;
}
#element.selected.normal {
text-color: @background;
}
*/
@theme "/home/april/.config/rofi/themes/squared-everforest.rasi"
@theme "/home/april/.config/rofi/themes/everforest.rasi"

View File

@@ -0,0 +1,76 @@
#!/usr/bin/env bash
#
# Usage:
# 1. Download Vim cheat sheet
# $ rofi-vim --download
#
# 2. Use dmenu to open the cheat sheet
# $ rofi-vim --dvim
#
# 3. Run it!
# $ rofi-vim
#
# Where to save the cheat sheet.
VIM_FILE="$HOME/.cache/vimcheat.txt"
# Get current time
CURRENT_TIME=$(date +%s)
# Url of cheat sheet to download.
URL=('https://raw.githubusercontent.com/rdvm/rofi-vim/master/vimcheat')
function notify() {
if [ "$(command -v notify-send)" ]; then
notify-send "$1" "$2"
fi
}
function download() {
notify `basename "$0"` 'Downloading Vim cheat sheet'
echo "" > "$VIM_FILE"
# Echo URL to terminal and download the cheat sheet
echo "Downloading: $URL"
cheatsheet=$(curl -s "$URL")
echo "$cheatsheet" >> "$VIM_FILE"
notify `basename "$0"` "Cheat sheet downloaded"
}
# Download the cheat sheet if it doesn't exist or is older than 5 days
if [ ! -f "$VIM_FILE" ] || [ $((CURRENT_TIME - `stat -c %Y $VIM_FILE`)) -gt 432000 ]; then
download
fi
function rvim() {
sheet=$(cat "$VIM_FILE")
line=$(echo "$sheet" | rofi -monitor -1 -dmenu -p "  command " -i -font "mono 23" -width 100 -location 0 -lines 15)
exit_code=$?
line=($line)
}
function dvim() {
sheet=$(cat "$VIM_FILE")
line=$(echo "$sheet" | dmenu -fn "mono 23" -p "vim command" -i -l 15)
exit_code=$?
line=($line)
}
case $1 in
--download)
download
;;
--dvim)
dvim
;;
*)
rvim
;;
esac

View File

@@ -0,0 +1,111 @@
* {
bg-col: #2D353B;
bg-col-light: #2D353B;
border-col: #D3C6AA;
selected-col: #343F44;
blue: #A7C080;
fg-col: #D3C6AA;
fg-col2: #DBBC79;
grey: #7A8478;
width: 1000;
font: "JetBrainsMono Nerd Font SemiBold 14";
}
element-text, element-icon , mode-switcher {
background-color: inherit;
text-color: inherit;
}
window {
height: 500px;
border: 4px;
border-color: @border-col;
background-color: @bg-col;
}
mainbox {
background-color: @bg-col;
}
inputbar {
children: [prompt,entry];
background-color: @bg-col;
border-radius: 5px;
padding: 2px;
}
prompt {
background-color: @blue;
padding: 6px;
text-color: @bg-col;
border-radius: 3px;
margin: 20px 0px 0px 20px;
}
textbox-prompt-colon {
expand: false;
str: ":";
}
entry {
padding: 6px;
margin: 20px 0px 0px 10px;
text-color: @fg-col;
background-color: @bg-col;
}
listview {
border: 0px 0px 0px;
padding: 6px 0px 0px;
margin: 10px 0px 0px 20px;
columns: 3;
lines: 5;
background-color: @bg-col;
}
element {
padding: 5px;
background-color: @bg-col;
text-color: @fg-col ;
}
element-icon {
size: 25px;
}
element selected {
background-color: @selected-col ;
text-color: @fg-col2 ;
}
mode-switcher {
spacing: 0;
}
button {
padding: 10px;
background-color: @bg-col-light;
text-color: @grey;
vertical-align: 0.5;
horizontal-align: 0.5;
}
button selected {
background-color: @selected-col;
text-color: @blue;
}
message {
background-color: @bg-col-light;
margin: 2px;
padding: 2px;
border-radius: 5px;
}
textbox {
padding: 6px;
margin: 20px 0px 0px 20px;
text-color: @blue;
background-color: @bg-col-light;
}