mirror of
https://github.com/Derisis13/dotfiles.git
synced 2026-09-16 10:00:51 +02:00
feat(waybar): two configs for desktop and laptop
This commit is contained in:
12
.gitignore
vendored
Normal file
12
.gitignore
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
zsh/.zcompdump*
|
||||||
|
FiraCode.zip
|
||||||
|
systemd/user/default.target.wants/*
|
||||||
|
systemd/user/graphical-session.target.wants/*
|
||||||
|
systemd/user/sockets.target.wants/*
|
||||||
|
nvim/lazy-lock.json
|
||||||
|
gtk-4.0/servers
|
||||||
|
pulse/cookie
|
||||||
|
kdeconnect
|
||||||
|
dconf
|
||||||
|
pavucontrol.ini
|
||||||
|
waybar/config
|
||||||
28
fedora.sh
28
fedora.sh
@@ -15,14 +15,6 @@ set_unit () {
|
|||||||
systemctl --user enable --now $*
|
systemctl --user enable --now $*
|
||||||
}
|
}
|
||||||
|
|
||||||
replace_config_line "/etc/dnf/dnf.conf" "installonly_limit" "3"
|
|
||||||
replace_config_line "/etc/dnf/dnf.conf" "best" "False"
|
|
||||||
replace_config_line "/etc/dnf/dnf.conf" "skip_unavailable" "True"
|
|
||||||
replace_config_line "/etc/dnf/dnf.conf" "fastestmirror" "True"
|
|
||||||
replace_config_line "/etc/dnf/dnf.conf" "defaultyes" "True"
|
|
||||||
replace_config_line "/etc/dnf/dnf.conf" "keepcache" "True"
|
|
||||||
replace_config_line "/etc/dnf/dnf.conf" "max_parallel_downloads" "10"
|
|
||||||
|
|
||||||
ensure_installed () {
|
ensure_installed () {
|
||||||
for dep in $*; do
|
for dep in $*; do
|
||||||
if $(dnf list --installed "$dep" 2>&1 | grep -q "$dep") ; then
|
if $(dnf list --installed "$dep" 2>&1 | grep -q "$dep") ; then
|
||||||
@@ -33,6 +25,18 @@ ensure_installed () {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Select install type
|
||||||
|
|
||||||
|
type="${1:-desktop}"
|
||||||
|
|
||||||
|
replace_config_line "/etc/dnf/dnf.conf" "installonly_limit" "3"
|
||||||
|
replace_config_line "/etc/dnf/dnf.conf" "best" "False"
|
||||||
|
replace_config_line "/etc/dnf/dnf.conf" "skip_unavailable" "True"
|
||||||
|
replace_config_line "/etc/dnf/dnf.conf" "fastestmirror" "True"
|
||||||
|
replace_config_line "/etc/dnf/dnf.conf" "defaultyes" "True"
|
||||||
|
replace_config_line "/etc/dnf/dnf.conf" "keepcache" "True"
|
||||||
|
replace_config_line "/etc/dnf/dnf.conf" "max_parallel_downloads" "10"
|
||||||
|
|
||||||
# Enable extra repos
|
# Enable extra repos
|
||||||
sudo dnf update
|
sudo dnf update
|
||||||
sudo dnf copr enable lionheartp/Hyprland
|
sudo dnf copr enable lionheartp/Hyprland
|
||||||
@@ -65,10 +69,16 @@ mkdir -p ~/.local/share/backgrounds/
|
|||||||
curl -o ~/.local/share/backgrounds/eKxlw8.jpg -fsSL "https://live.staticflickr.com/5077/5914101671_d80c6591e8_k.jpg"
|
curl -o ~/.local/share/backgrounds/eKxlw8.jpg -fsSL "https://live.staticflickr.com/5077/5914101671_d80c6591e8_k.jpg"
|
||||||
set_unit hypridle.service hyprpaper.service hyprpolkitagent.service hyprsunset.service
|
set_unit hypridle.service hyprpaper.service hyprpolkitagent.service hyprsunset.service
|
||||||
set_unit pipewire.service pipewire-pulse.service
|
set_unit pipewire.service pipewire-pulse.service
|
||||||
|
|
||||||
# desktop elements that just work
|
# desktop elements that just work
|
||||||
ensure_installed swaync
|
ensure_installed swaync
|
||||||
set_unit swaync.service
|
set_unit swaync.service
|
||||||
ensure_installed waybar fontawesome4-fonts
|
ensure_installed waybar fontawesome4-fonts pavucontrol powerprofilesctl blueman
|
||||||
|
if [ "$type" = "laptop" ]; then
|
||||||
|
cp ~/.config/waybar/config_laptop.json ~/.config/waybar/config
|
||||||
|
else
|
||||||
|
cp ~/.config/waybar/config_desktop.json ~/.config/waybar/config
|
||||||
|
fi
|
||||||
set_unit waybar.service
|
set_unit waybar.service
|
||||||
ensure_installed cliphist
|
ensure_installed cliphist
|
||||||
set_unit cliphist.service
|
set_unit cliphist.service
|
||||||
|
|||||||
77
rofi/applets/bin/ppd.sh
Executable file
77
rofi/applets/bin/ppd.sh
Executable file
@@ -0,0 +1,77 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
## Author : Aditya Shakya (adi1090x)
|
||||||
|
## Github : @adi1090x
|
||||||
|
#
|
||||||
|
## Applets : Power Menu
|
||||||
|
|
||||||
|
# Import Current Theme
|
||||||
|
source "$HOME"/.config/rofi/applets/shared/theme.bash
|
||||||
|
theme="$type/$style"
|
||||||
|
|
||||||
|
# Theme Elements
|
||||||
|
prompt="Select power profile"
|
||||||
|
mesg="Current power profile : `powerprofilesctl get`"
|
||||||
|
|
||||||
|
if [[ ( "$theme" == *'type-1'* ) || ( "$theme" == *'type-3'* ) || ( "$theme" == *'type-5'* ) ]]; then
|
||||||
|
list_col='1'
|
||||||
|
list_row='3'
|
||||||
|
elif [[ ( "$theme" == *'type-2'* ) || ( "$theme" == *'type-4'* ) ]]; then
|
||||||
|
list_col='3'
|
||||||
|
list_row='1'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Options
|
||||||
|
layout=`cat ${theme} | grep 'USE_ICON' | cut -d'=' -f2`
|
||||||
|
if [ "$layout" = 'NO' ]; then
|
||||||
|
option_1=" Performance"
|
||||||
|
option_2=" Balanced"
|
||||||
|
option_3=" Power saver"
|
||||||
|
else
|
||||||
|
option_1=""
|
||||||
|
option_2=""
|
||||||
|
option_3=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Rofi CMD
|
||||||
|
rofi_cmd() {
|
||||||
|
rofi -theme-str "listview {columns: $list_col; lines: $list_row;}" \
|
||||||
|
-theme-str 'textbox-prompt-colon {str: "";}' \
|
||||||
|
-dmenu \
|
||||||
|
-p "$prompt" \
|
||||||
|
-mesg "$mesg" \
|
||||||
|
-markup-rows \
|
||||||
|
-theme ${theme}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Pass variables to rofi dmenu
|
||||||
|
run_rofi() {
|
||||||
|
echo -e "$option_1\n$option_2\n$option_3" | rofi_cmd
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Execute Command
|
||||||
|
run_cmd() {
|
||||||
|
if [ "$1" = '--opt1' ]; then
|
||||||
|
powerprofilesctl set performance
|
||||||
|
elif [ "$1" = '--opt2' ]; then
|
||||||
|
powerprofilesctl set balanced
|
||||||
|
elif [ "$1" = '--opt3' ]; then
|
||||||
|
powerprofilesctl set power-saver
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Actions
|
||||||
|
chosen="$(run_rofi)"
|
||||||
|
case ${chosen} in
|
||||||
|
$option_1)
|
||||||
|
run_cmd --opt1
|
||||||
|
;;
|
||||||
|
$option_2)
|
||||||
|
run_cmd --opt2
|
||||||
|
;;
|
||||||
|
$option_3)
|
||||||
|
run_cmd --opt3
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
19
waybar/config_laptop.json
Normal file
19
waybar/config_laptop.json
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"layer": "top",
|
||||||
|
"position": "top",
|
||||||
|
"include": [
|
||||||
|
"~/.config/waybar/modules.jsonc"
|
||||||
|
],
|
||||||
|
"height": 20,
|
||||||
|
"margin-left": 3,
|
||||||
|
"margin-right": 3,
|
||||||
|
"margin-top": 3,
|
||||||
|
"margin-bottom": 3,
|
||||||
|
"modules-left": ["custom/junkyard", "hyprland/workspaces"],
|
||||||
|
"modules-center": ["clock"],
|
||||||
|
"modules-right": ["tray", "custom/notification", "pulseaudio", "bluetooth", "backlight", "network", "battery", "group/group-power" ],
|
||||||
|
"tray": {
|
||||||
|
"icon-size": 16,
|
||||||
|
"spacing": 10
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -27,21 +27,21 @@
|
|||||||
// "scroll-step": 1, // %, can be a float
|
// "scroll-step": 1, // %, can be a float
|
||||||
//"reverse-scrolling": 1,
|
//"reverse-scrolling": 1,
|
||||||
"format": "{icon} {volume}% {format_source}",
|
"format": "{icon} {volume}% {format_source}",
|
||||||
"format-bluetooth": "{icon} {volume}% {format_source}",
|
"format-bluetooth": "{icon} {volume}% {format_source}",
|
||||||
"format-bluetooth-muted": " {icon} {format_source}",
|
"format-bluetooth-muted": "{icon} {format_source}",
|
||||||
"format-muted": "婢 {format_source}",
|
"format-muted": " {volume}% {format_source}",
|
||||||
"format-source": " {volume}%",
|
"format-source": " {volume}%",
|
||||||
"format-source-muted": "",
|
"format-source-muted": "",
|
||||||
"format-icons": {
|
"format-icons": {
|
||||||
"headphone": "",
|
"headphone": "",
|
||||||
"hands-free": "",
|
"hands-free": "",
|
||||||
"headset": "",
|
"headset": "",
|
||||||
"phone": "",
|
"phone": "",
|
||||||
"portable": "",
|
"portable": "",
|
||||||
"car": "",
|
"car": "",
|
||||||
"default": ["", "", "", ""]
|
"default": ["", "", "", ""]
|
||||||
},
|
},
|
||||||
"on-click": "~/.config/rofi/applets/bin/volume.sh",
|
"on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle",
|
||||||
"on-click-right": "uwsm app pavucontrol"
|
"on-click-right": "uwsm app pavucontrol"
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -66,6 +66,7 @@
|
|||||||
|
|
||||||
"tray": {
|
"tray": {
|
||||||
"icon-size": 13,
|
"icon-size": 13,
|
||||||
|
"show-passive-items": true,
|
||||||
"spacing": 00
|
"spacing": 00
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -157,17 +158,22 @@
|
|||||||
"warning": 20,
|
"warning": 20,
|
||||||
"critical": 5
|
"critical": 5
|
||||||
},
|
},
|
||||||
"format": "{capacity}% {icon}",
|
"format": "{icon}{capacity}%",
|
||||||
"format-charging": "{capacity}% ",
|
"format-charging": "{capacity}% ",
|
||||||
"format-plugged": "{capacity}% ",
|
"format-plugged": "{capacity}% ",
|
||||||
"format-alt": "{time} {icon}",
|
// "format-alt": "{time} {icon}",
|
||||||
"format-icons": ["", "", "", "", "", "", "", "", "", "", ""],
|
"format-icons": ["", "", "", "", "", "", "", "", "", "", ""],
|
||||||
"on-click": "~/.config/rofi/applets/bin/powermenu.sh"
|
"on-click": "~/.config/rofi/applets/bin/ppd.sh"
|
||||||
},
|
},
|
||||||
"battery#bat0": {
|
"battery#bat0": {
|
||||||
"bat": "BAT0"
|
"bat": "BAT0"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"backlight": {
|
||||||
|
"format": "{icon} {percent}%",
|
||||||
|
"format-icons": ["", "", ""]
|
||||||
|
},
|
||||||
|
|
||||||
"network": {
|
"network": {
|
||||||
"format-wifi": "{icon}",
|
"format-wifi": "{icon}",
|
||||||
"format-ethernet": "",
|
"format-ethernet": "",
|
||||||
|
|||||||
@@ -21,13 +21,26 @@ button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#workspaces {
|
||||||
|
background-color: @base; /* Change this to any gray color you want */
|
||||||
|
border-radius: 0px 10px 10px 0px; /* Adjust as needed */
|
||||||
|
padding: 3px 10px;
|
||||||
|
color: @text;
|
||||||
|
}
|
||||||
|
|
||||||
#workspaces button.active {
|
#workspaces button.active {
|
||||||
background-color: @blue;
|
background-color: @blue;
|
||||||
border: 1px solid @blue;
|
/* border: 1px solid @blue; */
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
color: @base;
|
color: @base;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover {
|
||||||
|
background: @crust;
|
||||||
|
color: @text;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
#workspaces button.urgent {
|
#workspaces button.urgent {
|
||||||
background-color: @red;
|
background-color: @red;
|
||||||
border: 1px solid @red;
|
border: 1px solid @red;
|
||||||
@@ -35,8 +48,7 @@ button {
|
|||||||
color: @base;
|
color: @base;
|
||||||
}
|
}
|
||||||
|
|
||||||
#clock,
|
#clock {
|
||||||
#battery{
|
|
||||||
background-color: @base; /* Change this to any gray color you want */
|
background-color: @base; /* Change this to any gray color you want */
|
||||||
border-radius: 10px; /* Adjust as needed */
|
border-radius: 10px; /* Adjust as needed */
|
||||||
padding: 3px 10px;
|
padding: 3px 10px;
|
||||||
@@ -59,29 +71,46 @@ button {
|
|||||||
#pulseaudio,
|
#pulseaudio,
|
||||||
#network,
|
#network,
|
||||||
#memory,
|
#memory,
|
||||||
|
#backlight,
|
||||||
#bluetooth {
|
#bluetooth {
|
||||||
background-color: @base; /* Change this to any gray color you want */
|
background-color: @base; /* Change this to any gray color you want */
|
||||||
border-radius: 0px; /* Adjust as needed */
|
border-radius: 0px; /* Adjust as needed */
|
||||||
padding: 3px 7px;
|
padding: 3px 3px;
|
||||||
color: @text;
|
color: @text;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#cpu {
|
#pulseaudio {
|
||||||
background-color: @base; /* Change this to any gray color you want */
|
min-width: 110px
|
||||||
border-radius: 0px 10px 10px 0px; /* Adjust as needed */
|
}
|
||||||
padding: 3px 10px;
|
#backlight {
|
||||||
color: @text;
|
min-width: 60px
|
||||||
min-width: 80px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#backlight {
|
#cpu,
|
||||||
|
#battery {
|
||||||
background-color: @base; /* Change this to any gray color you want */
|
background-color: @base; /* Change this to any gray color you want */
|
||||||
border-radius: 0px 10px 10px 0px; /* Adjust as needed */
|
border-radius: 0px 10px 10px 0px; /* Adjust as needed */
|
||||||
padding: 3px 10px;
|
padding: 3px 10px;
|
||||||
color: @text;
|
color: @text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#battery.charging,
|
||||||
|
#battery.plugged {
|
||||||
|
color: @base;
|
||||||
|
background-color: @teal;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.critical:not(.charging) {
|
||||||
|
background-color: @red;
|
||||||
|
color: @subtext1;
|
||||||
|
animation-name: blink;
|
||||||
|
animation-duration: 0.5s;
|
||||||
|
animation-timing-function: linear;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-direction: alternate;
|
||||||
|
}
|
||||||
|
|
||||||
#custom-junkyard {
|
#custom-junkyard {
|
||||||
background-color: @base; /* Change this to any gray color you want */
|
background-color: @base; /* Change this to any gray color you want */
|
||||||
border-radius: 10px 0px 0px 10px; /* Adjust as needed */
|
border-radius: 10px 0px 0px 10px; /* Adjust as needed */
|
||||||
@@ -89,14 +118,6 @@ button {
|
|||||||
color: @text;
|
color: @text;
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces {
|
|
||||||
background-color: @base; /* Change this to any gray color you want */
|
|
||||||
border-radius: 0px 10px 10px 0px; /* Adjust as needed */
|
|
||||||
padding: 3px 10px;
|
|
||||||
color: @text;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#clock {
|
#clock {
|
||||||
background-color: @base; /* Change this to any gray color you want */
|
background-color: @base; /* Change this to any gray color you want */
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
@@ -112,19 +133,6 @@ button {
|
|||||||
color: @text;
|
color: @text;
|
||||||
}
|
}
|
||||||
|
|
||||||
#battery {
|
|
||||||
background-color: @base; /* Change this to any gray color you want */
|
|
||||||
color: @text;
|
|
||||||
margin-left: 7px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery.charging, #battery.plugged {
|
|
||||||
color: @base;
|
|
||||||
background-color: @teal;
|
|
||||||
border-radius: 10px;
|
|
||||||
padding: 3px 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes blink {
|
@keyframes blink {
|
||||||
to {
|
to {
|
||||||
background-color: @subtext1;
|
background-color: @subtext1;
|
||||||
@@ -132,18 +140,6 @@ button {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#battery.critical:not(.charging) {
|
|
||||||
background-color: @red;
|
|
||||||
color: @subtext1;
|
|
||||||
animation-name: blink;
|
|
||||||
animation-duration: 0.5s;
|
|
||||||
animation-timing-function: linear;
|
|
||||||
animation-iteration-count: infinite;
|
|
||||||
animation-direction: alternate;
|
|
||||||
border-radius: 10px;
|
|
||||||
padding: 3px 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
label:focus {
|
label:focus {
|
||||||
background-color: @crust;
|
background-color: @crust;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user