quickshell stuff

This commit is contained in:
Charlie Root 2024-08-01 01:18:12 +02:00
commit 2038ab1d4f
6 changed files with 105 additions and 226 deletions

View file

@ -16,7 +16,8 @@ in {
settings.mainBar = { settings.mainBar = {
gtk-layer-shell = true; gtk-layer-shell = true;
layer = "top"; layer = "top";
modules-left = ["custom/vpn" "tray" "mpd" "hyprland/window"]; position = "bottom";
modules-left = ["tray" "mpd"];
modules-center = ["hyprland/workspaces"]; modules-center = ["hyprland/workspaces"];
modules-right = [ modules-right = [
"cpu" "cpu"
@ -81,38 +82,11 @@ in {
icon-size = 12; icon-size = 12;
spacing = 5; spacing = 5;
}; };
"custom/vpn" = {
interval = 10;
exec = ''if [[ $(systemctl is-active openvpn-air.service) == "active" ]]; then echo Vpn active; else echo Vpn inactive; fi'';
firmat = "{}";
};
# 󰃰 # 󰃰
clock = { clock = {
interval = 1; interval = 1;
format = " {:%a %d %b %H:%M:%S}"; format = " {:%a %d %b %H:%M:%S}";
tooltip-format = "<tt><small>{calendar}</small></tt>";
calendar = {
mode = "year";
mode-mon-col = 3;
weeks-pos = "right";
on-scroll = 1;
on-click-right = "mode";
format = {
months = "<span color='#EBDBB2'><b>{}</b></span>";
days = "<span color='#B16286'><b>{}</b></span>";
weeks = "<span color='#458588'><b>T{:%W}</b></span>";
weekdays = "<span color='#D79921'><b>{}</b></span>";
today = "<span color='#CC241D'><b><u>{}</u></b></span>";
};
actions = {
on-click-right = "mode";
on-cck-forward = "tz_up";
on-click-backward = "tz_down";
on-scroll-up = "shift_up";
on-scroll-down = "shift_down";
};
};
}; };
battery = { battery = {
@ -157,47 +131,21 @@ in {
}; };
style = '' style = ''
@define-color base #1e1e2e; @define-color base #000000;
@define-color mantle #181825; @define-color inactive #ab8f44;
@define-color crust #11111b; @define-color active #1565c0;
@define-color text #cdd6f4; @define-color text #ffffff;
@define-color subtext0 #a6adc8;
@define-color subtext1 #bac2de;
@define-color surface0 #313244; * {
@define-color surface1 #45475a;
@define-color surface2 #585b70;
@define-color overlay0 #6c7086;
@define-color overlay1 #7f849c;
@define-color overlay2 #9399b2;
@define-color blue #89b4fa;
@define-color lavender #b4befe;
@define-color sapphire #74c7ec;
@define-color sky #89dceb;
@define-color teal #94e2d5;
@define-color green #a6e3a1;
@define-color yellow #f9e2af;
@define-color peach #fab387;
@define-color maroon #eba0ac;
@define-color red #f38ba8;
@define-color mauve #cba6f7;
@define-color pink #f5c2e7;
@define-color flamingo #f2cdcd;
@define-color rosewater #f5e0dc;
* {
border-radius: 1px; border-radius: 1px;
font-family: JetBrains Mono; font-family: ComicShannsMono Nerd Font;
/* font-family: Material Design Icons; */
font-size: 16px; font-size: 16px;
} }
window#waybar { window#waybar {
background-color: alpha(@base, 0.0); background-color: alpha(@base, 1.0);
border-radius: 0px; border-radius: 0px;
} }
@ -210,9 +158,9 @@ in {
margin-bottom: 2px; margin-bottom: 2px;
padding-left: 2px; padding-left: 2px;
padding-right: 2px; padding-right: 2px;
background: @mantle; background: @base;
color: @teal; color: @text;
font-family: JetBrains Mono; font-family: ComicShannsMono Nerd Font;
} }
#workspaces { #workspaces {
@ -225,11 +173,11 @@ in {
padding-right: 0px; padding-right: 0px;
padding-bottom: 0px; padding-bottom: 0px;
padding-left: 0px; padding-left: 0px;
margin-top: 4px; margin-top: 2px;
margin-right: 3px; margin-right: 2px;
margin-bottom: 4px; margin-bottom: 2px;
margin-left: 3px; margin-left: 2px;
background-color: @mantle; background-color: @inactive;
color: @text; color: @text;
min-width: 15px; min-width: 15px;
} }
@ -239,26 +187,15 @@ in {
padding-bottom: 0px; padding-bottom: 0px;
padding-right: 0px; padding-right: 0px;
padding-left: 0px; padding-left: 0px;
margin-top: 4px; margin-top: 2px;
margin-right: 3px; margin-right: 2px;
margin-bottom: 4px; margin-bottom: 2px;
margin-left: 3px; margin-left: 2px;
background-color: @blue; background-color: @active;
color: @mantle; color: @base;
min-width: 15px; min-width: 15px;
} }
#workspaces button:hover {
background: alpha(@mantle, 0.7);
transition-property: background, min-width;
transition-duration: 0.5s;
transition-timing-function: ease;
}
#workspaces button.focused {
background-color: @yellow;
}
#workspaces button.urgent { #workspaces button.urgent {
background-color: @red; background-color: @red;
} }
@ -272,30 +209,15 @@ in {
} }
#pulseaudio { #pulseaudio {
margin-top: 3px; margin-top: 2px;
margin-bottom: 3px; margin-bottom: 2px;
margin-left: 0px; margin-left: 2px;
padding-left: 10px; margin-right: 2px;
padding-right: 10px; padding-left: 0px;
transition: none;
background: @mantle;
color: @peach;
/*border-top-left-radius: 0;
border-bottom-left-radius: 0;*/
}
#cava {
margin-top: 3px;
margin-bottom: 3px;
margin-left: 8px;
margin-right: 0px;
padding-left: 10px;
padding-right: 0px; padding-right: 0px;
transition: none; transition: none;
background: @mantle; background: @base;
color: @peach; color: @text;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
} }
#battery { #battery {
@ -305,8 +227,8 @@ in {
padding-left: 10px; padding-left: 10px;
padding-right: 10px; padding-right: 10px;
transition: none; transition: none;
background: @mantle; background: @base;
color: @teal; color: @text;
} }
@keyframes blink { @keyframes blink {
@ -316,11 +238,11 @@ in {
} }
#battery.charging, #battery.plugged { #battery.charging, #battery.plugged {
background-color: @mantle; background-color: @base;
} }
#battery.critical:not(.charging) { #battery.critical:not(.charging) {
background-color: @mantle; background-color: @base;
animation-name: blink; animation-name: blink;
animation-duration: 0.5s; animation-duration: 0.5s;
animation-timing-function: linear; animation-timing-function: linear;
@ -335,7 +257,7 @@ in {
padding-left: 10px; padding-left: 10px;
padding-right: 10px; padding-right: 10px;
transition: none; transition: none;
background: @mantle; background: @base;
color: @yellow; color: @yellow;
} }
#clock { #clock {
@ -346,41 +268,18 @@ in {
padding-right: 10px; padding-right: 10px;
transition-property: min-width; transition-property: min-width;
transition-duration: 0.5s; transition-duration: 0.5s;
background: @mantle; background: @base;
color: @pink; color: @text;
}
#custom-power_profile {
margin-top: 3px;
margin-bottom: 3px;
margin-left: 8px;
padding-left: 10px;
padding-right: 10px;
transition: none;
background: @mantle;
color: @rosewater;
} }
#tray { #tray {
margin-top: 3px; margin-top: 2px;
margin-bottom: 3px; margin-bottom: 2px;
margin-left: 8px; margin-left: 2px;
padding-left: 10px; padding-left: 2px;
padding-right: 10px; padding-right: 2px;
transition: none; transition: none;
background: @mantle; background: @base;
}
#custom-launcher {
font-size: 16px;
margin-top: 3px;
margin-bottom: 3px;
margin-left: 8px;
padding-left: 10px;
padding-right: 5px;
transition: none;
background: @mantle;
color: @blue;
} }
#custom-power { #custom-power {
@ -392,29 +291,11 @@ in {
padding-left: 10px; padding-left: 10px;
padding-right: 10px; padding-right: 10px;
transition: none; transition: none;
background: @mantle; background: @base;
color: @red; color: @red;
} }
#custom-wallpaper {
margin-top: 3px;
margin-bottom: 3px;
margin-left: 8px;
padding-left: 10px;
padding-right: 10px;
transition: none;
background: @mantle;
}
#custom-updates {
margin-top: 3px;
margin-bottom: 3px;
margin-left: 8px;
padding-left: 10px;
padding-right: 10px;
transition: none;
background: @mantle;
}
#custom-media { #custom-media {
margin-top: 3px; margin-top: 3px;
@ -426,28 +307,6 @@ in {
background: @mantle; background: @mantle;
} }
#custom-dnd {
margin-top: 3px;
margin-bottom: 3px;
margin-left: 8px;
padding-left: 10px;
padding-right: 10px;
transition: none;
background: @mantle;
color: @flamingo;
}
#custom-xwayland {
margin-top: 3px;
margin-bottom: 3px;
margin-left: 8px;
padding-left: 10px;
padding-right: 10px;
transition: none;
background: @mantle;
color: @green;
}
#mpd { #mpd {
margin-top: 3px; margin-top: 3px;
margin-bottom: 3px; margin-bottom: 3px;
@ -455,8 +314,8 @@ in {
padding-left: 10px; padding-left: 10px;
padding-right: 10px; padding-right: 10px;
transition: none; transition: none;
background: @mantle; background: @base;
color: @green; color: @text;
} }
''; '';
}; };

