feat: polybar and rofi

This commit is contained in:
Elias Renman
2024-02-02 15:22:58 +01:00
parent 8d5b668ac4
commit d6cde2b388
17 changed files with 820 additions and 64 deletions

View File

@@ -34,17 +34,16 @@ exec --no-startup-id xss-lock --transfer-sleep-lock -- betterlockscreen --lock b
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet
# Start polybar
exec sh ~/.config/polybar/startup.sh
exec --no-startup-id sh ~/.config/polybar/startup.sh
# Start nitrogen for wallpaper support
exec always nitrogen --restore
exec --no-startup-id nitrogen --restore
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
# set $refresh_i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id sh ~/.config/polybar/sound.sh up
bindsym XF86AudioLowerVolume exec --no-startup-id sh ~/.config/polybar/sound.sh down
bindsym XF86AudioMute exec --no-startup-id sh ~/.config/polybar/sound.sh mute
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
@@ -60,7 +59,7 @@ bindsym $mod+t exec alacritty
bindsym $mod+q kill
# start dmenu (a program launcher)
bindsym $mod+space exec --no-startup-id rofi -show drun
bindsym $mod+space exec --no-startup-id rofi -show drun -icon-theme -show-icons
# A more modern dmenu replacement is rofi:
# bindcode $mod+40 exec "rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a
@@ -190,16 +189,20 @@ bindsym $mod+r mode "resize"
# --------
#
# Automatically turn off laptop monitor when the lid is closed
exec --no-startup-id xrandr --output eDP-1 --off --auto
#exec --no-startup-id xrandr --output eDP-1 --off --auto
exec --no-startup-id xset -dpms
exec --no-startup-id xset s off
# Automatically turn on laptop monitor when the lid is opened
exec --no-startup-id xrandr --output eDP-1 --auto
#exec --no-startup-id xrandr --output eDP-1 --auto
# Lockscreen
exec --no-startup-id betterlockscreen -w blur
bindsym $mod+L exec betterlockscreen --lock blur
# Power options
#
# --------
# Rice config
@@ -214,6 +217,6 @@ gaps bottom 15
# remove top border
for_window [class="^.*"] border pixel 2
client.focused #73daca90 #73daca90 #fdf6e3 #cb4b16
client.focused_inactive #73daca60 #73daca60 #fdf6e3 #073642
client.unfocused #73daca60 #73daca60 #fdf6e3 #073642
client.focused #bb9af790 #bb9af790 #fdf6e3 #cb4b16
client.focused_inactive #bb9af790 #bb9af790 #fdf6e3 #073642
client.unfocused #24283b #24283b #fdf6e3 #073642

8
picom/picom.conf Normal file
View File

@@ -0,0 +1,8 @@
enable = true;
vsync = true;
inactive-opacity = 0.65;
active-opacity = 0.98;
corner-radius = 3;
opacity-rule = [
"100:class_g = 'Rofi'"
];

11
polybar/bluetooth.sh Normal file
View File

@@ -0,0 +1,11 @@
#!/bin/sh
if [ $(bluetoothctl show | grep "Powered: yes" | wc -c) -eq 0 ]
then
echo "󰂲"
else
if [ $(echo info | bluetoothctl | grep 'Device' | wc -c) -eq 0 ]
then
echo "󰥰"
fi
echo ""
fi

View File

@@ -0,0 +1,7 @@
#!/bin/sh
if [ $(bluetoothctl show | grep "Powered: yes" | wc -c) -eq 0 ]
then
bluetoothctl power on
else
bluetoothctl power off
fi

View File

