Commit 9fabb43
Changed files (9)
.config
hypr
modules
hyprpanel
waybar
.wraith
scripts
.config/hypr/modules/autostarts.conf
@@ -1,4 +1,4 @@
-exec-once = hyprpanel
+exec-once = waybar
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = wl-paste --type text --watch cliphist store
exec-once = wl-paste --type image --watch cliphist store
.config/hypr/modules/keybinds.conf
@@ -1,7 +1,5 @@
-# See https://wiki.hyprland.org/Configuring/Keywords/
-$mainMod = SUPER # Sets "Windows" key as main modifier
+$mainMod = SUPER
-# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod SHIFT, W, killactive
bind = $mainMod, M, exit,
bind = $mainMod, f, togglefloating
@@ -23,7 +21,7 @@ bind = $mainMod, SPACE, exec, $menu
bind = CONTROLALT, T, exec, $terminal
bind = $mainMod, E, exec, $fileManager
bind = $mainMod, L, exec, hyprlock
-bind = $mainMod, R, exec, hyprpanel -q && hyprpanel
+bind = $mainMod, R, exec, killall -9 waybar && waybar
bind = $mainMod, V, exec, $cliphistMenu
bind = $mainMod, period, exec, $emojiMenu
bind = $mainMod SHIFT,S, exec, $screenshotMenu
@@ -60,8 +58,10 @@ bindm = $mainMod, mouse:273, resizewindow
bind = $mainMod, mouse_up, exec, ws=$(hyprctl activeworkspace -j | jq '.id'); [ $ws -lt 10 ] && hyprctl dispatch workspace $((ws+1))
bind = $mainMod, mouse_down, exec, ws=$(hyprctl activeworkspace -j | jq '.id'); [ $ws -gt 1 ] && hyprctl dispatch workspace $((ws-1))
bind = , mouse:275, exec, ws=$(hyprctl activeworkspace -j | jq '.id'); [ $ws -gt 1 ] && hyprctl dispatch workspace $((ws-1))
-bind = , mouse:276, exec, ws=$(hyprctl activeworkspace -j | jq '.id'); [ $ws -lt 10 ] && hyprctl dispatch workspace $((ws+1))
-
+bind = , mouse:276, exec, \
+ws=$(hyprctl activeworkspace -j | jq '.id'); \
+tws=$(hyprctl workspaces -j | jq 'map(.id) | map(select(. >= 0)) | max // 0'); \
+[ "$ws" -lt "$tws" ] && hyprctl dispatch workspace $((ws+1))
input {
kb_layout = us
.config/hyprpanel/modules.json
@@ -18,8 +18,8 @@
"custom/packages": {
"icon": {
- "not-available": "📦",
- "available":"⚙️"
+ "not-available": "",
+ "available":""
},
"label": "{pkgs_installed}",
"tooltip": "Total Installed Packages : {pkgs_installed}\nUpdatable Packages : {pkgs_updatable}",
@@ -32,4 +32,4 @@
"onLeftClick": "$HOME/.wraith/scripts/packages.sh"
}
}
-}
\ No newline at end of file
+}
.config/hyprpanel/modules.scss
@@ -1,12 +1,12 @@
-@include styleModule(
- 'cmodule-brightness',
- (
- 'text-color': #cba6f7,
- 'icon-color': #242438,
- 'icon-background': #cba6f7,
- 'label-background': #242438,
- 'inner-spacing': 0.5em,
- 'border-enabled': false,
- 'icon-size': 1.2em
- )
-);
\ No newline at end of file
+$module-common-style: (
+ 'text-color': #cba6f7,
+ 'icon-color': #242438,
+ 'icon-background': #cba6f7,
+ 'label-background': #242438,
+ 'inner-spacing': 0.5em,
+ 'border-enabled': false,
+ 'icon-size': 1em,
+);
+
+@include styleModule('cmodule-brightness', $module-common-style);
+@include styleModule('cmodule-packages', $module-common-style);
.config/waybar/config.jsonc
@@ -0,0 +1,101 @@
+{
+ "layer": "top",
+ "position": "top",
+ "height": 32,
+ "spacing": 0,
+ "modules-left": [
+ "clock",
+ "custom/packages"
+ ],
+ "modules-center": [
+ "hyprland/workspaces"
+ ],
+ "modules-right": [
+ "custom/brightness",
+ "pulseaudio",
+ "custom/power"
+ ],
+ "hyprland/workspaces": {
+ "disable-scroll": false,
+ "format": "{icon}",
+ "active-only": true,
+ "format-icons": {
+ "1": "",
+ "2": "",
+ "3": "",
+ "default": ""
+ }
+ },
+ "clock": {
+ "interval": 1,
+ "timezone": "Asia/Kolkata",
+ "format": " {:%I:%M %p}",
+ "tooltip-format": "<tt>{calendar}</tt>",
+ "calendar": {
+ "weeks-pos": "",
+ "on-scroll": 1,
+ "mode-mon-col": 3,
+ "format": {
+ "months": "<span size='large' color='#b4befe'><b>{}</b></span>",
+ "weekdays": "<span size='large' color='#f9e2af'><b>{}</b></span>",
+ "days": "<span size='large' color='#cdd6f4'><b>{}</b></span>",
+ "today": "<span size='large' color='#f38ba8'><b><u>{}</u></b></span>"
+ }
+ }
+ },
+ "custom/packages": {
+ "exec": "$HOME/.wraith/scripts/packages.sh details",
+ "interval": 5,
+ "return-type": "json",
+ "cursor":false,
+ "on-click": "$HOME/.wraith/scripts/packages.sh",
+ "tooltip": true
+ },
+ "custom/power": {
+ "format": "",
+ "tooltip": false,
+ "cursor":false,
+ "menu": "on-click",
+ "menu-file": "~/.config/waybar/power_menu.xml",
+ "menu-actions": {
+ "shutdown": "shutdown",
+ "reboot": "reboot",
+ "suspend": "systemctl suspend"
+ }
+ },
+ "pulseaudio": {
+ "format": "{icon} {volume}% ",
+ "format-muted": " 0%",
+ "format-icons": {
+ "headphone": " ",
+ "headset": " ",
+ "default": [
+ " ",
+ " ",
+ " "
+ ]
+ },
+ "cursor":false,
+ "on-click-right": "pavucontrol -t 3",
+ "on-click": "pactl -- set-sink-mute 0 toggle",
+ "tooltip": false
+ },
+ "custom/brightness": {
+ "interval": 1,
+ "exec": "$HOME/.wraith/scripts/brightness.sh get",
+ "return-type": "json",
+ "format": "{icon}{percentage}%",
+ "cursor":false,
+ "on-click": "$HOME/.wraith/scripts/brightness.sh set 10",
+ "on-scroll-up": "$HOME/.wraith/scripts/brightness.sh set +5",
+ "on-scroll-down": "$HOME/.wraith/scripts/brightness.sh set -5",
+ "format-icons": {
+ "default": [
+ " ",
+ " ",
+ " "
+ ]
+ },
+ "tooltip": false
+ }
+}
\ No newline at end of file
.config/waybar/style.css
@@ -0,0 +1,95 @@
+* {
+ font-family: "JetBrains Nerd Font Propo", "Font Awesome 7 Free", "Font Awesome 7 Free Solid";
+ font-weight: bold;
+ font-size: 14px;
+ color: #b4befe;
+}
+
+tooltip {
+ background: #1e1e2e;
+ border: 1px solid #b4befe;
+ padding: 16px 18px;
+ border-radius: 5px;
+}
+
+menu {
+ background: #161320;
+ color: #888888;
+ border-radius: 7px;
+}
+
+menuitem:hover{
+ background-color: #888888;
+}
+
+#waybar {
+ background-color: transparent;
+}
+
+#clock,
+#custom-packages,
+#custom-power,
+#custom-brightness,
+#pulseaudio
+{
+ background-color: #241f31;
+ padding: 4px 10px;
+ font-size: 18px;
+ margin-top : 10px;
+ border-radius: 7px;
+}
+
+#clock{
+ margin-left:14px;
+}
+
+#custom-packages
+{
+ margin-left:10px;
+}
+
+#workspaces{
+ background-color: #241f31;
+ padding: 4px 6px;
+ margin-top: 6px;
+ margin-left: 6px;
+ margin-right: 6px;
+ border-radius: 7px;
+ border-width: 0px;
+}
+
+#workspaces button{
+ background: #241f31;
+ border: none;
+ color: #888888;
+ padding: 0px 8px;
+ padding-left:2px;
+ padding-right:4px;
+ margin: 0 2px;
+ font-weight: bold;
+ min-width: 30px;
+ transition: all 250ms ease-in-out;
+}
+
+#workspaces button.hover{
+ border:none;
+ margin: 0px;
+ font-weight: bold;
+}
+
+#workspaces button.active {
+ border: 1px solid #888888;
+ min-width: 80px;
+}
+
+#custom-power{
+ margin-right: 14px;
+ padding:0px 10px;
+ min-width: 20px;
+}
+
+#custom-brightness,
+#pulseaudio{
+ min-width:80px;
+ margin-right: 5px;
+}
.wraith/scripts/packages.sh
@@ -1,8 +1,18 @@
packages_total() {
total=$(pacman -Qe | wc -l)
updates=$(pacman -Qu | wc -l)
- icon=$([[ $updates -gt 0 ]] && echo "available" || echo "not-available")
- printf '{"pkgs_installed": %d,"pkgs_updatable":%d,"alt":"%s"}\n' "$total" "$updates" "$icon"
+
+ if [ "$updates" -gt 0 ]; then
+ text=" $total"
+ tooltip="Updates available"
+ else
+ text=" $total"
+ tooltip="Installed Packages: $total\nNo Updates available"
+ fi
+
+ # Output JSON for Waybar
+ printf '{"text":"%s","tooltip":"%s"}\n' "$text" "$tooltip"
+
}
.gitignore
@@ -0,0 +1,1 @@
+states/
\ No newline at end of file