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

@ -34,7 +34,7 @@ export EDITOR="$VISUAL"
# nnn # nnn
export NNN_TRASH=1 export NNN_TRASH=1
export NNN_OPTS="H" # 'H' shows the hidden files. Same as option -H (so 'nnn -deH') export NNN_OPTS="" # 'H' shows the hidden files. Same as option -H (so 'nnn -deH')
# export NNN_OPTS="deH" # if you prefer to have all the options at the same place # export NNN_OPTS="deH" # if you prefer to have all the options at the same place
export LC_COLLATE="C" # hidden files on top export LC_COLLATE="C" # hidden files on top
export NNN_FIFO="/tmp/nnn.fifo" # temporary buffer for the previews export NNN_FIFO="/tmp/nnn.fifo" # temporary buffer for the previews

24
.config/bspwm/bspwmrc Executable file
View File

@ -0,0 +1,24 @@
#!/bin/sh
pgrep -x sxhkd > /dev/null || sxhkd &
bspc monitor DP-2 -d 1 2 3 4 5
bspc monitor HDMI-0 -d 6 7 8 9 0
bspc config border_width 2
bspc config window_gap 12
bspc config split_ratio 0.52
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc rule -a Lxappearance state=floating
bspc rule -a Nvidia-settings state=floating
bspc rule -a openrgb state=floating
bspc rule -a Sxiv state=floating
dunst &
~/.config/bspwm/scripts/notify.sh &
picom &

22
.config/bspwm/scripts/notify.sh Executable file
View File

@ -0,0 +1,22 @@
#!/bin/bash
previous_track=""
while true; do
# Check if feishin player exists
player_exists=$(playerctl --player=Feishin status > /dev/null 2>&1; echo $?)
if (( player_exists != 0 )); then
echo "Feishin player not found."
sleep 5
continue
fi
current_track=$(playerctl -p Feishin metadata --format '{{ title }}\n{{ artist }}\n{{ album }}')
album_art_url=$(playerctl -p Feishin metadata mpris:artUrl)
album_art_file="/tmp/album_art.jpg"
wget -q -O $album_art_file $album_art_url
if [[ "$current_track" != "$previous_track" ]]; then
notify-send "Now Playing" "$current_track" -i $album_art_file
previous_track="$current_track"
fi
sleep 1
done

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"; font: "JetBrainsMonoNL Nerd Font Medium 12";
/* margin: 0;
padding: 0;
spacing: 0; */
} }
window { configuration {
/* display-drun: "  apps ";
margin: 0; display-ssh: " 󱘖 ssh ";
padding: 0; display-run: "  run ";
spacing: 0; show-icons: true;
location: center; drun-display-format: "{icon} {name}";
width: 720; sidebar-mode: true;
terminal: "kitty";
border: 2px;
border-color: @selected-active-background;
*/
}
/*
inputbar {
spacing: 8px;
padding: 8px;
margin: 8px;
} }
prompt, entry, element-icon, element-text { @theme "/home/april/.config/rofi/themes/everforest.rasi"
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"

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;
}

View File

@ -5,11 +5,15 @@ $directory\
$git_branch\ $git_branch\
$git_state\ $git_state\
$git_status\ $git_status\
$line_break\
$python\ $python\
$character""" $character"""
add_newline = false add_newline = false
#[line_break]
#disabled = true
[username] [username]
format = "[$user]($style) " format = "[$user]($style) "

View File

@ -8,7 +8,18 @@ super + Return
# program launcher # program launcher
super + d super + d
rofi -modes "drun,ssh,run" -show drun rofi -monitor -1 -modes "drun,ssh,run" -show drun
# vim cheat sheet (https://github.com/rdvm/rofi-vim)
super + v
~/.config/rofi/scripts/vim-cheat.sh
# print screen
Print
path="$HOME/pictures/screenshots/$(date +"%s - %Y-%m-%d")" && maim "$path" && xclip -selection clipboard -t image/png "$path"
shift + Print
path="$HOME/pictures/screenshots/$(date +"%s - %Y-%m-%d").png" && maim -s "$path" && xclip -selection clipboard -t image/png "$path"
# make sxhkd reload its configuration files: # make sxhkd reload its configuration files:
super + Escape super + Escape

View File

@ -11,11 +11,12 @@ here are the dotfiles and some of the programs i use for my bspwm setup. wip.
- aur helper: [paru](https://github.com/Morganamilo/paru) - aur helper: [paru](https://github.com/Morganamilo/paru)
- file manager: [nnn](https://github.com/jarun/nnn) - file manager: [nnn](https://github.com/jarun/nnn)
- launcher: [rofi](https://github.com/davatorium/rofi) - launcher: [rofi](https://github.com/davatorium/rofi)
- bar: [lemonbar](https://github.com/LemonBoy/bar) - bar: [polybar](https://github.com/polybar/polybar)
- notifications: [dunst](https://github.com/dunst-project/dunst) - notifications: [dunst](https://github.com/dunst-project/dunst)
- fonts: [jetbrains mono](https://github.com/JetBrains/JetBrainsMono) - fonts: [jetbrains mono](https://github.com/JetBrains/JetBrainsMono)
- theme: [everforest](https://github.com/sainnhe/everforest)
- [gtk](https://github.com/Fausto-Korpsvart/Everforest-GTK-Theme) - [gtk](https://github.com/Fausto-Korpsvart/Everforest-GTK-Theme)
- [icons](https://www.pling.com/p/1695476/) - [icons](https://github.com/yeyushengfan258/Reversal-icon-theme)
- [rofi](https://github.com/newmanls/rofi-themes-collection) - [rofi](https://github.com/newmanls/rofi-themes-collection)
- [neovim](https://github.com/neanias/everforest-nvim) - [neovim](https://github.com/neanias/everforest-nvim)
- [firefox](https://addons.mozilla.org/en-US/firefox/addon/everforest-dark-official/) - [firefox](https://addons.mozilla.org/en-US/firefox/addon/everforest-dark-official/)
@ -41,6 +42,7 @@ here are the dotfiles and some of the programs i use for my bspwm setup. wip.
- [taskline](https://github.com/perryrh0dan/taskline) - todo list - [taskline](https://github.com/perryrh0dan/taskline) - todo list
- [kabmat](https://github.com/PlankCipher/kabmat) - kanban boards - [kabmat](https://github.com/PlankCipher/kabmat) - kanban boards
- [alternatives](https://github.com/mayfrost/guides/blob/master/ALTERNATIVES.md) - not a program, but a list of better programs - [alternatives](https://github.com/mayfrost/guides/blob/master/ALTERNATIVES.md) - not a program, but a list of better programs
- [maim](https://github.com/naelstrof/maim) - screenshots
### 🎉 fun ### 🎉 fun
- [cava](https://github.com/karlstav/cava) - music visualizer - [cava](https://github.com/karlstav/cava) - music visualizer