@@ -17,20 +17,19 @@
;==========================================================
[colors]
background = #282A2E
background-alt = #373B41
foreground = #C5C8C6
primary = #F0C674
secondary = #8ABEB7
alert = #A54242
disabled = #707880
background = #24283b
background-alt = #292e42
foreground = #c0caf5
primary = #bb9af7
secondary = #ff007c
alert = #db4b4b
disabled = #565f89
[bar/example]
monitor=${env:MONITOR:}
width = 100%
height = 24pt
radius = 6
; dpi = 96
background = ${colors.background}
@@ -41,18 +40,18 @@ line-size = 3pt
border-size = 4pt
border-color = #00000000
padding-left = 0
padding-right = 1
padding-left = 2
padding-right = 2
module-margin = 1
separator = |
separator =
separator-foreground = ${colors.disabled}
font-0 = monospace;2
modules-left = xworkspaces xwindow
modules-right = filesystem pulseaudio xkeyboard memory cpu wlan eth date
font-0 = JetbrainsMonoNerdFont;2
fixed-center = true
modules-left = power-button xworkspaces xwindow
modules-center = date time
modules-right = pulseaudio-devices wlan eth bluetooth memory cpu battery weather
cursor-click = pointer
cursor-scroll = ns-resize
@@ -94,16 +93,6 @@ label-empty-padding = 1
type = internal/xwindow
label = %title:0:60:...%
[module/filesystem]
type = internal/fs
interval = 25
mount-0 = /
label-mounted = %{F#F0C674}%mountpoint%%{F-} %percentage_used%%
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.disabled}
[module/pulseaudio]
type = internal/pulseaudio
@@ -117,29 +106,38 @@ label-volume = %percentage%%
label-muted = muted
label-muted-foreground = ${colors.disabled}
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
label-layout = %layout%
label-layout-foreground = ${colors.primary}
[module/date-time]
type = internal/date
interval = 43200
label-foreground = ${colors.primary}
label = %date%
label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-foreground = ${colors.background}
label-indicator-background = ${colors.secondary}
[module/date]
inherit = module/date-time
interval = 30
date = %a %d
[module/time]
inherit = module/date-time
interval = 1
date = %H:%M
[module/memory]
type = internal/memory
interval = 2
format-prefix = "RAM "
format = "%{A1:alacritty -e 'glances':}<prefix> <label>%{A}"
format-prefix = " "
format-prefix-foreground = ${colors.primary}
label = %percentage_used:2%%
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = "CPU "
format = "%{A1:alacritty -e 'glances':}<prefix> <label>%{A}"
format-prefix = " "
format-prefix-foreground = ${colors.primary}
label = %percentage:2%%
@@ -153,26 +151,85 @@ label-disconnected = %{F#F0C674}%ifname%%{F#707880} disconnected
[module/wlan]
inherit = network-base
interface-type = wireless
label-connected = %{F#F0C674}%ifname%%{F-} %essid% %local_ip%
; format-connected-prefix = "WIFI "
format-connected-prefix-foreground = ${colors.primary}
format-connected = "%{A1:alacritty -e 'nmtui':}<prefix> <ramp-signal>%{A}"
format-disconnected-prefix-foreground = ${colors.primary}
format-disconnected = "%{A1:alacritty -e 'nmtui':}󰤮%{A}"
ramp-signal-0 = 󰤮
ramp-signal-1 = 󰤟
ramp-signal-2 = 󰤢
ramp-signal-3 = 󰤥
ramp-signal-4 = 󰤨
ramp-signal-5 = 󰤨
[module/eth]
inherit = network-base
interface-type = wired
label-connected = %{F#F0C674}%ifname%%{F-} %local_ip%
label-connected = 󰌘
[module/date]
type = internal/date
interval = 1
[module/battery]
type = internal/battery
full-at = 99
low-at = 5
format-charging-prefix = "󰚥 "
format-charging-prefix-foreground = ${colors.primary}
format-discharging = "<ramp-capacity> <label-discharging>"
format-charging = "<ramp-capacity> <label-charging>"
format-full-prefix = "󰁹 "
format-full-prefix-foreground = ${colors.primary}
format-full = 100%
; Use the following command to list batteries and adapters:
; $ ls -1 /sys/class/power_supply/
battery = BAT0
adapter = ADP1
poll-interval = 5
ramp-capacity-0 = 󰁺
ramp-capacity-1 = 󰁼
ramp-capacity-2 = 󰁾
ramp-capacity-3 = 󰂀
ramp-capacity-4 = 󰂂
; Only applies if <bar-capacity> is used
bar-capacity-width = 10
date = %H:%M
date-alt = %Y-%m-%d %H:%M:%S
label = %date%
label-foreground = ${colors.primary}
[module/bluetooth]
type = custom/script
exec = sh ~/.config/polybar/bluetooth.sh
interval = 2
click-left = exec blueman-manager
click-right = exec ~/.config/polybar/toggle_bluetooth.sh
format-padding = 1
format-foreground = #ffffff
[module/pulseaudio-devices]
type = custom/script
label = "%output%"
label-font = 2
interval = 1.0
exec = sh ~/.config/polybar/sound.sh
click-right = exec pavucontrol &
click-left = sh ~/.config/polybar/sound.sh mute &
; scroll-up = sh ~/.config/polybar/sound.sh up &
; scroll-down = sh ~/.config/polybar/sound.sh down &
[module/weather]
type = custom/script
exec = curl -s https://wttr.in/v%C3%A4nn%C3%A4s?0QTn|grep -oP '(\+|\-)\d{1,2}(?=\()'
interval = 1800
label-foreground= ${colors.primary}
label = %output%°C
[module/power-button]
type = custom/text
format-foreground = ${colors.primary}
label = " 󰐥 "
click-left = sh ~/.config/rofi/powermenu/powermenu.sh
[settings]
screenchange-reload = true
pseudo-transparency = true
; vim:ft=dosini

View File

@@ -0,0 +1,11 @@
#!/bin/sh
if [ $(bluetoothctl show | grep "Powered: yes" | wc -c) -eq 0 ]
then
echo "󰂲"
else
if [ $(echo info | bluetoothctl | grep 'Device' | wc -c) -eq 0 ]
then
echo "󰥰"
fi
echo ""
fi

View File

@@ -0,0 +1,7 @@
#!/bin/sh
if [ $(bluetoothctl show | grep "Powered: yes" | wc -c) -eq 0 ]
then
bluetoothctl power on
else
bluetoothctl power off
fi

229
polybar/polybar/config.ini Normal file
View File

@@ -0,0 +1,229 @@
;==========================================================
;
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;
; To learn more about how to configure Polybar
; go to https://github.com/polybar/polybar
;
; The README contains a lot of information
;
;==========================================================
[colors]
background = #24283b
background-alt = #292e42
foreground = #c0caf5
primary = #bb9af7
secondary = #ff007c
alert = #db4b4b
disabled = #565f89
[bar/example]
monitor=${env:MONITOR:}
width = 100%
height = 24pt
radius = 6
; dpi = 96
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3pt
border-size = 4pt
border-color = #00000000
padding-left = 2
padding-right = 2
module-margin = 1
separator =
separator-foreground = ${colors.disabled}
font-0 = JetbrainsMonoNerdFont;2
fixed-center = true
modules-left = xworkspaces xwindow
modules-center = date time
modules-right = pulseaudio-devices wlan eth bluetooth memory cpu battery weather
cursor-click = pointer
cursor-scroll = ns-resize
enable-ipc = true
; wm-restack = generic
; wm-restack = bspwm
; wm-restack = i3
; override-redirect = true
[module/systray]
type = internal/tray
format-margin = 8pt
tray-spacing = 16pt
[module/xworkspaces]
type = internal/xworkspaces
label-active = %name%
label-active-background = ${colors.background-alt}
label-active-underline= ${colors.primary}
label-active-padding = 1
label-occupied = %name%
label-occupied-padding = 1
label-urgent = %name%
label-urgent-background = ${colors.alert}
label-urgent-padding = 1
label-empty = %name%
label-empty-foreground = ${colors.disabled}
label-empty-padding = 1
[module/xwindow]
type = internal/xwindow
label = %title:0:60:...%
[module/pulseaudio]
type = internal/pulseaudio
format-volume-prefix = "VOL "
format-volume-prefix-foreground = ${colors.primary}
format-volume = <label-volume>
label-volume = %percentage%%
label-muted = muted
label-muted-foreground = ${colors.disabled}
[module/date-time]
type = internal/date
interval = 43200
label-foreground = ${colors.primary}
label = %date%
[module/date]
inherit = module/date-time
interval = 30
date = %a %d
[module/time]
inherit = module/date-time
interval = 1
date = %H:%M
[module/memory]
type = internal/memory
interval = 2
format = "%{A1:alacritty -e 'glances':}<prefix> <label>%{A}"
format-prefix = " "
format-prefix-foreground = ${colors.primary}
label = %percentage_used:2%%
[module/cpu]
type = internal/cpu
interval = 2
format = "%{A1:alacritty -e 'glances':}<prefix> <label>%{A}"
format-prefix = " "
format-prefix-foreground = ${colors.primary}
label = %percentage:2%%
[network-base]
type = internal/network
interval = 5
format-connected = <label-connected>
format-disconnected = <label-disconnected>
label-disconnected = %{F#F0C674}%ifname%%{F#707880} disconnected
[module/wlan]
inherit = network-base
interface-type = wireless
; format-connected-prefix = "WIFI "
format-connected-prefix-foreground = ${colors.primary}
format-connected = "%{A1:alacritty -e 'nmtui':}<prefix> <ramp-signal>%{A}"
format-disconnected-prefix-foreground = ${colors.primary}
format-disconnected = "%{A1:alacritty -e 'nmtui':}󰤮%{A}"
ramp-signal-0 = 󰤮
ramp-signal-1 = 󰤟
ramp-signal-2 = 󰤢
ramp-signal-3 = 󰤥
ramp-signal-4 = 󰤨
ramp-signal-5 = 󰤨
[module/eth]
inherit = network-base
interface-type = wired
label-connected = 󰌘
[module/battery]
type = internal/battery
full-at = 99
low-at = 5
format-charging-prefix = "󰚥 "
format-charging-prefix-foreground = ${colors.primary}
format-discharging = "<ramp-capacity> <label-discharging>"
format-charging = "<ramp-capacity> <label-charging>"
format-full-prefix = "󰁹 "
format-full-prefix-foreground = ${colors.primary}
format-full = 100%
; Use the following command to list batteries and adapters:
; $ ls -1 /sys/class/power_supply/
battery = BAT0
adapter = ADP1
poll-interval = 5
ramp-capacity-0 = 󰁺
ramp-capacity-1 = 󰁼
ramp-capacity-2 = 󰁾
ramp-capacity-3 = 󰂀
ramp-capacity-4 = 󰂂
; Only applies if <bar-capacity> is used
bar-capacity-width = 10
[module/bluetooth]
type = custom/script
exec = sh ~/.config/polybar/bluetooth.sh
interval = 2
click-left = exec blueman-manager
click-right = exec ~/.config/polybar/toggle_bluetooth.sh
format-padding = 1
format-foreground = #ffffff
[module/pulseaudio-devices]
type = custom/script
label = "%output%"
label-font = 2
interval = 1.0
exec = sh ~/.config/polybar/sound.sh
click-right = exec pavucontrol &
click-left = sh ~/.config/polybar/sound.sh mute &
; scroll-up = sh ~/.config/polybar/sound.sh up &
; scroll-down = sh ~/.config/polybar/sound.sh down &
[module/weather]
type = custom/script
exec = curl -s https://wttr.in/v%C3%A4nn%C3%A4s?0QTn|grep -oP '(\+|\-)\d{1,2}(?=\()'
interval = 1800
label-foreground= ${colors.primary}
label = %output%°C
[settings]
screenchange-reload = true
pseudo-transparency = true

23
polybar/polybar/sound.sh Normal file
View File

@@ -0,0 +1,23 @@
function main() {
# Pipewire
active_device=$(pamixer --get-default-sink | awk -F'"' '/Default sink/{next} {print $(NF-1)}')
VOLUME=$(pamixer --get-volume-human)
action=$1
if [ "${action}" == "up" ]; then
pamixer -i 5
elif [ "${action}" == "down" ]; then
pamixer -d 5
elif [ "${action}" == "mute" ]; then
pamixer -t
else
if [ "$VOLUME" == "muted" ]; then
echo "$active_device 󰝟"
else
echo "$active_device$VOLUME"
fi
fi
}
main $@

View File

@@ -0,0 +1,7 @@
killall -q polybar
# Launch bar on each monitor, tray on primary
polybar --list-monitors | while IFS=$'\n' read line; do
monitor=$(echo $line | cut -d':' -f1)
primary=$(echo $line | cut -d' ' -f3)
MONITOR=$monitor polybar --reload "example" &
done

23
polybar/sound.sh Normal file
View File

@@ -0,0 +1,23 @@
function main() {
# Pipewire
active_device=$(pamixer --get-default-sink | awk -F'"' '/Default sink/{next} {print $(NF-1)}')
VOLUME=$(pamixer --get-volume-human)
action=$1
if [ "${action}" == "up" ]; then
pamixer -i 5
elif [ "${action}" == "down" ]; then
pamixer -d 5
elif [ "${action}" == "mute" ]; then
pamixer -t
else
if [ "$VOLUME" == "muted" ]; then
echo "$active_device 󰝟"
else
echo "$active_device$VOLUME"
fi
fi
}
main $@

104
rofi/powermenu/powermenu.sh Normal file
View File

@@ -0,0 +1,104 @@
#!/usr/bin/env bash
## Author : Aditya Shakya (adi1090x)
## Github : @adi1090x
#
## Rofi : Power Menu
#
## Available Styles
#
## style-1 style-2 style-3 style-4 style-5
# Current Theme
dir="$HOME/.config/rofi/powermenu"
theme='style-3'
# CMDs
host=$(hostname)
# Options
shutdown='󰐥'
reboot='󰜉'
lock='󰌾'
suspend=''
logout='󰍃'
yes='󰄬'
no='󰜺'
# Rofi CMD
rofi_cmd() {
rofi -dmenu \
-p "Uptime: $(awk '{print int($1/60)}' /proc/uptime) min" \
-theme ${dir}/${theme}.rasi
# -mesg "Uptime: $uptime" \
}
# Confirmation CMD
confirm_cmd() {
rofi -dmenu \
-p 'Confirmation' \
-mesg 'Are you Sure?' \
-theme ${dir}/shared/confirm.rasi
}
# Ask for confirmation
confirm_exit() {
echo -e "$yes\n$no" | confirm_cmd
}
# Pass variables to rofi dmenu
run_rofi() {
echo -e "$lock\n$suspend\n$logout\n$reboot\n$shutdown" | rofi_cmd
}
# Execute Command
run_cmd() {
selected="$(confirm_exit)"
if [[ "$selected" == "$yes" ]]; then
if [[ $1 == '--shutdown' ]]; then
systemctl poweroff
elif [[ $1 == '--reboot' ]]; then
systemctl reboot
elif [[ $1 == '--suspend' ]]; then
mpc -q pause
amixer set Master mute
systemctl suspend
elif [[ $1 == '--logout' ]]; then
if [[ "$DESKTOP_SESSION" == 'openbox' ]]; then
openbox --exit
elif [[ "$DESKTOP_SESSION" == 'bspwm' ]]; then
bspc quit
elif [[ "$DESKTOP_SESSION" == 'i3' ]]; then
i3-msg exit
elif [[ "$DESKTOP_SESSION" == 'plasma' ]]; then
qdbus org.kde.ksmserver /KSMServer logout 0 0 0
fi
fi
else
exit 0
fi
}
# Actions
chosen="$(run_rofi)"
case ${chosen} in
$shutdown)
run_cmd --shutdown
;;
$reboot)
run_cmd --reboot
;;
$lock)
if [[ -x '/usr/bin/betterlockscreen' ]]; then
betterlockscreen -l
elif [[ -x '/usr/bin/i3lock' ]]; then
i3lock
fi
;;
$suspend)
run_cmd --suspend
;;
$logout)
run_cmd --logout
;;
esac

