Massive Updates

This commit is contained in:
sankalp committed 2023-10-13 10:24:13 +05:45
1 parent db7bec88da
commit 3685db2839
54 files changed
+1516 -305

No files matched your search

+22 -2
View File
@@ -67,9 +67,9 @@ clear
logo "Installing needed packages.."
dependencias=(base-devel rustup pacman-contrib bspwm polybar sxhkd \
alacritty brightnessctl dunst rofi lsd \
alacritty brightnessctl dunst rofi lsd stalonetray \
jq polkit-gnome git playerctl mpd xclip \
ncmpcpp geany ranger mpc picom xdotool \
ncmpcpp geany ranger mpc picom xdo xdotool jgmenu \
feh ueberzug maim pamixer libwebp xdg-user-dirs \
webp-pixbuf-loader xorg-xprop xorg-xkill physlock papirus-icon-theme \
ttf-jetbrains-mono ttf-jetbrains-mono-nerd ttf-terminus-nerd ttf-inconsolata ttf-joypixels \
@@ -263,6 +263,26 @@ else
printf "\n%s%sTdrop is already installed%s\n" "${BLD}" "${CGR}" "${CNC}"
fi
# Installing Eww
if command -v eww >/dev/null 2>&1; then
printf "\n%s%sEww is already installed%s\n" "${BLD}" "${CGR}" "${CNC}"
else
printf "\n%s%sInstalling Eww, this could take 10 mins or more.%s\n" "${BLD}" "${CBL}" "${CNC}"
{
sudo pacman -S rustup --noconfirm
cd "$HOME" || exit
git clone https://github.com/elkowar/eww
cd eww || exit
cargo build --release --no-default-features --features x11
sudo install -m 755 "$HOME/eww/target/release/eww" -t /usr/bin/
} && {
cd "$HOME" || exit
rm -rf {paru-bin,.cargo,.rustup,eww}
} || {
printf "\n%s%sFailed to install Eww. You may need to install it manually%s\n" "${BLD}" "${CRE}" "${CNC}"
}
fi
########## ---------- Enabling MPD service ---------- ##########
logo "Enabling mpd service"
+29 -21
View File
@@ -1,8 +1,11 @@
#!/usr/bin/env bash
# ╔╗ ╔═╗╔═╗╦ ╦╔╦╗ - z0mbi3
# ╠╩╗╚═╗╠═╝║║║║║║ - https://github.com/gh0stzk/dotfiles
# ╚═╝╚═╝╩ ╚╩╝╩ ╩ - z0mbi3.zk@protonmail.com
#
# ██████╗ ███████╗██████╗ ██╗ ██╗███╗ ███╗██████╗ ██████╗
# ██╔══██╗██╔════╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔════╝
# ██████╔╝███████╗██████╔╝██║ █╗ ██║██╔████╔██║██████╔╝██║
# ██╔══██╗╚════██║██╔═══╝ ██║███╗██║██║╚██╔╝██║██╔══██╗██║
# ██████╔╝███████║██║ ╚███╔███╔╝██║ ╚═╝ ██║██║ ██║╚██████╗
# ╚═════╝ ╚══════╝╚═╝ ╚══╝╚══╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝
# ┬┌┬┐┌─┐┌─┐┬─┐┌┬┐┌─┐┌┐┌┌┬┐ ┬ ┬┌─┐┬─┐┬┌─┐┌┐ ┬ ┌─┐┌─┐
# ││││├─┘│ │├┬┘ │ ├─┤│││ │ └┐┌┘├─┤├┬┘│├─┤├┴┐│ ├┤ └─┐
@@ -15,20 +18,18 @@ rice_dir="$HOME/.config/bspwm/karla"
## Fix java applications
export _JAVA_AWT_WM_NONREPARENTING=1
# ┬ ┬┌─┐┬─┐┬┌─┌─┐┌─┐┌─┐┌─┐┌─┐┌─┐
# ││││ │├┬┘├┴┐└─┐├─┘├─┤│ ├┤ └─┐
# └┴┘└─┘┴└─┴ ┴└─┘┴ ┴ ┴└─┘└─┘└─┘
# ╦ ╦╔═╗╦═╗╦╔═╔═╗╔═╗╔═╗╔═╗╔═╗╔═╗
# ║║║║ ║╠╦╝╠╩╗╚═╗╠═╝╠═╣║ ║╣ ╚═╗
# ╚╩╝╚═╝╩╚═╩ ╩╚═╝╩ ╩ ╩╚═╝╚═╝╚═╝
workspaces() {
name=1
for monitor in $(bspc query -M); do
bspc monitor "${monitor}" -n "$name" -d '1' '2' '3' '4' '5' '6'
#bspc monitor ${monitor} -n "$name" -d '' '' '' '' '' ''
(( name++ ))
# Default 1 monitor with 6 workspaces
for monitor in "$(xrandr -q | grep -w 'connected' | cut -d' ' -f1)"; do
bspc monitor "$monitor" -d '1' '2' '3' '4' '5' '6'
#bspc monitor "$monitor" -d '' '' '' '' '' ''
done
}
workspaces
## For two or three monitors configuration see https://github.com/gh0stzk/dotfiles/wiki/Two-or-more-monitors-setup
# ┌┐ ┌─┐┌─┐┬ ┬┌┬┐ ┌─┐┌─┐┌┐┌┌─┐┬┌─┐
# ├┴┐└─┐├─┘││││││ │ │ ││││├┤ ││ ┬
@@ -36,6 +37,7 @@ workspaces
bspc config external_rules_command $HOME/.config/bspwm/scripts/ExternalRules
bspc config window_gap 6
bspc config split_ratio 0.51
bspc config single_monocle true
bspc config borderless_monocle false
@@ -52,15 +54,15 @@ bspc config pointer_action3 resize_corner
#bspc wm --adopt-orphans
bspc rule -a scratch sticky=on state=floating focus=on
# ┬ ┌─┐┬ ┬┌┐┌┌─┐┬ ┬ ┌─┐┌─┐─┐ ┬┬ ┬ ┬─┐┬┌─┐┌─┐┌─┐
# │ ├─┤│ │││││ ├─┤ └─┐├┤ ┌┴┬┘└┬┘ ├┬┘││ ├┤ └─┐
# ┴─┘┴ ┴└─┘┘└┘└─┘┴ ┴ └─┘└─┘┴ └─ ┴ ┴└─┴└─┘└─┘└─┘
# ╔═╗╦ ╦╔╦╗╔═╗╔═╗╔╦╗╔═╗╦═╗╔╦╗
# ╠═╣║ ║ ║ ║ ║╚═╗ ║ ╠═╣╠╦╝ ║
# ╩ ╩╚═╝ ╩ ╚═╝╚═╝ ╩ ╩ ╩╩╚═ ╩
# Set system vars for polybar
. SetSysVars
# Terminate already running polybar,picom, sxhkd and dunst instances
processes=("picom" "polybar" "sxhkd" "dunst")
processes=("eww" "picom" "polybar" "sxhkd" "dunst")
for process in "${processes[@]}"; do
if pidof -q "$process"; then
@@ -73,8 +75,8 @@ done
# Launch picom // If you have old hardware or encounter problems
# uncomment the picom "--legacy-backends" line and comment the current one.
picom --config "$HOME"/.config/bspwm/picom.conf &
#picom --legacy-backends --config "$HOME"/.config/bspwm/picom.conf &
pidof -q picom || { picom --config "$HOME"/.config/bspwm/picom.conf & }
#pidof -q picom || { picom --legacy-backends --config "$HOME"/.config/bspwm/picom.conf & }
# Launch dunst notification daemon
dunst -config "$HOME"/.config/bspwm/dunstrc &
@@ -82,6 +84,12 @@ dunst -config "$HOME"/.config/bspwm/dunstrc &
# Set random wallpaper for actual rice
feh -z --no-fehbg --bg-fill ${rice_dir}/walls
# Launch eww daemon
pidof -q eww || { eww -c "$HOME"/.config/bspwm/eww daemon & }
# Launch stalonetray
stalonetray -c "$HOME"/.config/bspwm/stalonetrayrc & sleep 0.1 && xdo hide -N stalonetray && touch "/tmp/syshide.lock"
# Reload sxhkd daemon
sxhkd -c "$HOME"/.config/bspwm/sxhkdrc &
+53
View File
@@ -0,0 +1,53 @@
.date {
background-color: $bg;
color: $fg;
border-radius: .5rem;
}
.cal-box {
font-family: Cantarell;
font-weight: Bold;
font-size: .9rem;
background-color: $bg;
border-radius: .5rem;
padding: 0 1rem .2rem;
color: $fg;
background-color: $bg-alt;
margin: .6rem .6rem .6rem .6rem;
.cal {
background-color: inherit;
padding: .5rem .15rem .2rem;
margin-left: 10px;
& > * {
border: solid 0px transparent;
}
&.highlight {
padding: 10rem;
}
}
}
calendar:selected {
color: $magenta;
}
calendar.header {
color: $magenta;
font-weight: bold;
}
calendar.button {
color: $fg;
}
calendar.highlight {
color: $green;
font-weight: bold;
}
calendar:indeterminate {
color: $lightblack;
}
+19
View File
@@ -0,0 +1,19 @@
(defwidget cal []
(box :class "cal-box"
:orientation "v"
:space-evenly false
(calendar :class "cal"
:day {formattime(EWW_TIME, "%d")}
:month {formattime(EWW_TIME, "%m")}
:year {formattime(EWW_TIME, "%Y")}
))
)
;; Windows ;;
(defwindow date
:geometry (geometry :x "42.3%"
:y "5%"
:anchor "center top")
:wm-ignore true
(cal))
+13
View File
@@ -0,0 +1,13 @@
// Eww colors for Karla rice
$bg: #0E1113;
$bg-alt: #111517;
$fg: #afb1db;
$black: #373542;
$lightblack: #262831;
$red: #e7034a;
$blue: #5884d4;
$cyan: #7df0f0;
$magenta: #7a44e3;
$green: #61b33e;
$yellow: #ffb964;
$archicon: #0f94d2;
+17
View File
@@ -0,0 +1,17 @@
* {
all: unset;
}
tooltip {
background-color: #14171c;
color: #b8bfe5;
font-family: Inconsolata SemiCondensed Medium;
font-weight: Bold;
font-size: 1rem;
}
@import "colors.scss";
@import "calendar/calendar.scss";
@import "powermenu/powermenu.scss";
@import "profilecard/profilecard.scss";
@import "player/player.scss";
+4
View File
@@ -0,0 +1,4 @@
(include "calendar/calendar.yuck")
(include "powermenu/powermenu.yuck")
(include "profilecard/profilecard.yuck")
(include "player/player.yuck")
+111
View File
@@ -0,0 +1,111 @@
.player {
font-family: "JetBrains Mono Medium", "Material Design Icons Desktop";
background-color: $bg;
padding: 0.6rem;
min-height: 12rem;
border-radius: 0.6rem;
.player-art {
background-size: cover;
background-repeat: no-repeat;
background-position: center;
box-shadow: 0 0 0.3rem black;
border-radius: 1.2rem;
min-width: 22rem;
.player-info {
border-radius: 1rem;
background: linear-gradient(to right, rgb(#191919, 1), rgba(#262626, 0.5));
padding: 0.65rem;
.player-shuffle,
.player-loop {
font-size: 1rem;
text-shadow: 0 0 0.2rem black;
}
.spotify-icon {
font-size: 1.25rem;
color: $green;
text-shadow: 0 0 0.2rem black;
}
.mpd-icon {
font-size: 1.25rem;
color: $magenta;
text-shadow: 0 0 0.2rem black;
}
.player-title {
font-style: italic;
font-family: Cartograph CF;
font-size: 1.1rem;
font-weight: bold;
color: $fg;
text-shadow: 0 0 0.5rem rgba($color: black, $alpha: 1);
}
.player-artist {
font-family: JetBrainsMono Nerd Font;
font-weight: bolder;
font-size: 0.8rem;
color: $fg;
text-shadow: 0 0 0.5rem rgba($color: black, $alpha: 1);
}
.player-time {
font-style: italic;
font-family: Cartograph CF;
font-size: 0.8rem;
color: $fg;
}
.player-bar scale trough highlight {
all: unset;
background-image: linear-gradient(
to right,
darken($color: $green, $amount: 15%),
$green
);
border-radius: 2rem;
}
.player-bar scale trough {
all: unset;
background-color: rgba($fg, 0.3);
box-shadow: 0px 0px 2px 1px rgba(black, 0.5);
border-radius: 1rem;
min-height: 0.35rem;
margin: 0rem 0.2rem 0.2rem 0rem;
}
.player-position {
font-size: 0.9rem;
font-weight: 500;
color: $fg;
}
}
}
.player-controls {
padding: 0rem 0.7rem 0rem 1rem;
border-radius: 1rem;
.player-toggle {
font-size: 1.6rem;
color: $fg;
}
.player-previous,
.player-next {
font-size: 1.6rem;
color: $fg;
}
button {
&:hover {
color: $magenta;
}
}
}
}
+176
View File
@@ -0,0 +1,176 @@
;; Vars ;;
(defpoll music-player :interval "1s" "MediaControl --player")
(defpoll music-art :interval "1s" "MediaControl --cover")
(defpoll music-title :interval "1s" "MediaControl --title")
(defpoll music-artist :interval "1s" "MediaControl --artist")
(defpoll music-status :interval "1s" "MediaControl --status")
(defpoll music-position :interval "1s" "MediaControl --position")
(defpoll music-positions :interval "1s" "MediaControl --positions")
(defpoll music-length :interval "1s" "MediaControl --length")
(defpoll music-lengths :interval "1s" "MediaControl --lengths")
(defpoll shuffle :interval "1s" "MediaControl --shuffle")
(defpoll loop :interval "1s" "MediaControl --loop")
;; Widgets ;;
(defwidget shuffle [color action status]
(eventbox
:cursor "pointer"
(button
:onclick action
:style "color: ${color}"
:tooltip status
"󰒟"
)
)
)
(defwidget loop [icon color status action]
(eventbox
:cursor "pointer"
(button
:onclick action
:style "color: ${color}"
:tooltip status
icon
)
)
)
(defwidget player []
(box
:class "player"
:space-evenly false
(box
:class "player-art"
:style "background-image: url('${music-art}')"
(box
:class "player-info"
:space-evenly false
:orientation "v"
:spacing 10
(box
:class "top-icons"
(box
:space-evenly false
:spacing 10
(shuffle
:action {music-player != "spotify" ? "mpc random" : "playerctl -p spotify shuffle toggle"}
:color {shuffle == "On" ? "#81ae5f" : "#b8bfe5"}
:status shuffle
)
(loop
:action {loop == "None" ? "playerctl -p spotify loop playlist" :
loop == "Off" ? "mpc repeat on" :
loop == "On" ? "mpc repeat off" :
loop == "Playlist" ? "playerctl -p spotify loop track" : "playerctl -p spotify loop none"}
:icon {loop == "Track" ? "󰑘" :
loop == "Playlist" || loop == "On" ? "󰑖" : "󰑗"}
:color {loop == "Playlist" || loop == "Track" || loop == "On" ? "#81ae5f" : "#b8bfe5"}
:status loop
)
)
(box
(button
:class {music-player != "spotify" ? "mpd-icon" : "spotify-icon"}
:halign "end"
{music-player != "spotify" ? "󰎆" : "󰓇"}
)
)
)
(label
:class "player-title"
:halign "start"
:text music-title
:limit-width 30
:wrap true
:xalign 0
)
(label
:class "player-artist"
:halign "start"
:text music-artist
:limit-width 35
)
(box
:space-evenly false
:orientation "v"
:valign "end"
:spacing 6
:vexpand true
(box
:class "player-bar"
(eventbox
:cursor "pointer"
(scale
:onchange {music-player != "spotify" ? "mpc seek {}" : "playerctl -p ${music-player} position {}"}
:min 0
:max music-lengths
:value music-positions
)
)
)
(box
:class "player-position"
:space-evenly false
:valign "end"
:spacing 3
(label
:class "player-time"
:text music-position
)
(label :class "player-time" :text "/")
(label
:class "player-time"
:text music-length
)
)
)
)
)
(box
:class "player-controls"
:orientation "v"
:valign "center"
:hexpand true
:space-evenly false
:spacing 20
(eventbox
:cursor "pointer"
(button
:class "player-previous"
:onclick "MediaControl --previous"
"󰒮"
)
)
(eventbox
:cursor "pointer"
(button
:class "player-toggle"
:onclick "MediaControl --toggle"
{music-status == "Playing" ? "󰏤" : music-status == "Paused" ? "󰐊" : "󰓛"}
)
)
(eventbox
:cursor "pointer"
(button
:class "player-next"
:onclick "MediaControl --next"
"󰒭"
)
)
)
)
)
;; Windows ;;
(defwindow music
:geometry (geometry :x "15%"
:y "5%"
:anchor "center top")
:wm-ignore false
(player))
+36
View File
@@ -0,0 +1,36 @@
window>.powermenu {
margin: .5rem;
background-color: $bg;
}
.powermenu {
font-family: "Font Awesome 6 Free Solid";
font-size: 1.5rem;
padding: .3rem;
border-radius: .5rem;
&.shutdown {
color: $red;
}
&.reboot {
color: $green;
}
&.lock {
color: $yellow;
}
&.exit {
color: $magenta;
}
button {
background-color: $bg-alt;
padding: 1.2rem;
&:hover {
background-color: lighten($color: $bg-alt, $amount: 4%);
}
}
}
+42
View File
@@ -0,0 +1,42 @@
(defwidget powermenu []
(box :class "powermenu"
:orientation "v"
:space-evenly "false"
(lock-power-restart)))
(defwidget lock-power-restart []
(box :class "powermenu"
:orientation "v"
:spacing 10
(eventbox :cursor "pointer"
(button :class "powermenu lock"
:onclick "physlock -d"
:tooltip "Lock session"
""))
(eventbox :cursor "pointer"
(button :class "powermenu exit"
:onclick "bspc quit"
:tooltip "Logout bspwm"
""))
(eventbox :cursor "pointer"
(button :class "powermenu reboot"
:onclick "systemctl reboot"
:tooltip "Restart"
""))
(eventbox :cursor "pointer"
(button :class "powermenu shutdown"
:onclick "systemctl poweroff"
:tooltip "Shutdown"
""))
)
)
;; Power Menu ;;
(defwindow powermenu
:geometry (geometry :x "0%"
:y "0%"
:anchor "center right")
:wm-ignore false
(powermenu))
@@ -0,0 +1,243 @@
.launchermenu {
background-color: $bg;
border-radius: 0.5rem;
margin: .8rem .8rem;
min-width: 18rem;
}
.timebox {
margin: 0 2.5rem;
.time-container {
.content {
font-family: JetBrainsMono Nerd Font;
font-weight: Bolder;
font-size: 3.6rem;
color: $fg;
}
.divider {
margin: .2rem 15px;
padding: 0px 1px;
background: linear-gradient($red, $magenta, $blue, $cyan);
}
}
.date-container {
font-family: Inconsolata SemiCondensed Medium;
font-weight: Bold;
font-size: 1rem;
color: $fg;
margin: 3px 0;
}
}
.usercard {
background-color: $bg-alt;
border-radius: 0.5rem;
}
.face {
background-repeat: no-repeat;
background-size: cover;
background-position: center;
min-height: 65px;
min-width: 65px;
//border: .2rem solid $bg;
border-radius: 100%;
box-shadow: 0 0 7px 1px rgba($fg, 0.3);
margin: 10px -8px 10px 10px;
}
.user-host {
color: $fg;
font-family: Cartograph CF;
font-weight: Normal;
font-size: 1rem;
}
.host {
color: $fg;
font-family: Cartograph CF;
font-size: .8rem;
}
.uptime {
color: $fg;
font-family: Cartograph CF;
font-size: .7rem;
margin-top: .5rem;
}
.btn-info {
font-family: Material Design Icons Desktop;
font-size: 1.2rem;
color: $fg;
padding: 0 .6rem;
}
.btn-info:hover {
text-shadow: 0 0 2px $fg;
}
.usearch {
background-color: $bg-alt;
padding: .8rem;
border-radius: 0.5rem;
color: $fg;
}
.launcher-pfp-label {
font-family: Inconsolata SemiCondensed Medium;
font-weight: Bold;
font-size: 1rem;
}
.pacman {
background-color: $bg-alt;
padding: .8rem;
border-radius: 0.5rem;
color: $fg;
.pacman-icon {
font-family: Material Design Icons Desktop;
font-size: 1.2rem;
color: $yellow;
}
.pacman-info {
font-family: Inconsolata SemiCondensed Medium;
font-weight: Bold;
font-size: 1rem;
}
.pacman-updates {
font-family: Inconsolata Condensed Medium;
font-weight: Bold;
font-size: 1rem;
}
}
.fetch {
background-color: $bg-alt;
padding: .8rem 2rem .8rem 1rem;
border-radius: 0.5rem;
color: $fg;
.arch-icon {
font-family: Material Design Icons Desktop;
font-size: 3rem;
color: $archicon;
}
}
.os-icon {
font-family: Material Design Icons Desktop;
font-size: .8rem;
color: $archicon;
}
.pkgs-icon {
font-family: Material Design Icons Desktop;
font-size: .8rem;
color: $yellow;
}
.wm-icon {
font-family: Material Design Icons Desktop;
font-size: .8rem;
color: $magenta;
}
.os-text,
.pkgs-text,
.wm-text {
font-family: Inconsolata SemiCondensed Medium;
font-weight: Bold;
font-size: 1rem;
}
.weatherbox {
background-color: $bg-alt;
border-radius: 0.5rem;
padding: .8rem;
}
.weathericon {
padding: 0 .8rem;
border-radius: 0.5rem;
margin-left: .6rem;
background-color: $bg-alt;
font-size: 1.5rem;
font-family: "Font Awesome 6 Free Solid";
}
.weatherdesc {
font-size: 1.75rem;
font-family: "Inconsolata SemiCondensed Medium";
font-weight: Bold;
}
.weathertemp {
font-family: "Iosevka Nerd Font";
font-size: 1.5rem;
font-weight: bold;
color: $fg;
}
.weathercity {
font-size: .9rem;
margin-top: .2rem;
color: $fg;
font-family: Inconsolata SemiCondensed Medium;
font-weight: Bold;
}
.launcher-apps {
background-color: $bg-alt;
padding: .8rem;
border-radius: 0.5rem;
}
.launcher-btn {
color: $black;
font-family: Material Design Icons Desktop;
font-size: 1.5rem;
}
.launcher-btn:hover {
color: $fg;
font-family: Material Design Icons Desktop;
font-size: 1.5rem;
text-shadow: 0 0 0.2rem $fg;
}
.progress {
background-color: $bg-alt;
padding: .7rem .7rem;
border-radius: 1rem;
circular-progress {
background-color: $black;
&.ram {
color: $blue;
}
&.cpu {
color: $green;
}
&.temp {
color: $red;
}
&.disk {
color: $magenta;
}
}
.icon {
font-family: "Font Awesome 6 Free Solid";
font-size: 1rem;
padding: 1.1rem;
}
}
@@ -0,0 +1,290 @@
;; Vars ;;
(defpoll completeday :interval "1s" "date '+%A, %d %B'")
(defvar IMAGEP "../assets/profile.png")
(defpoll username :interval "24h" "whoami")
(defpoll hostname :interval "24h" "cat /etc/hostname")
(defpoll uptime :interval "30s" "uptime -p | sed -E -e 's/hour(s)?/hrs/g' -e 's/minute(s)?/min/g'")
(defpoll updates :interval "2m" "Updates --get-updates")
(defpoll packages :interval "1h" "pacman -Q | wc -l")
(defpoll weathericon :interval "15m" "Weather icon")
(defpoll weathercity :interval "15m" "Weather city")
(defpoll weathertemp :interval "15m" "Weather current_temp")
(defpoll weatherdesc :interval "15m" "Weather weather_desc")
(defpoll weatherhex :interval "15m" "Weather hex")
(defpoll temp :interval "5s" "../scripts/temp.sh")
;; Widegets ;;
(defwidget launchermenu []
(box :class "launchermenu"
:orientation "v"
:space-evenly "false"
:spacing 7
(time)
(pfp)
(iuse)
(infoarch)
(weather)
;;(sysinfo)
(system)
(apps)))
(defwidget divider []
(box :class "divider"
:orientation "v"
:space-evenly true)
)
(defwidget time []
(box :class "timebox"
:orientation "v"
:space-evenly false
(box :class "time-container"
:orientation "h"
:space-evenly false
:halign "center"
:valign "center"
(label :text "${formattime(EWW_TIME, "%H")}" :class "content")
(divider)
(label :text "${formattime(EWW_TIME, "%M")}" :class "content")
)
(box :class "date-container"
:orientation "h"
:space-evenly true
:halign "center"
(label :text "${completeday}")
)
)
)
(defwidget pfp []
(box :orientation "h"
:space-evenly "false"
:class "usercard"
(box :space-evenly "false"
:hexpand true
:orientation "h"
:spacing "15"
(box :style "background-image: url('${IMAGEP}');"
:class "face"
:halign "center")
(box :orientation "v"
:space-evenly "false"
:hexpand true
:valign "center"
(box :class "user-host"
:halign "start"
(label :text username))
(box :class "host"
:halign "start"
(label :text "@${hostname}"))
(box :class "uptime"
:halign "start"
(label :text uptime)))
(box :orientation "v"
:space-evenly "false"
:spacing 10
:valign "center"
:halign "start"
:hexpand false
;;:style "border: 1px solid #ffffff;"
(eventbox :cursor "pointer"
(button :class "btn-info" :tooltip "Lock Computer" :onclick "physlock -d" "󱅞"))
(eventbox :cursor "pointer"
(button :class "btn-info" :tooltip "Logout BSPWM" :onclick "bspc quit" "󰍃")))
)
)
)
(defwidget iuse []
(box :orientation "v"
:space-evenly "false"
:class "usearch"
:hexpand true
(label :class "launcher-pfp-label"
:xalign 0.5
:limit-width 30
:text "I use Arch btw..")))
(defwidget infoarch []
(box :orientation "h"
:space-evenly "false"
:spacing 7
(box :orientation "v"
:class "pacman"
:hexpand true
(label :halign "start"
:class "pacman-icon"
:text "󰮯")
(box :space-evenly "false"
(eventbox :cursor "pointer"
(button :class "pacman-updates"
:halign "start"
:tooltip "Click to update"
:onclick "OpenApps --update" "${updates} Updates"))))
(box :orientation "h"
:space-evenly "false"
:class "fetch"
:spacing 8
(label :class "arch-icon"
:halign "start"
:text "󰣇")
(box
:space-evenly "false"
(box :orientation "v"
:spacing 3
:halign "end"
:style "margin-left: 10px;"
(label :class "os-icon"
:halign "start"
:text "󰣇")
(label :class "pkgs-icon"
:halign "start"
:text "󰮯")
(label :class "wm-icon"
:halign "start"
:text "󱪳")))
(box
:space-evenly "false"
(box :orientation "v"
:spacing 3
:halign "start"
(label :class "os-text"
:halign "start"
:text "Arch")
(label :class "pkgs-text"
:halign "start"
:text packages)
(label :class "wm-text"
:halign "start"
:text "Bspwm"))))))
(defwidget weather[]
(box :orientation "h" :class "weatherboxfull" :space-evenly false
(box :orientation "v" :class "weatherbox" :hexpand true :space-evenly false
(box :orientation "h" :class "weathertop" :space-evenly false
(box :class "weatherdesc" :style "color: ${weatherhex};" :halign "start" :hexpand true weatherdesc)
(box :class "weathertemp" :halign "end" "${weathertemp}°C")
)
(box :orientation "v" :class "weatherbot" :space-evenly false
(box :class "weathercity" :halign "start" :hexpand true
(label :limit-width 22 :text weathercity))
)
)
(box :class "weathericon" :style "color: ${weatherhex};" :halign "center" weathericon)
)
)
(defwidget system_progress [data icon css tip]
(box
:class "progress"
(circular-progress
:class css
:value data
:thickness 6
:tooltip tip
(overlay
:valign "center"
(label
:class "icon"
:text icon
)
)
)
)
)
(defwidget cpu []
(system_progress
:css "cpu"
:tip "CPU ${round(EWW_CPU.avg,0)}%"
:data {round(EWW_CPU.avg, 0)}
:icon ""
)
)
(defwidget ram []
(system_progress
:css "ram"
:tip "RAM ${round(EWW_RAM.used_mem / 1048576, 2)}MB"
:data {round(EWW_RAM.used_mem_perc, 0)}
:icon ""
)
)
(defwidget disk []
(system_progress
:css "disk"
:tip "SSD ${round(EWW_DISK["/"].used_perc, 2)}%"
:data {round(EWW_DISK["/"].used_perc, 0)}
:icon ""
)
)
(defwidget temp []
(system_progress
:css "temp"
:tip "Cpu temperature ${temp}°C"
:data temp
:icon ""
)
)
(defwidget system []
(box
:class "system"
:spacing 8
(cpu)
(ram)
(disk)
(temp)
)
)
(defwidget apps []
(box :orientation "v"
:space-evenly "false"
:class "launcher-apps"
(box :orientation "h"
:space-evenly "false"
:hexpand true
:halign "center"
:spacing 12
(eventbox :cursor "pointer"
(button :class "launcher-btn"
:onclick "OpenApps --browser"
:tooltip "Browser"
"󰇧"))
(eventbox :cursor "pointer"
(button :class "launcher-btn"
:onclick "OpenApps --fetch"
:tooltip "System Fetch"
"󰚌"))
(eventbox :cursor "pointer"
(button :class "launcher-btn"
:onclick "cd && OpenApps --filemanager"
:tooltip "File Manager"
"󰝰"))
(eventbox :cursor "pointer"
(button :class "launcher-btn"
:onclick "cd && OpenApps --terminal"
:tooltip "Terminal"
"󰆍"))
(eventbox :cursor "pointer"
(button :class "launcher-btn"
:onclick "OpenApps --editor"
:tooltip "Editor"
"󰷈")))))
;; Windows ;;
(defwindow launchermenu
:geometry (geometry :x "500px" :y "-219px" :anchor "left center")
:wm-ignore false
(launchermenu))
+31
View File
@@ -0,0 +1,31 @@
position_mode = pointer
stay_alive = 0
tint2_look = 0
terminal_exec = alacritty
terminal_args = -e
menu_width = 160
menu_padding_top = 5
menu_padding_right = 5
menu_padding_bottom = 5
menu_padding_left = 5
menu_radius = 8
menu_border = 0
menu_halign = left
sub_hover_action = 1
item_margin_y = 5
item_height = 30
item_padding_x = 8
item_radius = 6
item_border = 0
sep_height = 2
font = Clarity City Bold 12px
icon_size = 16
icon_theme = Papirus-Dark
arrow_string = 󰄾
color_menu_border = #ffffff 0
color_menu_bg = #0E1113
color_norm_bg = #ffffff 0
color_norm_fg = #afb1db
color_sel_bg = #111517
color_sel_fg = #afb1db
color_sep_fg = #373542
+85 -40
View File
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
# ██╗ ██╗ █████╗ ██████╗ ██╗ █████╗ ██████╗ ██╗ ██████╗███████╗
# ██║ ██╔╝██╔══██╗██╔══██╗██║ ██╔══██╗ ██╔══██╗██║██╔════╝██╔════╝
# █████╔╝ ███████║██████╔╝██║ ███████║ ██████╔╝██║██║ █████╗
# ██╔═██╗ ██╔══██║██╔══██╗██║ ██╔══██║ ██╔══██╗██║██║ ██╔══╝
# █████╔╝ ███████║██████╔╝██║ ███████║ ██████╔╝██║██║ █████╗
# ██╔═██╗ ██╔══██║██╔══██╗██║ ██╔══██║ ██╔══██╗██║██║ ██╔══╝
# ██║ ██╗██║ ██║██║ ██║███████╗██║ ██║ ██║ ██║██║╚██████╗███████╗
# ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═════╝╚══════╝
# Author : z0mbi3
@@ -12,71 +12,113 @@
# Set bspwm configuration for Karla
set_bspwm_config() {
bspc config border_width 3
bspc config top_padding 48
bspc config bottom_padding 2
bspc config normal_border_color "#21222c"
bspc config active_border_color "#353c52"
bspc config focused_border_color "#353c52"
bspc config presel_feedback_color "#ff79c6"
bspc config left_padding 2
bspc config right_padding 2
bspc config window_gap 6
bspc config border_width 3
bspc config top_padding 48
bspc config bottom_padding 2
bspc config left_padding 2
bspc config right_padding 2
bspc config normal_border_color "#21222c"
bspc config active_border_color "#353c52"
bspc config focused_border_color "#353c52"
bspc config presel_feedback_color "#8656e3"
}
# Reload terminal colors
set_term_config() {
sed -i "$HOME"/.config/alacritty/fonts.yml \
sed -i "$HOME"/.config/alacritty/fonts.yml \
-e "s/family: .*/family: JetBrainsMono Nerd Font/g" \
-e "s/size: .*/size: 6/g"
-e "s/size: .*/size: 10/g"
sed -i "$HOME"/.config/alacritty/rice-colors.yml \
sed -i "$HOME"/.config/alacritty/rice-colors.yml \
-e "s/colors: .*/colors: *karla_z0mbi3_night/"
}
# Set compositor configuration
set_picom_config() {
sed -i "$HOME"/.config/bspwm/picom.conf \
-e "s/normal = .*/normal = { fade = false; shadow = false; }/g" \
-e "s/shadow-color = .*/shadow-color = \"#000000\"/g" \
-e "s/corner-radius = .*/corner-radius = 0/g" \
-e "s/\".*:class_g = 'Alacritty'\"/\"95:class_g = 'Alacritty'\"/g" \
-e "s/\".*:class_g = 'FloaTerm'\"/\"95:class_g = 'FloaTerm'\"/g"
sed -i "$HOME"/.config/bspwm/picom.conf \
-e "s/normal = .*/normal = { fade = false; shadow = false; }/g" \
-e "s/shadow-color = .*/shadow-color = \"#000000\"/g" \
-e "s/corner-radius = .*/corner-radius = 0/g" \
-e "s/\".*:class_g = 'Alacritty'\"/\"95:class_g = 'Alacritty'\"/g" \
-e "s/\".*:class_g = 'FloaTerm'\"/\"95:class_g = 'FloaTerm'\"/g"
}
# Set stalonetray config
set_stalonetray_config() {
sed -i "$HOME"/.config/bspwm/stalonetrayrc \
-e "s/background .*/background \"#0E1113\"/" \
-e "s/vertical .*/vertical true/" \
-e "s/geometry .*/geometry 1x1-50+46/" \
-e "s/grow_gravity .*/grow_gravity NE/" \
-e "s/icon_gravity .*/icon_gravity NE/"
}
# Set dunst notification daemon config
set_dunst_config() {
sed -i "$HOME"/.config/bspwm/dunstrc \
sed -i "$HOME"/.config/bspwm/dunstrc \
-e "s/transparency = .*/transparency = 8/g" \
-e "s/frame_color = .*/frame_color = \"#0E1113\"/g" \
-e "s/separator_color = .*/separator_color = \"#353c52\"/g" \
-e "s/font = .*/font = JetBrainsMono Nerd Font Medium 9/g" \
-e "s/foreground='.*'/foreground='#7a44e3'/g"
sed -i '/urgency_low/Q' "$HOME"/.config/bspwm/dunstrc
cat >> "$HOME"/.config/bspwm/dunstrc <<- _EOF_
[urgency_low]
timeout = 3
background = "#0E1113"
foreground = "#afb1db"
sed -i '/urgency_low/Q' "$HOME"/.config/bspwm/dunstrc
cat >> "$HOME"/.config/bspwm/dunstrc <<- _EOF_
[urgency_low]
timeout = 3
background = "#0E1113"
foreground = "#afb1db"
[urgency_normal]
timeout = 6
background = "#0E1113"
foreground = "#afb1db"
[urgency_normal]
timeout = 6
background = "#0E1113"
foreground = "#afb1db"
[urgency_critical]
timeout = 0
background = "#0E1113"
foreground = "#afb1db"
[urgency_critical]
timeout = 0
background = "#0E1113"
foreground = "#afb1db"
_EOF_
}
# Set eww colors
set_eww_colors() {
cat > "$HOME"/.config/bspwm/eww/colors.scss << EOF
// Eww colors for Karla rice
\$bg: #0E1113;
\$bg-alt: #111517;
\$fg: #afb1db;
\$black: #373542;
\$lightblack: #262831;
\$red: #e7034a;
\$blue: #5884d4;
\$cyan: #7df0f0;
\$magenta: #7a44e3;
\$green: #61b33e;
\$yellow: #ffb964;
\$archicon: #0f94d2;
EOF
}
# Set jgmenu colors for Karla
set_jgmenu_colors() {
sed -i "$HOME"/.config/bspwm/jgmenurc \
-e 's/color_menu_bg = .*/color_menu_bg = #0E1113/' \
-e 's/color_norm_fg = .*/color_norm_fg = #afb1db/' \
-e 's/color_sel_bg = .*/color_sel_bg = #111517/' \
-e 's/color_sel_fg = .*/color_sel_fg = #afb1db/' \
-e 's/color_sep_fg = .*/color_sep_fg = #373542/'
}
# Launch the bar
launch_bars() {
polybar -q karla-bar -c ${rice_dir}/config.ini &
polybar -q karla-bar2 -c ${rice_dir}/config.ini &
polybar -q karla-bar3 -c ${rice_dir}/config.ini &
for mon in $(polybar --list-monitors | cut -d":" -f1); do
(MONITOR=$mon polybar -q karla-bar -c ${rice_dir}/config.ini)&
(MONITOR=$mon polybar -q karla-bar2 -c ${rice_dir}/config.ini)&
(MONITOR=$mon polybar -q karla-bar3 -c ${rice_dir}/config.ini)&
done
}
@@ -86,5 +128,8 @@ launch_bars() {
set_bspwm_config
set_term_config
set_picom_config
set_dunst_config
set_stalonetray_config
launch_bars
set_dunst_config
set_eww_colors
set_jgmenu_colors
+21 -24
View File
@@ -15,11 +15,9 @@ include-file = ~/.config/bspwm/scripts/colors.ini
include-file = modules.ini
[bar/karla-bar]
monitor = ${env:MONITOR:}
monitor-strict = false
override-redirect = false
bottom = false
fixed-center = true
@@ -54,10 +52,9 @@ font-2 = "Font Awesome 6 Free Solid:size=10;2"
;dpi = 96
modules-left = launcher
modules-center = cpu memory filesystem
modules-center = cpu sep memory sep filesystem sep usercard
modules-right = weather
separator = " | "
dim-value = 1.0
;;locale = es_MX.UTF-8
@@ -68,9 +65,8 @@ cursor-click = pointer
cursor-scroll =
[bar/karla-bar2]
monitor = ${env:MONITOR:}
monitor-strict = false
override-redirect = false
bottom = false
@@ -93,7 +89,7 @@ line-color = ${karla.blue}
border-size = 2
border-color = ${karla.bc}
padding = 3
padding = 2
module-margin-left = 0
module-margin-right = 0
@@ -104,24 +100,26 @@ font-0 = "JetBrainsMono:style=Bold:size=9;2"
font-1 = "Font Awesome 6 Free Solid:size=10;3"
;dpi = 96
modules-left = mpd_control
modules-center = brightness battery network pulseaudio updates
modules-right = date
;; Available modules
;; brightness
modules-left = mpd_control sep mplayer
modules-center = battery sep network sep pulseaudio sep updates
modules-right = date systray power
separator = " | "
separator =
dim-value = 1.0
;;locale = es_MX.UTF-8
tray-position = right
tray-detached = false
tray-maxsize = 16
tray-background = ${karla.bg}
tray-offset-x = 0
tray-offset-y = 0
tray-padding = 0
tray-scale = 1.0
;;tray-position = right
;;tray-detached = false
;;tray-maxsize = 16
;;tray-background = ${karla.bg}
;;tray-offset-x = 0
;;tray-offset-y = 0
;;tray-padding = 0
;;tray-scale = 1.0
wm-restack = bspwm
enable-ipc = true
@@ -130,9 +128,8 @@ cursor-click = pointer
cursor-scroll =
[bar/karla-bar3]
monitor = ${env:MONITOR:}
monitor-strict = false
override-redirect = false
bottom = false
@@ -161,7 +158,7 @@ module-margin-left = 0
module-margin-right = 0
; Text
font-0 = "JetBrainsMono:style=Bold:size=9;2"
font-0 = "Inconsolata Semi Condensed Extra Bold:size=10;1"
; Icons
font-1 = "Material Design Icons Desktop:size=13;3"
;dpi = 96
@@ -170,7 +167,7 @@ modules-left =
modules-center = bspwm
modules-right =
separator = ""
separator =
dim-value = 1.0
;;locale = es_MX.UTF-8
+63 -26
View File
@@ -15,9 +15,9 @@ time = %I:%M %P
date-alt = " %a, %d %b %y"
format = <label>
format-prefix = ""
format-prefix = " "
label = %date% %time%
label = "%{A1:OpenApps --calendar:}%time%%{A}"
######################################################
@@ -48,15 +48,16 @@ accumulate-stats = true
unknown-as-up = true
format-connected = <label-connected>
format-connected-prefix = " "
format-connected-prefix = ""
format-connected-prefix-padding = 3pt
speed-unit = ""
label-connected = "%netspeed%"
format-disconnected = <label-disconnected>
format-disconnected-prefix = " "
format-disconnected-prefix = ""
fptmat-disconnected-prefix-padding = 3pt
label-disconnected = Offline
label-disconnected = "Offline"
label-disconnected-foreground = ${karla.red}
######################################################
@@ -74,29 +75,32 @@ ramp-0 = 
ramp-1 =
ramp-2 =
ramp-font = 2
ramp-padding = 3pt
ramp-foreground = ${karla.yellow}
######################################################
[module/battery]
type = internal/battery
full-at = 99
full-at = 100
battery = ${system.sys_battery}
adapter = ${system.sys_adapter}
poll-interval = 2
time-format = %H:%M
format-charging = <animation-charging><label-charging>
format-charging-prefix = " "
format-charging-prefix = ""
format-charging-prefix-font = 2
format-charging-prefix-padding = 3pt
format-charging-prefix-foreground = ${karla.red}
label-charging = " %percentage%%"
label-charging = "%percentage%%"
format-discharging = <ramp-capacity><label-discharging>
label-discharging = " %percentage%%"
label-discharging = "%percentage%%"
format-full = <label-full>
format-full-prefix = " "
format-full-prefix = ""
format-full-prefix-padding = 3pt
format-full-prefix-font = 2
format-full-prefix-foreground = ${karla.green}
label-full = "%percentage%%"
@@ -106,6 +110,7 @@ ramp-capacity-1 = 
ramp-capacity-2 =
ramp-capacity-3 =
ramp-capacity-4 =
ramp-capacity-padding = 3pt
ramp-capacity-foreground = ${karla.yellow}
ramp-capacity-font = 2
@@ -114,6 +119,7 @@ animation-charging-1 = 
animation-charging-2 =
animation-charging-3 =
animation-charging-4 =
animation-charging-padding = 3pt
animation-charging-foreground = ${karla.green}
animation-charging-font = 2
animation-charging-framerate = 700
@@ -138,12 +144,13 @@ interval = 5
format-volume = <label-volume>
format-volume-prefix = ""
format-volume-prefix-padding = 3pt
label-volume = " %percentage%"
label-volume-foreground = ${karla.fg}
format-muted = <label-muted>
format-muted-prefix = " "
format-muted-prefix-padding = 3pt
label-muted = "Muted"
label-muted-foreground = ${karla.red}
@@ -183,22 +190,18 @@ ws-icon-default = "♟"
format = <label-state>
label-focused = 󱓇
label-focused-padding = 0
label-focused-foreground = ${karla.fg}
label-occupied = %icon%
label-occupied-padding = 0
label-occupied-foreground= ${karla.fg}
label-urgent = %icon%
label-urgent-padding = 0
label-empty = %icon%
label-empty-foreground = ${karla.black}
label-empty-padding = 0
label-separator = "󰧟"
label-separator-padding = 1
label-separator-padding = 2
label-separator-foreground = ${karla.fg}
######################################################
@@ -210,6 +213,7 @@ interval = 1
format = <label>
format-prefix = ""
format-prefix-padding = 3pt
label = " %output%"
click-left = OpenApps --update
@@ -230,7 +234,8 @@ click-left = OpenApps --menu
[module/sep]
type = custom/text
content = " "
content = "|"
content-padding = 5pt
######################################################
@@ -241,7 +246,7 @@ interval = 0.5
format = <label>
format-prefix = " "
format-prefix-padding = 3pt
label = "%percentage%%"
######################################################
@@ -252,7 +257,7 @@ interval = 3
format = <label>
format-prefix = " "
format-prefix-padding = 3pt
label = %used%
######################################################
@@ -264,9 +269,41 @@ interval = 2
format-online = <icon-prev><toggle><icon-next>
format-offline = <label-offline>
format-offline-foreground = ${karla.grey}
label-offline = "󰝛 no Music"
icon-play = "%{T2}  "
icon-pause = "%{T2}  "
icon-stop = "%{T2}  "
icon-prev = "%{T2}"
icon-next = "%{T2}"
label-offline = "󰝛 no Music"
icon-play = "  "
icon-pause = "  "
icon-stop = "  "
icon-prev = ""
icon-next = ""
######################################################
[module/mplayer]
type = custom/text
content = ""
click-left = OpenApps --player
click-right = OpenApps --music
[module/usercard]
type = custom/text
content = ""
click-left = OpenApps --usercard
[module/power]
type = custom/text
content = ""
click-left = OpenApps --powermenu
#####################################################
[module/systray]
type=custom/ipc
hook-0=echo "  "
hook-1=echo "  "
click-left=systray
initial=2
;;format-font=2
format-foreground=${karla.fg}
+9 -8
View File
@@ -9,7 +9,7 @@
shadow = false;
shadow-radius = 18;
shadow-opacity = 0.90
shadow-opacity = 0.90;
shadow-offset-x = -23;
shadow-offset-y = -22;
@@ -20,8 +20,10 @@ shadow-exclude = [
"class_g = 'Conky'",
"class_g ?= 'Notify-osd'",
"class_g = 'Cairo-clock'",
"class_g = 'jgmenu'",
"class_g = 'slop'",
"class_g = 'scratch'",
"class_g = 'Spotify'",
"class_g = 'retroarch'",
"class_g = 'Rofi'",
"_GTK_FRAME_EXTENTS@:c",
@@ -34,16 +36,16 @@ shadow-exclude = [
fading = false;
fade-in-step = 0.1;
fade-out-step = 0.1;
fade-in-step = 0.03;
fade-out-step = 0.03;
no-fading-destroyed-argb = true
fade-delta = 20
fade-delta = 5
fade-exclude = [
"class_g = 'slop'",
#"class_g = 'Rofi'",
"class_g = 'scratch'"
]
];
#################################
# Corners #
@@ -69,7 +71,6 @@ rounded-corners-exclude = [
#################################
inactive-opacity = 1.0;
active-opacity = 1.0
inactive-opacity-override = false;
focus-exclude = [
@@ -92,7 +93,7 @@ opacity-rule = [
backend = "glx";
dithered-present = false;
vsync = true;
vsync = false;
mark-wmwin-focused = true;
mark-ovredir-focused = true;
@@ -112,6 +113,6 @@ wintypes:
{
normal = { fade = false; shadow = false; }
tooltip = { fade = false; shadow = false; focus = true; full-shadow = false; }
dock = { shadow = false; clip-shadow-above = true; }
dock = { shadow = false; clip-shadow-above = false; }
dnd = { shadow = false; }
};
+5 -14
View File
@@ -55,21 +55,12 @@ case "$class" in
eval "$consequences"
[ "$state" ] || echo "desktop=^6 follow=on"
;;
Spotify)
eval "$consequences"
[ "$state" ] || echo "state=pseudo_tiled rectangle=1125x600 desktop=^6 follow=on"
;;
"") ## spotify hack
sleep 0.5
wm_class=($(xprop -id $wid | grep "WM_CLASS" | grep -Po '"\K[^,"]+'))
class=${wm_class[-1]}
[[ ${#wm_class[@]} == "2" ]] && instance=${wm_class[0]}
[[ -n "$class" ]] && main
;;
esac
}
Spotify)
eval "$consequences"
[ "$state" ] || echo "state=pseudo_tiled desktop=^6 follow=on"
;;
esac
main
case "$instance" in
Toolkit)
eval "$consequences"
+58 -72
View File
@@ -13,12 +13,8 @@
# spotify, ncmpcpp, clementine, strawberry and others.
# uncomment your music players below.
Control="MPD"
[ -n "$(pgrep spotify)" ] && Control="spotify"
# [ -n "$(pgrep brave-bin)" ] && Control="brave-bin"
# [ -n "$(pgrep rhythmbox)" ] && Control="rhythmbox"
# [ -n "$(pgrep strawberry)" ] && Control="strawberry"
# Set the player
[ -n "$(pgrep spotify)" ] && Control="spotify" || Control="MPD"
# Here the cover image will be saved.
Cover=/tmp/cover.png
@@ -27,7 +23,6 @@ bkpCover=~/.config/bspwm/assets/fallback.webp
# mpd music directory for mpd clients.
mpddir=~/Music
case $Control in
MPD)
case $1 in
@@ -43,55 +38,51 @@ case $Control in
--stop)
mpc -q stop
;;
title)
--title)
title=$(mpc -f %title% current)
echo "${title:-Play Something}"
;;
artist)
--artist)
artist=$(mpc -f %artist% current)
echo "${artist:-No Artist}"
;;
album)
album=$(mpc -f %album% current)
echo "${album:-No Album}"
--status)
status=$(mpc status | head -2 | tail -1 | cut -c2-8 | sed 's/]//g' | sed 's/./\U&/')
echo "${status:-Stopped}"
;;
statusicon)
statusico=$(mpc status | head -2 | tail -1 | cut -c2-7 )
case "$statusico" in
playin)
icon="󰏦"
;;
paused)
icon="󰐌"
;;
*)
icon="󰙧"
;;
esac
echo "$icon"
;;
player)
--player)
echo "$Control"
;;
coverloc)
--cover)
ffmpeg -i "$mpddir"/"$(mpc current -f %file%)" "${Cover}" -y &> /dev/null || cp $bkpCover $Cover
echo "$Cover"
;;
nccover)
ffmpeg -i "$mpddir"/"$(mpc current -f %file%)" "${Cover}" -y &> /dev/null || cp $bkpCover $Cover
;;
time)
time=$(mpc status %currenttime%)
echo "${time:-0:00}"
--position)
position=$(mpc status %currenttime%)
echo "${position:-0:00}"
;;
length)
echo "100"
--positions)
positions=$(mpc status %currenttime% | awk -F: '{print ($1 * 60) + $2}')
echo "${positions:-0}"
;;
percent)
perc=$(mpc status | grep "%)" | awk '{ print $4 }' | awk -F% '{ print $1 }' | awk 'sub(/^.{1}/,"")')
echo "${perc:-0}"
--length)
length=$(mpc status %totaltime%)
echo "${length:-0:00}"
;;
--lengths)
lengths=$(mpc status %totaltime% | awk -F: '{print ($1 * 60) + $2}')
echo "${lengths:-0}"
;;
--shuffle)
shuffle=$(mpc status | sed -n '3s/.*random: \([^ ]*\).*/\1/p' | sed 's/.*/\u&/')
echo "${shuffle:-Off}"
;;
--loop)
loop=$(mpc status | sed -n '3s/.*repeat: \([^ ]*\).*/\1/p' | sed 's/.*/\u&/')
echo "${loop:-Off}"
;;
esac
;;
@@ -109,54 +100,49 @@ case $Control in
--stop)
playerctl --player=$Control stop
;;
title)
--title)
title=$(playerctl --player=$Control metadata --format {{title}})
echo "${title:-Play Something}"
;;
artist)
--artist)
artist=$(playerctl --player=$Control metadata --format {{artist}})
echo "${artist:-No Artist}"
;;
album)
album=$(playerctl --player=$Control metadata --format {{album}})
echo "${album:-No Album}"
--status)
status=$(playerctl --player=$Control status)
echo "${status:-Stopped}"
;;
statusicon)
statusico=$(playerctl --player="$Control" status)
case "$statusico" in
Playing)
icon="󰏦"
;;
Paused)
icon="󰐌"
;;
*)
icon="󰙧"
;;
esac
echo "$icon"
;;
player)
--player)
echo "$Control"
;;
coverloc)
--cover)
albumart="$(playerctl --player=$Control metadata mpris:artUrl | sed -e 's/open.spotify.com/i.scdn.co/g')"
[ $(playerctl --player=$Control metadata mpris:artUrl) ] && curl -s "$albumart" --output $Cover || cp $bkpCover $Cover
echo "$Cover"
;;
time)
time=$(playerctl --player=$Control position --format "{{ duration(position) }}")
echo "${time:-0:00}"
--position)
position=$(playerctl --player=$Control position --format "{{ duration(position) }}")
echo "${position:-0:00}"
;;
length)
length=$(playerctl --player=$Control metadata mpris:length | sed 's/.\{6\}$//')
echo "${length:-0}"
--positions)
positions=$(playerctl --player=$Control position | sed 's/..\{6\}$//')
echo "${positions:-0}"
;;
percent)
perc=$(playerctl -p $Control position | sed 's/..\{6\}$//')
echo "${perc:-0}"
--length)
length=$(playerctl --player=$Control metadata --format "{{ duration(mpris:length) }}")
echo "${length:-0:00}"
;;
--lengths)
lengths=$(playerctl --player=$Control metadata mpris:length | sed 's/.\{6\}$//')
echo "${lengths:-0}"
;;
--shuffle)
shuffle=$(playerctl --player=$Control shuffle)
echo "${shuffle:-Off}"
;;
--loop)
loop=$(playerctl --player=$Control loop)
echo "${loop:-None}"
;;
esac
esac 2>/dev/null
+25 -11
View File
@@ -1,12 +1,12 @@
#!/usr/bin/env bash
# ╔═╗╔═╗╔═╗╔═╗ ╦ ╔═╗╦ ╦╔╗╔╔═╗╦ ╦╔═╗╦═╗
# ╠═╣╠═╝╠═╝╚═╗ ║ ╠═╣║ ║║║║║ ╠═╣║╣ ╠╦╝
# ╩ ╩╩ ╩ ╚═╝ ╩═╝╩ ╩╚═╝╝╚╝╚═╝╩ ╩╚═╝╩╚═
# Script to control apps launcher
# From here you can control your favorite applications for all themes.
# █████╗ ██████╗ ██████╗ ███████╗ ██╗ █████╗ ██╗ ██╗███╗ ██╗ ██████╗██╗ ██╗███████╗██████╗
# ██╔══██╗██╔══██╗██╔══██╗██╔════╝ ██║ ██╔══██╗██║ ██║████╗ ██║██╔════╝██║ ██║██╔════╝██╔══██╗
# ███████║██████╔╝██████╔╝███████╗ ██║ ███████║██║ ██║██╔██╗ ██║██║ ███████║█████╗ ██████╔╝
# ██╔══██║██╔═══╝ ██╔═══╝ ╚════██║ ██║ ██╔══██║██║ ██║██║╚██╗██║██║ ██╔══██║██╔══╝ ██╔══██╗
# ██║ ██║██║ ██║ ███████║ ███████╗██║ ██║╚██████╔╝██║ ╚████║╚██████╗██║ ██║███████╗██║ ██║
# ╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝ ╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝
WIDGET_DIR="$HOME/.config/bspwm/eww"
case "$1" in
--menu)
rofi -show drun \
@@ -72,7 +72,21 @@ case "$1" in
--soundcontrol)
pavucontrol;;
*)
echo "Option not Valid ";;
esac
# Eww Widgets
--powermenu)
eww -c "$WIDGET_DIR" open --toggle powermenu
;;
--usercard)
eww -c "$WIDGET_DIR" open --toggle launchermenu
;;
--player)
eww -c "$WIDGET_DIR" open --toggle music
;;
--calendar)
eww -c "$WIDGET_DIR" open --toggle date
;;
*)
echo "Not Valid Option"
;;
esac
+9 -10
View File
@@ -2,23 +2,22 @@
SFILE="$HOME/.config/bspwm/scripts/.sys"
function get_values() {
DEFNETWORK=$(ip route | grep '^default' | awk '{print $5}' | head -n1)
CARD=$(ls -1 /sys/class/backlight/)
power_supply_files=$(ls /sys/class/power_supply/)
for file in $power_supply_files
do
if [ -e "/sys/class/power_supply/$file/capacity" ]; then
battery_file=$file
fi
for file in $power_supply_files
do
if [ -e "/sys/class/power_supply/$file/capacity" ]; then
battery_file=$file
fi
if [ -e "/sys/class/power_supply/$file/online" ]; then
adapter_file=$file
fi
done
if [ -e "/sys/class/power_supply/$file/online" ]; then
adapter_file=$file
fi
done
BATTERY="$battery_file"
ADAPTER="$adapter_file"
+36 -33
View File
@@ -1,10 +1,20 @@
#!/usr/bin/env bash
## Copyright (C) 2020-2022 Aditya Shakya <adi1090x@gmail.com>
# ██╗ ██╗ ██████╗ ██╗ ██╗ ██╗███╗ ███╗███████╗
# ██║ ██║██╔═══██╗██║ ██║ ██║████╗ ████║██╔════╝
# ██║ ██║██║ ██║██║ ██║ ██║██╔████╔██║█████╗
# ╚██╗ ██╔╝██║ ██║██║ ██║ ██║██║╚██╔╝██║██╔══╝
# ╚████╔╝ ╚██████╔╝███████╗╚██████╔╝██║ ╚═╝ ██║███████╗
# ╚═══╝ ╚═════╝ ╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝
#
# gh0stzk
# https://github.com/gh0stzk/dotfiles
# This script controls the volume of your system, using pamixer.
# 23.09.2023 09:30:24
#
# Icons
iDIR="$HOME/.config/bspwm/assets"
notify_cmd='dunstify -u low -h string:x-dunst-stack-tag:obvolume'
vol_dir="$HOME/.config/bspwm/assets"
notify_cmd='dunstify -u low -h string:x-dunst-stack-tag:cvolum'
# Get Volume
get_volume() {
@@ -14,12 +24,10 @@ get_volume() {
# Get icons
get_icon() {
current="$(get_volume)"
if [[ "$current" -eq "0" ]]; then
icon="$iDIR/mute.png"
elif [[ "$current" == "muted" ]]; then
icon="$iDIR/mute.png"
elif [[ ("$current" -ge "0") && ("$current" -le "150") ]]; then
icon="$iDIR/vol.png"
if [[ "$current" -eq "0" || "$current" == "muted" ]]; then
icon="$vol_dir/mute.png"
else
icon="$vol_dir/vol.png"
fi
}
@@ -28,40 +36,35 @@ notify_user() {
${notify_cmd} -i "$icon" "Volume : $(get_volume)%"
}
# Increase Volume
inc_volume() {
# Adjust Volume
adjust_volume() {
[[ $(pamixer --get-mute) == true ]] && pamixer -u
pamixer --allow-boost --set-limit 150 -i 5 && get_icon && notify_user
}
# Decrease Volume
dec_volume() {
[[ $(pamixer --get-mute) == true ]] && pamixer -u
pamixer --allow-boost --set-limit 150 -d 5 && get_icon && notify_user
pamixer --allow-boost --set-limit 150 "$1" "$2" && get_icon && notify_user
}
# Toggle Mute
toggle_mute() {
if [[ $(pamixer --get-mute) == false ]]; then
pamixer --toggle-mute && ${notify_cmd} -i "$iDIR/mute.png" "Mute"
pamixer --toggle-mute
get_icon
message="Mute"
else
pamixer --toggle-mute && get_icon && ${notify_cmd} -i "$icon" "Unmute"
pamixer --toggle-mute
get_icon
message="Unmute"
fi
${notify_cmd} -i "$icon" "$message"
}
# Execute accordingly
if [[ -x $(which pamixer) ]]; then
if [[ "$1" == "--get" ]]; then
get_volume
elif [[ "$1" == "--inc" ]]; then
inc_volume
elif [[ "$1" == "--dec" ]]; then
dec_volume
elif [[ "$1" == "--toggle" ]]; then
toggle_mute
else
echo "$(get_volume)%"
fi
if command -v pamixer &>/dev/null; then
case "$1" in
--get) get_volume ;;
--inc) adjust_volume -i 5 ;;
--dec) adjust_volume -d 5 ;;
--toggle) toggle_mute ;;
*) echo "$(get_volume)%" ;;
esac
else
${notify_cmd} "'pamixer' is not installed."
fi
+1 -4
View File
@@ -18,7 +18,6 @@ WEATHER_DESC=$(echo "$WEATHER" | jq -r ".weather[0].main")
WEATHER_TEMP=$(echo "$WEATHER" | jq ".main.temp" | cut -d "." -f 1)
WEATHER_ICON_CODE=$(echo "$WEATHER" | jq -r ".weather[].icon" | head -1)
WEATHER_FEELS_LIKE=$(echo "$WEATHER" | jq ".main.feels_like" | cut -d "." -f 1)
WEATHER_HUMIDITY=$(echo "$WEATHER" | jq ".main.humidity" | cut -d "." -f 1)
WEATHER_ICON=""
WEATHER_HEX=""
@@ -112,9 +111,6 @@ case $1 in
"feels_like")
check_if_empty "$WEATHER_FEELS_LIKE"
;;
"humidity")
check_if_empty "$WEATHER_HUMIDITY"
;;
"weather_desc")
[[ -z $WEATHER_DESC ]] && echo "Not Available." || echo "$WEATHER_DESC"
;;
@@ -132,4 +128,5 @@ case $1 in
;;
"wmodule")
echo $WEATHER_ICON "$WEATHER_TEMP"°
;;
esac
+26 -5
View File
@@ -1,8 +1,3 @@
; ┌─┐┌─┐┬ ┬ ┬┌┐ ┌─┐┬─┐ ┌─┐┌─┐┬ ┌─┐┬─┐┌─┐┌─┐┬ ┬┌─┐┌┬┐┌─┐┌─┐
; ├─┘│ ││ └┬┘├┴┐├─┤├┬┘ │ │ ││ │ │├┬┘└─┐│ ├─┤├┤ │││├┤ └─┐
; ┴ └─┘┴─┘ ┴ └─┘┴ ┴┴└─ └─┘└─┘┴─┘└─┘┴└─└─┘└─┘┴ ┴└─┘┴ ┴└─┘└─┘
[karla]
bg = #D90E1113
@@ -30,3 +25,29 @@ grey = #8C8C8C
indigo = #6C77BB
blue-gray = #6D8895
[melissa]
bg = #003b4252
bg-alt = #3b4252
fg = #d8dee9
mb = #25292e
trans = #00000000
white = #FFFFFF
black = #000000
red = #bf616a
pink = #d95d95
purple = #b48ead
blue = #5e81ac
blue-arch = #0A9CF5
cyan = #88c0d0
teal = #00B19F
green = #a3be8c
lime = #B9C244
yellow = #ebcb8b
amber = #FBC02D
orange = #E57C46
brown = #AC8476
grey = #4c566a
indigo = #6C77BB
blue-gray = #63778f
+36
View File
@@ -0,0 +1,36 @@
Terminal,OpenApps --floating,/usr/share/icons/Papirus/32x32/apps/terminal.svg
Web Browser,OpenApps --browser,/usr/share/icons/Papirus/32x32/apps/internet-web-browser.svg
File Manager,OpenApps --filemanager,/usr/share/icons/Papirus/32x32/apps/org.xfce.thunar.svg
^sep()
Favorites,^checkout(favorites),/usr/share/icons/Papirus/32x32/status/starred.svg
^sep()
Widgets,^checkout(wg),/usr/share/icons/Papirus/32x32/apps/kmenuedit.svg
BSPWM,^checkout(wm),/usr/share/icons/Papirus/32x32/apps/gnome-windows.svg
Exit,^checkout(exit),/usr/share/icons/Papirus/32x32/apps/system-shutdown.svg
^tag(favorites)
Editor,OpenApps --editor,/usr/share/icons/Papirus/32x32/apps/standard-notes.svg
Neovim,OpenApps --nvim,nvim
Firefox,OpenApps --browser,firefox
Retroarch,retroarch,/usr/share/icons/Papirus/32x32/apps/retroarch.svg
^tag(wg)
User Card,OpenApps --usercard,/usr/share/icons/Papirus/32x32/apps/system-users.svg
Music Player,OpenApps --player,/usr/share/icons/Papirus/32x32/apps/musique.svg
Power Menu,OpenApps --powermenu,/usr/share/icons/Papirus/32x32/status/changes-allow.svg
Calendar,OpenApps --calendar,/usr/share/icons/Papirus/32x32/apps/office-calendar.svg
^tag(wm)
Change Theme,OpenApps --rice,/usr/share/icons/Papirus/32x32/apps/colors.svg
Keybinds,KeybindingsHelp,/usr/share/icons/Papirus/32x32/apps/preferences-desktop-keyboard-shortcuts.svg
Restart WM,bspc wm -r,/usr/share/icons/Papirus/32x32/apps/system-reboot.svg
Quit,bspc quit,/usr/share/icons/Papirus/32x32/apps/system-log-out.svg
^tag(exit)
Block computer,physlock -d,/usr/share/icons/Papirus/32x32/status/changes-prevent.svg
Reboot,systemctl reboot,/usr/share/icons/Papirus/32x32/apps/system-reboot.svg
Shutdown,systemctl poweroff,/usr/share/icons/Papirus/32x32/apps/system-shutdown.svg
+8
View File
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
base=$(dirname $0)
menu_file=$base/menu.txt
conf_file=$base/jgmenurc
jgmenu --csv-file=~/.config/bspwm/scripts/menu.txt --config-file=~/.config/bspwm/scripts/jgmenurc
+21
View File
@@ -0,0 +1,21 @@
#!/bin/bash
hidden=/tmp/syshide.lock
file="$XDG_CONFIG_HOME/bspwm/rices/${RICETHEME}/modules.ini"
if [[ $(pidof stalonetray) ]]; then
if [[ ! -e $hidden ]]; then
polybar-msg action "#systray.hook.1"
xdo hide -n stalonetray
touch "$hidden"
perl -0 -i -pe 's/systray\ninitial=.*/systray\ninitial=2/g' "$file"
else
polybar-msg action "#systray.hook.0"
xdo show -n stalonetray
xdo raise -n stalonetray
rm "$hidden"
perl -0 -i -pe 's/systray\ninitial=.*/systray\ninitial=1/g' "$file"
fi
else
stalonetray &
fi
+4
View File
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
TEMP="$(cat /sys/devices/platform/coretemp.0/hwmon/hwmon0/temp2_input | awk '{sub(/000$/, "°C", $0); print}')"
echo "${TEMP:-null}"
+10
View File
@@ -0,0 +1,10 @@
background "#0E1113"
vertical true
geometry 1x1-50+46
grow_gravity NE
icon_gravity NE
icon_size 18
slot_size 27
kludges force_icons_size
skip_taskbar true
window_type utility
+5
View File
@@ -31,6 +31,11 @@ super + alt + o
ctrl + shift + alt + {p,r,q,l}
{systemctl poweroff, systemctl reboot,bspc quit,lockscreen}
# jgmenu
~button3
xqp 0 $(xdo id -N Bspwm -n root) && jgmenu --csv-file=~/.config/bspwm/scripts/menu.txt --config-file=~/.config/bspwm/jgmenurc
# Apps
alt + {f,g,e,p,w,r,t,s,v,m}
{firefox, \
+1 -1
View File
@@ -9,7 +9,7 @@ auto_update "yes"
# For network
bind_to_address "127.0.0.1"
bind_to_address "~/.config/mpd/socket"
#bind_to_address "~/.config/mpd/socket"
# Inputs
BIN
View File
Binary file not shown.
+1 -28
View File
@@ -1,28 +1 @@
sw_volume: 100
audio_device_state:1:pulse audio
audio_device_state:1:my_fifo
state: pause
current: 6
time: 79.635000
random: 0
repeat: 0
single: 0
consume: 0
crossfade: 0
mixrampdb: 0.000000
mixrampdelay: -1.000000
playlist_begin
0:Ishan_Raj_Onta_-_Sapana_Ko_Mayalu_Unplugged__Lyrics_____The_Elements___(128k.mp3
1:Risaune_Bhaye_-_Sushant_KC___Sano_Sano_Kurama_Pani_Timi_Risaune_Bhaye___Melody___Lyrics____23sushantkc(128k).mp3
2:Sajjan Raj Vaidya - Dhairya [Official Release] (128 kbps).mp3
3:Sajjan_Raj_Vaidya_-_Sasto_Mutu_[Official_Release](48k).mp3
4:Sathi_-_Sushant_KC_(Official_Music_Video)(128k).mp3
5:Sushant KC - Hawa Le (128 kbps).mp3
6:Sushant_KC_-_Behos(128k).mp3
7:Sushant_KC_-_FAKAUNA_MA_(Official_Music_Video)(128k).mp3
8:Sushant_KC_-_Gulabi_(Official_Lyric_Video)(128k).mp3
9:Sushant_KC_-_Muskurayera_(Official_Lyrics_Video)(128k).mp3
10:Sushant_KC_-_Sarangi_(Official_Music_Video)(128k).mp3
11:Sushant_KC_-_Timile(128k).mp3
12:Timro_Maya_-_Sushant_KC_(Official_Lyric_Video)(128k).mp3
playlist_end
+5 -5
View File
@@ -15,11 +15,11 @@ execute_on_song_change = "MediaControl nccover ; dunstify --replace=27072 -i /t
visualizer_data_source = /tmp/mpd.fifo
visualizer_output_name = my_fifo
visualizer_in_stereo = "no"
visualizer_in_stereo = "yes"
visualizer_fps = "60"
visualizer_type = "wave"
visualizer_look = "∗▐"
visualizer_color = "199,200,201,202,166,130,94,58,22"
visualizer_type = "ellipse"
visualizer_look = ●●
visualizer_color = "33,39,63,75,81,99,117,153,189"
visualizer_spectrum_smooth_look = "yes"
# GENERAL
@@ -48,7 +48,7 @@ startup_screen = "playlist"
# PROGRESS BAR
# ---
progressbar_look = "━━━"
progressbar_look = "▪▪▪"
#progressbar_look = "▃▃▃"
progressbar_elapsed_color = "magenta"
progressbar_color = "black"
+1 -1
View File
@@ -5,7 +5,7 @@
# ┬ ┬┌─┐┬─┐┌─┐
# └┐┌┘├─┤├┬┘└─┐
# └┘ ┴ ┴┴└─└─┘
export VISUAL='geany'
export VISUAL="${EDITOR}"
export EDITOR='nvim'
export TERMINAL='alacritty'
export BROWSER='firefox'
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.