View file

@ -0,0 +1,49 @@
import Quickshell // for ShellRoot and PanelWindow
import Quickshell.Io // For Processes
import QtQuick // For Text
Scope {
property string time;
Variants {
model: Quickshell.screens
PanelWindow {
property var modelData
screen: modelData
anchors {
top: true
left: true
right: true
}
height: 30
Text {
anchors.centerIn: parent
// now just time instead of root.time
text: time
}
}
}
Process {
id: dateProc
command: ["date"]
running: true
stdout: SplitParser {
// now just time instead of root.time
onRead: data => time = data
}
}
Timer {
interval: 1000
running: true
repeat: true
onTriggered: dateProc.running = true
}
}

View file

@ -1,35 +1,6 @@
import Quickshell // for ShellRoot and PanelWindow import Quickshell // for ShellRoot and PanelWindow
import QtQuick // for text
import QtQuick.Layouts
import QtQuick.Controls
import "workspaces" as Workspaces
ShellRoot { ShellRoot {
PanelWindow {
anchors { Bar {}
top: true
left : true
right:true
}
height: 30
ColumnLayout {
Layout.fillWidth: true
spacing: 0
Loader {
active: isSoleBar
Layout.preferredHeight: active ? implicitHeight: 0;
Layout.fillWidth: true
sourceComponent: Workspaces.Widget {
bar: root
wsBaseIndex: 1
}
}
Workspaces.Widget {
bar: root
Layout.fillWidth: true
wsBaseIndex: 1;
hideWhenEmpty: isSoleBar
}
}
}
} }