View File

@@ -0,0 +1,27 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Colors
*
* Available Colors Schemes
*
* adapta catppuccin everforest navy paper
* arc cyberpunk gruvbox nord solarized
* black dracula lovelace onedark yousai
*
**/
/* Import color-scheme from `colors` directory */
* {
background: #15161EFF;
background-alt: #1A1B26FF;
foreground: #C0CAF5FF;
selected: #33467CFF;
active: #414868FF;
urgent: #F7768EFF;
}

View File

@@ -0,0 +1,93 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Rofi Theme File
* Rofi Version: 1.7.3
**/
/*****----- Configuration -----*****/
configuration {
show-icons: false;
}
/*****----- Global Properties -----*****/
@import "colors.rasi"
@import "fonts.rasi"
/*****----- Main Window -----*****/
window {
location: center;
anchor: center;
fullscreen: false;
width: 500px;
border-radius: 20px;
cursor: "default";
background-color: @background;
}
/*****----- Main Box -----*****/
mainbox {
spacing: 30px;
padding: 30px;
background-color: transparent;
children: [ "message", "listview" ];
}
/*****----- Message -----*****/
message {
margin: 0px;
padding: 20px;
border-radius: 20px;
background-color: @background-alt;
text-color: @foreground;
}
textbox {
background-color: inherit;
text-color: inherit;
vertical-align: 0.5;
horizontal-align: 0.5;
placeholder-color: @foreground;
blink: true;
markup: true;
}
/*****----- Listview -----*****/
listview {
columns: 2;
lines: 1;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
spacing: 30px;
background-color: transparent;
text-color: @foreground;
cursor: "default";
}
/*****----- Elements -----*****/
element {
padding: 60px 10px;
border-radius: 20px;
background-color: @background-alt;
text-color: @foreground;
cursor: pointer;
}
element-text {
font: "feather 48";
background-color: transparent;
text-color: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.5;
}
element selected.normal {
background-color: var(selected);
text-color: var(background);
}

