diff --git a/.bashrc b/.bashrc index c992e33..9980d35 100644 --- a/.bashrc +++ b/.bashrc @@ -34,7 +34,7 @@ export EDITOR="$VISUAL" # nnn 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 LC_COLLATE="C" # hidden files on top export NNN_FIFO="/tmp/nnn.fifo" # temporary buffer for the previews diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc new file mode 100755 index 0000000..2e89c2e --- /dev/null +++ b/.config/bspwm/bspwmrc @@ -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 & diff --git a/.config/bspwm/scripts/notify.sh b/.config/bspwm/scripts/notify.sh new file mode 100755 index 0000000..666148b --- /dev/null +++ b/.config/bspwm/scripts/notify.sh @@ -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 diff --git a/.config/rofi/config.rasi b/.config/rofi/config.rasi index bb51132..41880ff 100644 --- a/.config/rofi/config.rasi +++ b/.config/rofi/config.rasi @@ -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" diff --git a/.config/rofi/scripts/vim-cheat.sh b/.config/rofi/scripts/vim-cheat.sh new file mode 100755 index 0000000..2e1f538 --- /dev/null +++ b/.config/rofi/scripts/vim-cheat.sh @@ -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 diff --git a/.config/rofi/themes/everforest.rasi b/.config/rofi/themes/everforest.rasi new file mode 100644 index 0000000..9467f93 --- /dev/null +++ b/.config/rofi/themes/everforest.rasi @@ -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; +} diff --git a/.config/starship.toml b/.config/starship.toml index f5a65aa..001a384 100644 --- a/.config/starship.toml +++ b/.config/starship.toml @@ -5,11 +5,15 @@ $directory\ $git_branch\ $git_state\ $git_status\ +$line_break\ $python\ $character""" add_newline = false +#[line_break] +#disabled = true + [username] format = "[$user]($style) " diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc index ef55c22..acb7cbc 100644 --- a/.config/sxhkd/sxhkdrc +++ b/.config/sxhkd/sxhkdrc @@ -8,7 +8,18 @@ super + Return # program launcher 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: super + Escape diff --git a/README.md b/README.md index c019fa2..fde1158 100644 --- a/README.md +++ b/README.md @@ -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) - file manager: [nnn](https://github.com/jarun/nnn) - 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) - fonts: [jetbrains mono](https://github.com/JetBrains/JetBrainsMono) +- theme: [everforest](https://github.com/sainnhe/everforest) - [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) - [neovim](https://github.com/neanias/everforest-nvim) - [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 - [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 +- [maim](https://github.com/naelstrof/maim) - screenshots ### 🎉 fun - [cava](https://github.com/karlstav/cava) - music visualizer