View file

@ -17,7 +17,7 @@ in {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
qt6.qtimageformats qt6.qtimageformats
qt6.qt5compat qt6.qt5compat
#quickshell.packages.${system}.default quickshell.packages.${system}.default
pamtester pamtester
]; ];
home-manager.users.${username}.xdg.configFile."quickshell/manifest.conf".text = toKeyValue {} { home-manager.users.${username}.xdg.configFile."quickshell/manifest.conf".text = toKeyValue {} {

View file

@ -57,10 +57,10 @@ in {
}; };
}; };
opacity = { opacity = {
applications = 0.9; applications = 1.0;
popups = 0.9; popups = 1.0;
desktop = 0.9; desktop = 1.0;
terminal = 0.9; terminal = 1.0;
}; };
targets = { targets = {
console.enable = true; console.enable = true;

View file

@ -141,15 +141,15 @@ in {
}; };
general = { general = {
sensitivity = 1.0; sensitivity = 1.0;
gaps_in = 5; gaps_in = 0;
gaps_out = 2; gaps_out = 0;
border_size = 2; border_size = 2;
no_border_on_floating = true; no_border_on_floating = true;
}; };
#Decoration settings #Decoration settings
decoration = { decoration = {
rounding = 10; rounding = 0;
blur = { blur = {
enabled = true; enabled = true;
size = 3; size = 3;