View File

@@ -0,0 +1,12 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Fonts
*
**/
* {
font: "JetBrains Mono Nerd Font 12";
}

136
rofi/powermenu/style-3.rasi Normal file
View File

@@ -0,0 +1,136 @@
/**
*
* Author : Aditya Shakya (adi1090x)
* Github : @adi1090x
*
* Rofi Theme File
* Rofi Version: 1.7.3
**/
/*****----- Configuration -----*****/
configuration {
show-icons: false;
}
/*****----- Global Properties -----*****/
@import "shared/colors.rasi"
@import "shared/fonts.rasi"
/*****----- Global Properties -----*****/
* {
/* Resolution : 1920x1080 */
mainbox-spacing: 100px;
mainbox-margin: 150px 400px;
message-margin: 0px 350px;
message-padding: 15px;
message-border-radius: 15px;
listview-spacing: 50px;
element-padding: 35px 40px;
element-border-radius: 20px;
prompt-font: "Jetbrains Mono Nerd Font Bold 72";
textbox-font: "Jetbrains Nerd Font 14";
element-text-font: "Jetbrains Mono 64";
background-window: black/30%;
background-normal: white/5%;
background-selected: var(selected);
foreground-normal: white;
foreground-selected: white;
}
/*****----- Main Window -----*****/
window {
transparency: "real";
location: center;
anchor: center;
fullscreen: true;
cursor: "default";
background-color: var(background-window);
}
/*****----- Main Box -----*****/
mainbox {
enabled: true;
spacing: var(mainbox-spacing);
margin: var(mainbox-margin);
background-color: transparent;
children: [ "dummy", "inputbar", "listview", "message", "dummy" ];
}
/*****----- Inputbar -----*****/
inputbar {
enabled: true;
background-color: transparent;
children: [ "dummy", "prompt", "dummy"];
}
dummy {
background-color: transparent;
}
prompt {
enabled: true;
font: var(prompt-font);
background-color: transparent;
text-color: var(foreground-normal);
}
/*****----- Message -----*****/
message {
enabled: true;
margin: var(message-margin);
padding: var(message-padding);
border-radius: var(message-border-radius);
background-color: var(background-normal);
text-color: var(foreground-normal);
}
textbox {
font: var(textbox-font);
background-color: transparent;
text-color: inherit;
vertical-align: 0.5;
horizontal-align: 0.5;
}
/*****----- Listview -----*****/
listview {
enabled: true;
expand: false;
columns: 5;
lines: 1;
cycle: true;
dynamic: true;
scrollbar: false;
layout: vertical;
reverse: false;
fixed-height: true;
fixed-columns: true;
spacing: var(listview-spacing);
background-color: transparent;
cursor: "default";
}
/*****----- Elements -----*****/
element {
enabled: true;
padding: var(element-padding);
border-radius: var(element-border-radius);
background-color: var(background-normal);
text-color: var(foreground-normal);
cursor: pointer;
}
element-text {
font: var(element-text-font);
background-color: transparent;
text-color: inherit;
cursor: inherit;
vertical-align: 0.5;
horizontal-align: 0.5;
}
element selected.normal {
background-color: var(background-selected);
text-color: var(foreground-selected);
}

View File

@@ -1,5 +1,3 @@
// Copied from https://github.com/davatorium/rofi
* {
font: "JetbrainsMono 11";