feat: switch to leftwm on work laptop as well

This commit is contained in:
jabuxas 2025-01-16 11:26:19 -03:00
parent 597cae2f6d
commit 3491176c78
45 changed files with 2674 additions and 7 deletions

View File

@ -16,7 +16,7 @@ import = ["~/.config/alacritty/black.toml"]
[window]
opacity = 1
opacity = 0.93
padding.x = 10
# padding.y = 10
decorations = "Full"

View File

@ -7,10 +7,6 @@ if status --is-login
set -gx EDITOR "nvim"
set -x FZF_DEFAULT_OPTS '--height 50% --layout=reverse --border --preview "bat --style=numbers --color=always {}"'
fzf --fish | source
if test -z "$WAYLAND_DISPLAY" && test "$XDG_VTNR" -eq 1
set -gx XDG_CURRENT_DESKTOP "sway"
sway
end
end
if status is-interactive
alias cb="~/repos/cports/cbuild"

View File

@ -0,0 +1,181 @@
#![enable(implicit_some)]
(
modkey: "Mod4",
mousekey: "Mod4",
workspaces: [
// ( output: "HDMI-A-0", relative: true, y: 0, x: 0, height: 1080, width: -1280 ),
// ( output: "HDMI-A-0", relative: true, y: 0, x: 1280, height: 1080, width: -1280 ),
],
tags: [
"I",
"II",
"III",
"IV",
"V",
"VI",
"VII",
"VIII",
"IX",
"X",
"XI",
],
max_window_width: None,
layouts: [
"MainAndVertStack",
"Monocle",
"MainAndHorizontalStack",
// // MainAndDeck,
"GridHorizontal",
"EvenHorizontal",
// // EvenVertical,
"Fibonacci",
"LeftMain",
"CenterMain",
// // CenterMainBalanced,
// // CenterMainFluid,
// // RightWiderLeftStack,
// // LeftWiderRightStack,
],
layout_mode: Tag,
insert_behavior: Bottom,
scratchpad: [
(name: "tmux", value: "alacritty -e tms", x: 150, y: 100, height: 900, width: 2000),
],
window_rules: [
(window_title:".*Anki$", window_class: "^Anki$", spawn_on_tag: 5),
(window_title: "^Add$", window_class:"^Anki$", spawn_floating: true, spawn_on_tag: 5),
(window_class: "Lutris", spawn_on_tag: 7),
(window_class: "pavucontrol", spawn_floating: true),
(window_class: "PrismLauncher", spawn_on_tag: 7),
(window_class: "Steam", spawn_on_tag: 8),
(window_class: "TeamSpeak 3", spawn_on_tag: 6),
(window_class: "Thunar", spawn_floating: true),
(window_class: "QOwnNotes", window_title:".*QownNotes.*", spawn_on_tag: 3),
(window_class: "QOwnNotes", window_title: "Settings", spawn_floating: true),
(window_class: "Virt-manager", spawn_on_tag: 10),
(window_class: "Spotify", spawn_on_tag: 4),
(window_class: "thunderbird", spawn_on_tag: 10),
(window_class: "XIVLauncher.Core", spawn_on_tag: 7),
(window_class: "The Honkers Railway Launcher", spawn_on_tag: 7),
(window_class: "Xournalpp", spawn_on_tag: 4),
(window_class: "amberol", spawn_floating: true),
(window_class: ".*.exe$", spawn_on_tag: 9, spawn_floating: true),
(window_class: "^discord.*", window_title:".*Discord$", spawn_on_tag: 6),
(window_class: "WebCord", spawn_on_tag: 6),
(window_class: "^discord.*", window_title:".*discord-screenaudio.*", spawn_on_tag: 6, spawn_floating: false),
(window_title: "File Upload", spawn_floating: true),
(window_title: "Library", spawn_floating: true),
(window_title: ".*Save.*", spawn_floating: true),
(window_title: ".*Sign in.*", spawn_floating: true),
(window_class: "gamescope", spawn_on_tag: 9),
(window_class: "heroic", spawn_on_tag: 7),
(window_class: "obs", spawn_on_tag: 5),
(window_class: "krita", spawn_on_tag: 5),
(window_class: "obsidian", spawn_on_tag: 3),
(window_class: "parsecd", spawn_on_tag: 5),
(window_class: "Dbeaver", spawn_on_tag: 3),
(window_class: "Chromium-browser", spawn_on_tag: 10),
(window_class: "steam", spawn_on_tag: 8),
(window_class: ".*Minecraft.*", spawn_on_tag: 9),
(window_class: ".*csgo.*", spawn_on_tag: 9),
(window_class: ".*wine.*", spawn_floating: true),
(window_class: "Warframe*", spawn_on_tag: 9, spawn_floating: true),
(window_class: ".*league.*", spawn_on_tag: 9, spawn_floating: true),
(window_class: "leagueclient.exe", spawn_on_tag: 9, spawn_as_type: Splash),
(window_class: ".*riot.*", spawn_on_tag: 9, spawn_floating: true),
(window_class: ".*steam_.*", spawn_on_tag: 9, spawn_floating: true),
(window_title: ".*Properties.*", spawn_floating: true),
(window_title: "steam_app_1476970", spawn_fullscreen: true),
// (window_title: ".*LibreOffice.*", spawn_on_tag: 11),
(window_class: "Signal", spawn_on_tag: 11),
(window_class: "corectrl", spawn_on_tag: 11),
(window_class: "r2modman", spawn_on_tag: 3),
(window_title: "", window_class: "^client.*.exe$", spawn_on_tag:10),
(window_title: "Wuthering Waves ", window_class: "^client.*.exe$", spawn_on_tag: 9),
(window_class: "steam_app_1267910", spawn_on_tag: 10),
(window_class: "Melvor Idle", spawn_on_tag: 10),
(window_class: "net-runelite-launcher-Launcher", spawn_on_tag: 10),
(window_class: "^(Blish Hud)$", spawn_floating: true, spawn_on_tag: 9),
],
disable_current_tag_swap: false,
disable_tile_drag: false,
disable_window_snap: true,
focus_behaviour: Sloppy,
focus_new_windows: true,
single_window_border: true,
sloppy_mouse_follows_focus: true,
auto_derive_workspaces: true,
keybind: [
(command: Execute, value: "rofi -show drun", modifier: ["modkey", "Shift"], key: "Return"),
(command: Execute, value: "alacritty", modifier: ["modkey"], key: "Return"),
(command: CloseWindow, value: "", modifier: ["modkey", "Shift"], key: "c"),
(command: SoftReload, value: "", modifier: ["modkey", "Shift"], key: "r"),
(command: Execute, value: "loginctl kill-session $XDG_SESSION_ID", modifier: ["modkey", "Shift"], key: "x"),
(command: Execute, value: "betterlockscreen -l", modifier: ["modkey", "Control"], key: "l"),
(command: MoveToLastWorkspace, value: "", modifier: ["modkey", "Shift"], key: "w"),
(command: SwapTags, value: "", modifier: ["modkey"], key: "w"),
(command: MoveWindowUp, value: "", modifier: ["modkey", "Shift"], key: "k"),
(command: MoveWindowDown, value: "", modifier: ["modkey", "Shift"], key: "j"),
(command: MoveWindowTop, value: "", modifier: ["modkey", "Alt"], key: "Return"),
(command: FocusWindowUp, value: "", modifier: ["modkey"], key: "l"),
(command: FocusWindowDown, value: "", modifier: ["modkey"], key: "h"),
(command: IncreaseMainWidth, value: "5", modifier: ["modkey"], key: "j"),
(command: DecreaseMainWidth, value: "5", modifier: ["modkey"], key: "k"),
(command: NextLayout, value: "", modifier: ["modkey"], key: "space"),
(command: PreviousLayout, value: "", modifier: ["modkey", "Control"], key: "j"),
(command: FocusWorkspaceNext, value: "", modifier: ["modkey"], key: "period"),
(command: FocusWorkspacePrevious, value: "", modifier: ["modkey"], key: "comma"),
(command: MoveWindowToNextWorkspace, value: "", modifier: ["modkey", "Shift"], key: "period"),
(command: MoveWindowToPreviousWorkspace, value: "", modifier: ["modkey", "Shift"], key: "comma"),
(command: MoveWindowUp, value: "", modifier: ["modkey", "Shift"], key: "Up"),
(command: MoveWindowDown, value: "", modifier: ["modkey", "Shift"], key: "Down"),
(command: FocusWindowUp, value: "", modifier: ["modkey"], key: "Up"),
(command: FocusWindowDown, value: "", modifier: ["modkey"], key: "Down"),
(command: NextLayout, value: "", modifier: ["modkey", "Control"], key: "Up"),
(command: PreviousLayout, value: "", modifier: ["modkey", "Control"], key: "Down"),
(command: FocusWorkspaceNext, value: "", modifier: ["modkey"], key: "Right"),
(command: FocusWorkspacePrevious, value: "", modifier: ["modkey"], key: "Left"),
(command: GotoTag, value: "1", modifier: ["modkey"], key: "1"),
(command: GotoTag, value: "2", modifier: ["modkey"], key: "2"),
(command: GotoTag, value: "3", modifier: ["modkey"], key: "3"),
(command: GotoTag, value: "4", modifier: ["modkey"], key: "4"),
(command: GotoTag, value: "5", modifier: ["modkey"], key: "5"),
(command: GotoTag, value: "6", modifier: ["modkey"], key: "6"),
(command: GotoTag, value: "7", modifier: ["modkey"], key: "7"),
(command: GotoTag, value: "8", modifier: ["modkey"], key: "8"),
(command: GotoTag, value: "9", modifier: ["modkey"], key: "9"),
(command: GotoTag, value: "10", modifier: ["modkey"], key: "0"),
(command: GotoTag, value: "11", modifier: ["modkey"], key: "minus"),
(command: MoveToTag, value: "1", modifier: ["modkey", "Shift"], key: "1"),
(command: MoveToTag, value: "2", modifier: ["modkey", "Shift"], key: "2"),
(command: MoveToTag, value: "3", modifier: ["modkey", "Shift"], key: "3"),
(command: MoveToTag, value: "4", modifier: ["modkey", "Shift"], key: "4"),
(command: MoveToTag, value: "5", modifier: ["modkey", "Shift"], key: "5"),
(command: MoveToTag, value: "6", modifier: ["modkey", "Shift"], key: "6"),
(command: MoveToTag, value: "7", modifier: ["modkey", "Shift"], key: "7"),
(command: MoveToTag, value: "8", modifier: ["modkey", "Shift"], key: "8"),
(command: MoveToTag, value: "9", modifier: ["modkey", "Shift"], key: "9"),
(command: MoveToTag, value: "10", modifier: ["modkey", "Shift"], key: "0"),
(command: MoveToTag, value: "11", modifier: ["modkey", "Shift"], key: "minus"),
(command: ToggleScratchPad, value: "tmux", modifier: ["modkey", "Control"], key: "Return"),
(command: ToggleFloating, modifier: ["modkey"], key: "t"),
(command: ToggleSticky, modifier: ["modkey"], key: "v"),
(command: ToggleFullScreen, modifier: ["modkey"], key: "f"),
// apps
(command: Execute, value: "~/scripts/x-print.sh p", modifier: [], key: "Print"),
(command: Execute, value: "~/scripts/x-print.sh s", modifier: ["Shift"], key: "Print"),
(command: Execute, value: "~/scripts/x-print.sh m", modifier: ["Control", "Shift"], key: "Print"),
(command: Execute, value: "~/scripts/x-print.sh w", modifier: ["Control"], key: "Print"),
(command: Execute, value: "~/scripts/x-print.sh t", modifier: ["modkey"], key: "Print"),
(command: Execute, value: "FUSERMOUNT_PROG=/bin/fusermount ./.local/share/AppImage/ZenBrowser.AppImage", modifier: ["modkey"], key: "b"),
(command: Execute, value: "steam", modifier: ["modkey", "Shift"], key: "s"),
(command: Execute, value: "pcmanfm", modifier: ["modkey"], key: "e"),
(command: Execute, value: "~/scripts/macro.sh", modifier: ["Control", "Shift"], key: "m"),
(command: Execute, value: "flatpak run --env=XL_SECRET_PROVIDER=file dev.goats.xivlauncher", modifier: ["modkey", "Alt"], key: "x"),
// (command: Execute, value: "xdotool type \n", modifier: ["Shift"], key:"question"),
// (command: Execute, value: "xdotool type \n", modifier: ["Shift"], key:"exclam")
],
state_path: None,
)

View File

@ -0,0 +1 @@
rose

View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
leftwm-command "UnloadTheme"
pkill polybar
pkill picom

View File

@ -0,0 +1,9 @@
#![enable(implicit_some)]
(
border_width : 2,
margin : 5,
workspace_margin : 4,
default_border_color : "#595959",
floating_border_color : "#595959",
focused_border_color : "#a7c080",
)

View File

@ -0,0 +1,14 @@
#!/usr/bin/env bash
export SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
#down the last running theme
if [ -f "/tmp/leftwm-theme-down" ]; then
/tmp/leftwm-theme-down
rm /tmp/leftwm-theme-down
fi
ln -s $SCRIPTPATH/down /tmp/leftwm-theme-down
leftwm-command "LoadTheme $SCRIPTPATH/theme.ron"
WALLPAPER_PATH=~/pics/wallpapers
feh --bg-scale ~/pics/wallpapers/ef1.png --bg-scale ~/pics/wallpapers/ef2.jpg --bg-scale ~/pics/wallpapers/cottage.jpg
bash ~/.config/polybar/launch.sh
~/.local/bin/picom-ibhagwan -b --experimental-backends &

View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
leftwm-command "UnloadTheme"
pkill polybar
pkill picom

View File

@ -0,0 +1,9 @@
#![enable(implicit_some)]
(
border_width : 2,
margin : 5,
workspace_margin : 4,
default_border_color : "#242b2e",
floating_border_color : "#242b2e",
focused_border_color : "#e57474",
)

View File

@ -0,0 +1,21 @@
#!/usr/bin/env bash
export SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
#down the last running theme
if [ -f "/tmp/leftwm-theme-down" ]; then
/tmp/leftwm-theme-down
rm /tmp/leftwm-theme-down
fi
ln -s $SCRIPTPATH/down /tmp/leftwm-theme-down
leftwm-command "LoadTheme $SCRIPTPATH/theme.ron"
WALLPAPER_PATH=~/pics/wallpapers
sh ~/scripts/screenlayout.sh
setxkbmap us intl ctrl:nocaps
gsettings set org.gnome.desktop.interface cursor-theme 'Simp1e-Adw'
gsettings set org.gnome.desktop.interface font-name 'Terminess Nerd Font 12'
gsettings set org.gnome.desktop.interface gtk-theme "Sunrise-Dark"
gsettings set org.gnome.desktop.interface icon-theme "Reversal-black-dark"
echo rose > ~/colorscheme
pkill nitrogen; nitrogen --restore &
bash ~/.config/polybar/launch.sh
~/.local/bin/picom-ibhagwan -b --experimental-backends &

View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
leftwm-command "UnloadTheme"
killall -q polybar
# eww kill
killall -q picom-ibhagwan

View File

@ -0,0 +1,9 @@
#![enable(implicit_some)]
(
border_width : 2,
margin : 4,
workspace_margin : 3,
default_border_color : "#323437",
floating_border_color : "#323437",
focused_border_color : "#36c692",
)

View File

@ -0,0 +1,15 @@
#!/usr/bin/env bash
export SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
#down the last running theme
if [ -f "/tmp/leftwm-theme-down" ]; then
/tmp/leftwm-theme-down
rm /tmp/leftwm-theme-down
fi
ln -s $SCRIPTPATH/down /tmp/leftwm-theme-down
leftwm-command "LoadTheme $SCRIPTPATH/theme.ron"
WALLPAPER_PATH=~/pics/wallpapers
bash ~/.config/polybar/launch.sh

View File

@ -0,0 +1,16 @@
This is a very basic README, merely containing a bunch of heads-up notes for using `eww` with `leftwm`
Important:
Copy the `eww-bar` folder to `~/.config/eww/` otherwise every `eww` command needs to pass the path to the folder where the `eww.yuck` and `eww.scss` files are located.
It is also possible to symlink instead of copy, though `eww` isn't to happy about this and will log some errors, even though working just fine.
The previously used xml config is still included in this example in the `legacy_eww_xml_config` folder for reference.
Previously (legacy xml configured) `eww` and `leftwm` failed to properly negotiate the `reserved` space for the `bar` windows, this fixed now though. To prevent windows from overlapping your bar please use the `gutter` setting in `theme.toml` to force this reserved space.
Here is a snippet of how such gutter configuration might look like, if your bar is 24px in height:
```toml
[[gutter]]
side = "Top"
value = 24
```
Since `eww` is still rapidly changing, if stuff breaks please check their [github](https://github.com/elkowar/eww) for documentation on changes and existing issues.

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View File

@ -0,0 +1,18 @@
#!/usr/bin/env bash
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
#set background
if [ -x "$(command -v feh)" ]; then
feh --bg-scale $SCRIPTPATH/down.jpg
fi
echo "UnloadTheme" > $XDG_RUNTIME_DIR/leftwm/commands.pipe
pkill compton
pkill picom
pkill polybar
pkill conky
if [ -x "$(command -v eww)" ]; then
eww kill
fi

Binary file not shown.

After

Width:  |  Height:  |  Size: 539 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -0,0 +1,81 @@
* {
all: unset; //Unsets everything so you can style everything from scratch
}
//Global Styles
.bar0 {
background-color: #3a3a3a;
color: #b0b4bc;
}
// Styles on classes (see eww.yuck for more information)
.sidestuff slider {
all: unset;
color: #ffd5cd;
}
.metric scale trough highlight {
all: unset;
background-color: #D35D6E;
color: #000000;
border-radius: 10px;
}
.metric scale trough {
all: unset;
background-color: #4e4e4e;
border-radius: 50px;
min-height: 3px;
min-width: 50px;
margin-left: 10px;
margin-right: 20px;
}
.metric scale trough highlight {
all: unset;
background-color: #D35D6E;
color: #000000;
border-radius: 10px;
}
.metric scale trough {
all: unset;
background-color: #4e4e4e;
border-radius: 50px;
min-height: 3px;
min-width: 50px;
margin-left: 10px;
margin-right: 20px;
}
.label-ram {
font-size: large;
}
.time {
margin-right: 30px;
}
.workspaces {
margin-left: 30px;
}
.workspaces button {
font-size: 24px;
padding: 6px;
}
.workspaces button:hover {
color: #D35D6E;
}
.ws-button-mine {
color: #4e4e4e;
background-color: #ffd5ca;
}
.ws-button-visible {
color: #D35D6E;
background-color: #4e4e4e;
}
.ws-button-urgent {
color: #ffd5ca;
background-color: #D35D6E;
}
.ws-button-busy {
color: #D35D6E;
}
.ws-button {
color: #b0b4bc;
}

View File

@ -0,0 +1,83 @@
(defwidget bar []
(centerbox :orientation "h"
(workspaces)
(music)
(sidestuff)))
(defwidget sidestuff []
(box :class "sidestuff" :orientation "h" :space-evenly false :halign "end"
(metric :label "🔊"
:value volume
:onchange "amixer -D pulse sset Master {}%")
(metric :label ""
:value '${EWW_RAM.used_mem_perc}'
:onchange "")
(metric :label "💾"
:value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)}
:onchange "")
(time)))
; eww is natively able to parse the JSON output of `leftwm-state`
; since eww also has the ability of `for` loops there is no need for a `liquid` template anymore
(defwidget workspaces []
(box :class "workspaces"
:orientation "h"
:space-evenly true
:halign "start"
:spacing 10
(box
(for tag in '${wmstate.workspaces[0].tags}'
(button
:class {tag.mine ? "ws-button-mine" :
tag.visible ? "ws-button-visible" :
tag.urgent ? "ws-button-urgent" :
tag.busy ? "ws-button-busy" : "ws-button"}
:onclick "leftwm-command \"SendWorkspaceToTag 0 ${tag.index}\""
{!tag.mine && !tag.busy && !tag.visible && !tag.urgent ? "·" : "${tag.name}"})))))
(defwidget music []
(box :class "music"
:orientation "h"
:space-evenly false
:halign "center"
{music != "" ? "🎵${music}" : ""}))
(defwidget metric [label value onchange]
(box :orientation "h"
:class "metric"
:space-evenly false
(box :class "label" label)
(scale :min 0
:max 101
:active {onchange != ""}
:value value
:onchange onchange)))
(defwidget time []
(box :class "time" {time}))
(deflisten music :initial ""
"playerctl --follow metadata --format '{{ artist }} - {{ title }}' || true")
(defpoll volume :interval "1s" :initial "50"
"scripts/getvol")
(defpoll time :interval "10s"
"date '+%H:%M %b %d, %Y'")
(deflisten wmstate
:initial '{"workspaces":[{"layout":"","tags":[{"name":"","index":0,"mine":false,"busy":false,"visible":false,"urgent":false}]}]}'
"leftwm state")
(defwindow bar0
:monitor 0
:windowtype "dock"
:geometry (geometry :x "0%"
:y "0%"
:width "90%"
:height "10px"
:anchor "top center")
:reserve (struts :side "top" :distance "4%")
(bar))

View File

@ -0,0 +1,2 @@
#!/bin/sh
printf "%.0f\n" $(free -m | grep Mem | awk '{print ($3/$2)*100}')

View File

@ -0,0 +1,6 @@
#!/bin/sh
if [ -x "$(command -v amixer)" ]; then
amixer -D pulse sget Master | grep 'Left:' | awk -F'[][]' '{ print $2 }' | tr -d '%' | head -1
elif [ -x "$(command -v pactl)" ]; then
pactl list sinks | grep left: | awk '{print $5}' | tr -d "%" | head -1
fi

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -0,0 +1,59 @@
* {
all: unset; //Unsets everything so you can style everything from scratch
}
//Global Styles
window {
background-color: #3a3a3a;
color: #b0b4bc;
font-family: CascadiaCode;
}
// Styles on classes (see eww.xml for more information)
.sidestuff slider {
all: unset;
color: #ffd5cd;
}
.slider-vol scale trough highlight {
all: unset;
background-color: #D35D6E;
color: #000000;
border-radius: 10px;
}
.slider-vol scale trough {
all: unset;
background-color: #4e4e4e;
border-radius: 50px;
min-height: 3px;
min-width: 50px;
margin-left: 10px;
margin-right: 20px;
}
.slider-ram scale trough highlight {
all: unset;
background-color: #D35D6E;
color: #000000;
border-radius: 10px;
}
.slider-ram scale trough {
all: unset;
background-color: #4e4e4e;
border-radius: 50px;
min-height: 3px;
min-width: 50px;
margin-left: 10px;
margin-right: 20px;
}
.label-ram {
font-size: large;
}
.time {
padding-right: 10px;
}
.workspaces button:hover {
color: #D35D6E;
}

View File

@ -0,0 +1,115 @@
<!-- The main eww configuration file. This is where your widgets and how they appear on the screen and what they
contain are defined. -->
<eww>
<definitions>
<!-- This is the place where you structure your widgets, align them and stuff. -->
<def name="bar"> <!-- Starts the definition of a widget named main -->
<box orientation="h" hexpand="true">
<workspaces/>
<music/>
<sidestuff/>
</box>
</def>
<def name="sidestuff">
<box class="sidestuff" orientation="h" space-evenly="false" halign="end">
<slider-vol/>
<slider-ram/>
<time/>
</box>
</def>
<def name="workspaces">
<box orientation="h" class="workspaces" space-evenly="true" halign="start"> <!-- Your workspaces.-->
<!-- Attention a literal only takes one element as content, so if you need more elements put them in a <box> -->
<literal content="{{leftwm-tags}}"/>
</box>
</def>
<def name="music">
<box orientation="h" class="music" halign="center" space-evenly="false">
<!-- An image. We won't be using it, but it might be handy if you ever need it. -->
<!-- <image path="/home/user/.config/eww/icons/music.svg"/> -->
 {{music}} <!--This is how you use variables.-->
</box>
</def>
<def name="slider-vol">
<!--A basic volume slider-->
<box orientation="h" class="slider-vol" space-evenly="false">
<box class="label-vol"></box>
<scale min="0" max="101" value="{{volume}}" onchange="amixer -D pulse sset Master {}%"/>
</box>
</def>
<def name="slider-ram">
<!--A basic RAM slider-->
<box orientation="h" class="slider-ram" space-evenly="false">
<box class="label-ram"></box>
<scale min="0" active="false" max="101" value="{{ram-used}}"/>
</box>
</def>
<def name="time">
<!--Time-->
<box class="time">{{hour}}:{{min}} {{month}} {{number_day}}, {{year_full}}</box>
</def>
</definitions>
<variables>
<!-- Music vars -->
<!-- These are your variables. Like they say, they run a script, and then output that to the variable. In
the following var, we get music info from playerctl. -->
<script-var name="music" interval="5s">playerctl metadata --format '{{ artist }} - {{ title }}'</script-var>
<!--Volume var-->
<!-- If your vars get too complex to write down here, you can use an external script and paste it's path here as well, as shown below.
-->
<script-var name="volume" interval="16ms">~/.config/eww/scripts/getvol</script-var>
<!--Date vars-->
<script-var name="number_day" interval="5h">date "+%d"</script-var>
<script-var name="month" interval="10h">date "+%b"</script-var>
<script-var name="min" interval="10s">date "+%M"</script-var>
<script-var name="hour" interval="1m">date "+%H"</script-var>
<script-var name="year_full" interval="15h">date "+%Y"</script-var>
<!--RAM var-->
<script-var name="ram-used" interval="1s">~/.config/eww/scripts/getram</script-var>
<!--Battery charge var-->
<script-var name="battery-remaining" interval="2m">cat /sys/class/power_supply/BAT0/capacity</script-var>
<!-- Get the Tags of LeftWM -->
<!-- Note: a script-var without an interval takes the tail of the script command -->
<script-var name="leftwm-tags">leftwm-state -w 0 -t ~/.config/leftwm/themes/current/template.liquid</script-var>
</variables>
<windows>
<!-- These are the windows -->
<window name="bar0" screen="0">
<geometry x="0%" y="0%" width="100%" height="24px"/> <!--Specifies geometry-->
<reserve side="top" distance="4%" layer="top"/>
<widget>
<bar/> <!--This is the def we created earlier-->
</widget>
</window>
<window name="bar1" screen="1">
<geometry x="0%" y="0%" width="100%" height="24px"/> <!--Specifies geometry-->
<reserve side="top" distance="4%" layer="top"/>
<widget>
<bar/> <!--This is the def we created earlier-->
</widget>
</window>
<window name="bar2" screen="2">
<geometry x="0%" y="0%" width="100%" height="24px"/> <!--Specifies geometry-->
<reserve side="top" distance="4%" layer="top"/>
<widget>
<bar/> <!--This is the def we created earlier-->
</widget>
</window>
</windows>
</eww>

View File

@ -0,0 +1,2 @@
#!/bin/sh
printf "%.0f\n" $(free -m | grep Mem | awk '{print ($3/$2)*100}')

View File

@ -0,0 +1,2 @@
#!/bin/sh
amixer -D pulse sget Master | grep 'Left:' | awk -F'[][]' '{ print $2 }' | tr -d '%'

View File

@ -0,0 +1,20 @@
{% assign mine_open = '<button onclick="wmctrl -s ' %}
{% assign visible_open = '<button onclick="wmctrl -s ' %}
{% assign busy_open = '<button onclick="wmctrl -s ' %}
{% assign close = '</button>' %}
{% assign middle = '">' %}
{% assign unoccupied = '<button onclick="wmctrl -s ' %}
{{'<box>'}}
{% for tag in workspace.tags %}
{% if tag.mine %}
{{mine_open}}{{tag.index}}{{middle}} {{ tag.name }} {{close}}
{% elsif tag.visible %}
{{visible_open}}{{tag.index}}{{middle}} {{ tag.name }} {{close}}
{% elsif tag.busy %}
{{busy_open}}{{tag.index}}{{middle}} {{ tag.name }} {{close}}
{% else tag.visible %}
{{unoccupied}}{{tag.index}}{{middle}} {{ tag.name }} {{close}}
{% endif %}
{% endfor %}
{{"</box>"}}

View File

@ -0,0 +1,3 @@
{% for workspace in workspaces %}
{{workspace.w}}x{{workspace.h}}+{{workspace.x}}+{{workspace.y}}
{% endfor %}

View File

@ -0,0 +1,19 @@
{% assign mine_open = ' (button :class "ws-button-mine" :onclick "leftwm-command \"SendWorkspaceToTag ' %}
{% assign visible_open = ' (button :class "ws-button-visible" :onclick "leftwm-command \"SendWorkspaceToTag ' %}
{% assign busy_open = ' (button :class "ws-button-busy" :onclick "leftwm-command \"SendWorkspaceToTag ' %}
{% assign close = '`)' %}
{% assign unoccupied = ' (button :class "ws-button" :onclick "leftwm-command \"SendWorkspaceToTag ' %}
{{'(box :class "workspaces" :orientation "h" :space-evenly true :halign "start" :spacing 10'}}
{% for tag in workspace.tags %}
{% if tag.mine %}
{{mine_open}}{{workspace.index | append: ' ' | append: tag.index | append: '\"" `'}}{{ tag.name }}{{close}}
{% elsif tag.visible %}
{{visible_open}}{{workspace.index | append: ' ' | append: tag.index | append: '\"" `'}}{{ tag.name }}{{close}}
{% elsif tag.busy %}
{{busy_open}}{{workspace.index | append: ' ' | append: tag.index | append: '\"" `'}}{{ tag.name }}{{close}}
{% else tag.visible %}
{{unoccupied}}{{workspace.index | append: ' ' | append: tag.index | append: '\"" `'}}{{ "·" }}{{close}}
{% endif %}
{% endfor %}
{{")"}}

View File

@ -0,0 +1,6 @@
(border_width: 1,
margin: 5,
default_border_color: "#37474F",
floating_border_color: "#225588",
focused_border_color: "#885522",
)

View File

@ -0,0 +1,44 @@
#!/usr/bin/env bash
export SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
#if path to liblinkt is not not exported do so:
if [ -z "$LD_LIBRARY_PATH" ]; then
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
fi
# Down the last running theme
if [ -f "/tmp/leftwm-theme-down" ]; then
/tmp/leftwm-theme-down
rm /tmp/leftwm-theme-down
fi
ln -s $SCRIPTPATH/down /tmp/leftwm-theme-down
# start eww daemon
eww daemon &
# Boot picom or compton if it exists
if [ -x "$(command -v picom)" ]; then
picom --experimental-backends &> /dev/null &
# picom &> /dev/null &
elif [ -x "$(command -v compton)" ]; then
compton &> /dev/null &
fi
# Set the theme.ron config
leftwm-command "LoadTheme $SCRIPTPATH/theme.ron"
# Set background
if [ -x "$(command -v feh)" ]; then
feh --bg-scale $SCRIPTPATH/background.jpg
fi
#open eww 'bar' windows
#this is a bit of an uggly hack, a more elegant way will hopefully be possible with a future `eww` version
sleep 1
index=0
sizes=( $(leftwm-state -q -n -t $SCRIPTPATH/sizes.liquid | sed -r '/^\s*$/d' ) )
for size in "${sizes[@]}"
eww open bar$index
let index=index+1
done

View File

@ -0,0 +1,193 @@
# ░█▀█░▀█▀░█▀▀░█▀█░█▄█░░░░█▀▀░█▀█░█▀█░█▀▀
# ░█▀▀░░█░░█░░░█░█░█░█░░░░█░░░█░█░█░█░█▀▀
# ░▀░░░▀▀▀░▀▀▀░▀▀▀░▀░▀░▀░░▀▀▀░▀▀▀░▀░▀░▀░░
#
# X compositor configuration
#
# ░█▀▀░█░█░█▀█░█▀▄░█▀█░█░█
# ░▀▀█░█▀█░█▀█░█░█░█░█░█▄█
# ░▀▀▀░▀░▀░▀░▀░▀▀░░▀▀▀░▀░▀
shadow = true;
shadow-radius = 25;
shadow-opacity = 0.3;
shadow-offset-x = -32;
shadow-offset-y = -32;
# shadow-red = 0
# shadow-green = 0
# shadow-blue = 0
shadow-color = "#000000";
shadow-exclude = [
"name = 'Notification'",
"class_g = 'Conky'",
"class_g ?= 'Notify-osd'",
"class_g = 'Cairo-clock'",
"class_g = 'slop'",
"class_g = 'Firefox' && argb",
"class_g = 'Rofi'",
"class_g = 'i3bar'",
"class_g *= 'i3bar'",
"name *= 'i3bar'",
"class_g ?= 'i3bar'",
"class_g *= 'i3'",
"_GTK_FRAME_EXTENTS@:c",
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
];
# shadow-exclude-reg = "x10+0+0";
# xinerama-shadow-crop = true;
# ░█▀▀░█▀█░█▀▄░▀█▀░█▀█░█▀▀
# ░█▀▀░█▀█░█░█░░█░░█░█░█░█
# ░▀░░░▀░▀░▀▀░░▀▀▀░▀░▀░▀▀▀
fading = true;
fade-in-step = 0.02;
fade-out-step = 0.02;
fade-delta = 2;
fade-exclude = [];
no-fading-openclose = false;
no-fading-destroyed-argb = true;
# ░█▀█░█▀█░█▀█░█▀▀░▀█▀░▀█▀░█░█
# ░█░█░█▀▀░█▀█░█░░░░█░░░█░░░█░
# ░▀▀▀░▀░░░▀░▀░▀▀▀░▀▀▀░░▀░░░▀░
inactive-opacity =1.0;
frame-opacity = 1;
inactive-opacity-override = false;
active-opacity = 1.0;
inactive-dim = 0.1;
focus-exclude = [
"class_g = 'Cairo-clock'",
"class_g ?= 'Brave-browser'",
"class_g ?= 'rofi'",
"class_g ?= 'slop'",
"class_g ?= 'Steam'"
];
# inactive-dim-fixed = 1.0;
opacity-rule = [
"90:class_g = 'Alacritty'",
# "95:class_g = 'kitty'",
"90:class_g = 'lutris'",
# "95:class_g = 'St'",
"90:class_g = 'URxvt'",
"95:class_g = 'Pcmanfm'",
"95:class_g = 'Emacs'",
# "90:class_g = 'discord'"
]
# ░█▀▄░█░░░█░█░█▀▄░█▀▄░▀█▀░█▀█░█▀▀
# ░█▀▄░█░░░█░█░█▀▄░█▀▄░░█░░█░█░█░█
# ░▀▀░░▀▀▀░▀▀▀░▀░▀░▀░▀░▀▀▀░▀░▀░▀▀▀
blur: {
method = "dual_kawase";
strength = 10.0;
deviation = 1.0;
kernel = "11x11gaussian";
}
blur-background = false;
blur-background-frame = true;
blur-background-fixed = true;
# blur-kern = "3x3box";
blur-background-exclude = [
"class_g = 'slop'",
"class_g = 'Firefox' && argb",
"name = 'rofi - Global Search'",
"_GTK_FRAME_EXTENTS@:c"
];
#################################
# Corners #
#################################
# Sets the radius of rounded window corners. When > 0, the compositor will
# round the corners of windows. Does not interact well with
# `transparent-clipping`.
# corner-radius = 0
corner-radius = 6;
# Exclude conditions for rounded corners.
rounded-corners-exclude = [
"name *= 'tint2'",
"name *= 'jgmenu'",
"name *= 'screenkey'",
"name *= 'polybar'",
"window_type = 'dock'",
"window_type = 'desktop'",
"class_g = 'i3bar'",
"class_g *= 'i3bar'",
"name *= 'i3bar'",
"class_g ?= 'i3bar'",
"class_g *= 'i3'"
];
# ░█▀▀░█▀▀░█▀█░█▀▀░█▀▄░█▀█░█░░░░░█▀▀░█▀▀░▀█▀░▀█▀░▀█▀░█▀█░█▀▀░█▀▀
# ░█░█░█▀▀░█░█░█▀▀░█▀▄░█▀█░█░░░░░▀▀█░█▀▀░░█░░░█░░░█░░█░█░█░█░▀▀█
# ░▀▀▀░▀▀▀░▀░▀░▀▀▀░▀░▀░▀░▀░▀▀▀░░░▀▀▀░▀▀░░▀░░░▀░░▀▀▀░▀░▀░▀▀▀░▀▀▀
daemon = false;
#backend = "glx";
vsync = true;
dbus = false;
mark-wmwin-focused = true;
mark-ovredir-focused = true;
detect-rounded-corners = true;
detect-client-opacity = true;
refresh-rate = 0;
# use-ewmh-active-win = true;
# unredir-if-possible = false;
# unredir-if-possible-delay = 0;
unredir-if-possible-exclude = [];
detect-transient = true;
detect-client-leader = true;
resize-damage = 1;
invert-color-include = [];
glx-no-stencil = true;
# glx-no-rebind-pixmap = false;
use-damage = true;
# xrender-sync-fence = true;
# glx-fshader-win = "";
# force-win-blend = false;
# no-ewmh-fullscreen = false;
# max-brightness = 1.0;
transparent-clipping = false;
#log-level = "warn";
#log-file = "~/.cache/picom-log.log";
show-all-xerrors = true;
# write-pid-path = '/path/to/your/mom';
wintypes: {
tooltip = { fade = true; shadow = false; focus = false; };
normal = { shadow = true; };
dock = { shadow = false; };
dnd = { shadow = false; };
popup_menu = { shadow = true; focus = false; };
dropdown_menu = { shadow = true; focus = false; };
above = { shadow = true; };
splash = { shadow = false; };
utility = { focus = false; shadow = false; blur-background = false; };
notification = { shadow = true; };
desktop = { shadow = false; blur-background = false; };
menu = { focus = false; };
dialog = { shadow = true; };
};

View File

@ -0,0 +1,510 @@
#################################
# Corners #
#################################
# requires: https://github.com/sdhand/compton
corner-radius = 7.0;
rounded-corners-exclude = [
#"window_type = 'normal'",
"class_g = 'awesome'",
"class_g = 'URxvt'",
"class_g = 'Eww'",
"class_g = 'steam'",
"class_g = 'XTerm'",
# "class_g = 'kitty'",
"class_g = 'Alacritty'",
"class_g = 'Polybar'",
"class_g = 'code-oss'",
# "class_g = 'firefox'",
"class_g = 'Conky'",
"class_g = 'Thunderbird'",
"class_g ?= 'xfce4-panel' && window_type = 'dock'",
"class_g ?= 'xmobar' && window_type = 'dock'"
];
round-borders = 1;
round-borders-exclude = [
"class_g = 'xmobar'"
#"class_g = 'TelegramDesktop'",
];
# Specify a list of border width rules, in the format `PIXELS:PATTERN`,
# Note we don't make any guarantee about possible conflicts with the
# border_width set by the window manager.
#
# example:
# round-borders-rule = [ "2:class_g = 'URxvt'" ];
#
round-borders-rule = [
"3:class_g = 'XTerm'",
"3:class_g = 'URxvt'",
"10:class_g = 'Alacritty'",
"15:class_g = 'Signal'"
];
#################################
# Shadows #
#################################
# Enabled client-side shadows on windows. Note desktop windows
# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow,
# unless explicitly requested using the wintypes option.
#
# shadow = false
shadow = true;
# The blur radius for shadows, in pixels. (defaults to 12)
# shadow-radius = 12
shadow-radius = 7;
# The opacity of shadows. (0.0 - 1.0, defaults to 0.75)
# shadow-opacity = .75
# The left offset for shadows, in pixels. (defaults to -15)
# shadow-offset-x = -15
shadow-offset-x = -7;
# The top offset for shadows, in pixels. (defaults to -15)
# shadow-offset-y = -15
shadow-offset-y = -7;
# Red color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-red = 0
# Green color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-green = 0
# Blue color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-blue = 0
# Hex string color value of shadow (#000000 - #FFFFFF, defaults to #000000). This option will override options set shadow-(red/green/blue)
# shadow-color = "#000000"
# Specify a list of conditions of windows that should have no shadow.
#
# examples:
# shadow-exclude = "n:e:Notification";
#
# shadow-exclude = []
shadow-exclude = [
"name = 'Notification'",
# "name *= 'Ulauncher'",
"class_g = 'Conky'",
"class_g ?= 'Notify-osd'",
"class_g = 'Cairo-clock'",
"class_g = 'slop'",
"class_g = 'Polybar'",
"class_g = 'Ulauncher'",
"_GTK_FRAME_EXTENTS@:c"
];
# Specify a X geometry that describes the region in which shadow should not
# be painted in, such as a dock window region. Use
# shadow-exclude-reg = "x10+0+0"
# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on.
#
# shadow-exclude-reg = ""
# Crop shadow of a window fully on a particular Xinerama screen to the screen.
# xinerama-shadow-crop = false
#################################
# Fading #
#################################
# Fade windows in/out when opening/closing and when opacity changes,
# unless no-fading-openclose is used.
# fading = false
fading = true;
# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028)
# fade-in-step = 0.028
fade-in-step = 0.03;
# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03)
# fade-out-step = 0.03
fade-out-step = 0.03;
# The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
# fade-delta = 10
# Specify a list of conditions of windows that should not be faded.
# don't need this, we disable fading for all normal windows with wintypes: {}
fade-exclude = [
"class_g = 'slop'" # maim
]
# Do not fade on window open/close.
# no-fading-openclose = false
# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc.
# no-fading-destroyed-argb = false
#################################
# Transparency / Opacity #
#################################
inactive-opacity = 1;
frame-opacity = 0.7;
inactive-opacity-override = false;
active-opacity = 1.0;
inactive-dim = 0.0
# Specify a list of conditions of windows that should always be considered focused.
# focus-exclude = []
focus-exclude = [
"class_g = 'Cairo-clock'",
"class_g = 'Bar'", # lemonbar
"class_g = 'slop'" # maim
];
# Use fixed inactive dim value, instead of adjusting according to window opacity.
inactive-dim-fixed = 1.0
# Specify a list of opacity rules, in the format `PERCENT:PATTERN`,
# like `50:name *= "Firefox"`. picom-trans is recommended over this.
# Note we don't make any guarantee about possible conflicts with other
# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows.
# example:
# opacity-rule = [ "80:class_g = 'URxvt'" ];
#
# opacity-rule = []
opacity-rule = [
"80:class_g = 'Bar'", # lemonbar
"100:class_g = 'slop'", # maim
"100:class_g = 'XTerm'",
"90:class_g = 'URxvt'",
# "100:class_g = 'kitty'",
"95:class_g = 'Emacs'",
"95:class_g = 'obsidian'",
"100:class_g = 'Alacritty'",
"100:class_g = 'Polybar'",
"100:class_g = 'code-oss'",
"100:class_g = 'Meld'",
"100:class_g = 'xfce4-panel'",
"70:class_g = 'TelegramDesktop'",
"90:class_g = 'Joplin'",
"100:class_g = 'firefox'",
"100:class_g = 'Thunderbird'",
"98:class_g = 'discord'"
];
#################################
# Corners #
#################################
# Sets the radius of rounded window corners. When > 0, the compositor will
# round the corners of windows. Does not interact well with
# `transparent-clipping`.
# Exclude conditions for rounded corners.
#################################
# Background-Blurring #
#################################
# Parameters for background blurring, see the *BLUR* section for more information.
# blur-method =
blur: {
method = "dual_kawase";
strength = 5;
deviation = 4;
size = 5;
background = true;
background-frame = true;
background-fixed = false;
kern = "3x3box";
}
#
# blur-deviation = false
#
# blur-strength = 5
# Blur background of semi-transparent / ARGB windows.
# Bad in performance, with driver-dependent behavior.
# The name of the switch may change without prior notifications.
#
# blur-background = true;
# Blur background of windows when the window frame is not opaque.
# Implies:
# blur-background
# Bad in performance, with driver-dependent behavior. The name may change.
#
# blur-background-frame = false;
# Use fixed blur strength rather than adjusting according to window opacity.
# blur-background-fixed = true;
# Specify the blur convolution kernel, with the following format:
# example:
# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1";
# blue-method = "kernel"
# Exclude conditions for background blur.
blur-background-exclude = [
#"window_type = 'dock'",
#"window_type = 'desktop'",
#"class_g = 'URxvt'",
"class_g ?= 'plank' && window_type = 'dock'",
"class_g = 'Ulauncher'",
"class_g = 'Polybar'",
"class_g = 'Burrito'",
"class_g = 'steam_app_1284210'",
#
# prevents picom from blurring the background
# when taking selection screenshot with `main`
# https://github.com/naelstrof/maim/issues/130
"class_g = 'slop'",
"_GTK_FRAME_EXTENTS@:c"
];
#################################
# General Settings #
#################################
# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers.
# daemon = false
# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`.
# `xrender` is the default one.
#
experimental-backends = true;
backend = "glx";
#backend = "xrender";
# Enable/disable VSync.
# vsync = false
vsync = false;
dbe = false;
# Enable remote control via D-Bus. See the *D-BUS API* section below for more details.
# dbus = false
# Try to detect WM windows (a non-override-redirect window with no
# child that has 'WM_STATE') and mark them as active.
#
# mark-wmwin-focused = false
mark-wmwin-focused = true;
# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused.
# mark-ovredir-focused = false
mark-ovredir-focused = true;
# Try to detect windows with rounded corners and don't consider them
# shaped windows. The accuracy is not very high, unfortunately.
#
# detect-rounded-corners = false
detect-rounded-corners = true;
# Detect '_NET_WM_OPACITY' on client windows, useful for window managers
# not passing '_NET_WM_OPACITY' of client windows to frame windows.
#
# detect-client-opacity = false
detect-client-opacity = true;
# Specify refresh rate of the screen. If not specified or 0, picom will
# try detecting this with X RandR extension.
#
# refresh-rate = 60
refresh-rate = 0;
# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window,
# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy,
# provided that the WM supports it.
#
use-ewmh-active-win = false
# Unredirect all windows if a full-screen opaque window is detected,
# to maximize performance for full-screen windows. Known to cause flickering
# when redirecting/unredirecting windows.
#
unredir-if-possible = true
# Delay before unredirecting the window, in milliseconds. Defaults to 0.
# unredir-if-possible-delay = 0
# Conditions of windows that shouldn't be considered full-screen for unredirecting screen.
unredir-if-possible-exclude = [
"class_g = 'looking-glass-client' && !focused"
]
# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows
# in the same group focused at the same time.
#
# detect-transient = false
detect-transient = true;
# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same
# group focused at the same time. 'WM_TRANSIENT_FOR' has higher priority if
# detect-transient is enabled, too.
#
# detect-client-leader = false
detect-client-leader = true;
# Resize damaged region by a specific number of pixels.
# A positive value enlarges it while a negative one shrinks it.
# If the value is positive, those additional pixels will not be actually painted
# to screen, only used in blur calculation, and such. (Due to technical limitations,
# with use-damage, those pixels will still be incorrectly painted to screen.)
# Primarily used to fix the line corruption issues of blur,
# in which case you should use the blur radius value here
# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`,
# with a 5x5 one you use `--resize-damage 2`, and so on).
# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly.
#
# resize-damage = 1
# Specify a list of conditions of windows that should be painted with inverted color.
# Resource-hogging, and is not well tested.
#
# invert-color-include = []
# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer.
# Might cause incorrect opacity when rendering transparent content (but never
# practically happened) and may not work with blur-background.
# My tests show a 15% performance boost. Recommended.
#
# glx-no-stencil = false
# GLX backend: Avoid rebinding pixmap on window damage.
# Probably could improve performance on rapid window content changes,
# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.).
# Recommended if it works.
#
# glx-no-rebind-pixmap = false
# Disable the use of damage information.
# This cause the whole screen to be redrawn everytime, instead of the part of the screen
# has actually changed. Potentially degrades the performance, but might fix some artifacts.
# The opposing option is use-damage
#
# no-use-damage = false
use-damage = true;
# Use X Sync fence to sync clients' draw calls, to make sure all draw
# calls are finished before picom starts drawing. Needed on nvidia-drivers
# with GLX backend for some users.
#
# xrender-sync-fence = false
# GLX backend: Use specified GLSL fragment shader for rendering window contents.
# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl`
# in the source tree for examples.
#
# glx-fshader-win = ""
# Force all windows to be painted with blending. Useful if you
# have a glx-fshader-win that could turn opaque pixels transparent.
#
# force-win-blend = false
# Do not use EWMH to detect fullscreen windows.
# Reverts to checking if a window is fullscreen based only on its size and coordinates.
#
# no-ewmh-fullscreen = false
# Dimming bright windows so their brightness doesn't exceed this set value.
# Brightness of a window is estimated by averaging all pixels in the window,
# so this could comes with a performance hit.
# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0)
#
# max-brightness = 1.0
# Make transparent windows clip other windows like non-transparent windows do,
# instead of blending on top of them.
#
# transparent-clipping = false
# Set the log level. Possible values are:
# "trace", "debug", "info", "warn", "error"
# in increasing level of importance. Case doesn't matter.
# If using the "TRACE" log level, it's better to log into a file
# using *--log-file*, since it can generate a huge stream of logs.
#
# log-level = "debug"
log-level = "info";
# Set the log file.
# If *--log-file* is never specified, logs will be written to stderr.
# Otherwise, logs will to written to the given file, though some of the early
# logs might still be written to the stderr.
# When setting this option from the config file, it is recommended to use an absolute path.
#
# log-file = "/path/to/your/log/file"
# Show all X errors (for debugging)
# show-all-xerrors = false
# Write process ID to a file.
# write-pid-path = "/path/to/your/log/file"
# Window type settings
#
# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard:
# "unknown", "desktop", "dock", "toolbar", "menu", "utility",
# "splash", "dialog", "normal", "dropdown_menu", "popup_menu",
# "tooltip", "notification", "combo", and "dnd".
#
# Following per window-type options are available: ::
#
# fade, shadow:::
# Controls window-type-specific shadow and fade settings.
#
# opacity:::
# Controls default opacity of the window type.
#
# focus:::
# Controls whether the window of this type is to be always considered focused.
# (By default, all window types except "normal" and "dialog" has this on.)
#
# full-shadow:::
# Controls whether shadow is drawn under the parts of the window that you
# normally won't be able to see. Useful when the window has parts of it
# transparent, and you want shadows in those areas.
#
# redir-ignore:::
# Controls whether this type of windows should cause screen to become
# redirected again after been unredirected. If you have unredir-if-possible
# set, and doesn't want certain window to cause unnecessary screen redirection,
# you can set this to `true`.
#
wintypes:
{
normal = { fade = false; shadow = false; }
tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; };
dock = { shadow = false; }
dnd = { shadow = false; }
popup_menu = { opacity = 0.8; }
dropdown_menu = { opacity = 0.8; }
};
# animations = true;
# animation-stiffness = 300.0;
# animation-dampening = 25.0;
# animation-clamping = true;
# animation-mass = 1;
# animation-window-mass = 1.0;
# animation-delta = 10;
# animation-for-unmap-window = "slide-up";
# animation-for-open-window = "zoom";
# animation-for-menu-window = "slide-down";
# animation-for-transient-window = "slide-down";
transition-length = 400;
transition-pow-x = 0.2;
transition-pow-y = 0.2;
transition-pow-w = 0.3;
transition-pow-h = 0.3;
size-transitition = true;
spawn-center-screen = true;
spawn-center = true;

View File

@ -0,0 +1,394 @@
#################################
# Shadows #
#################################
# Enabled client-side shadows on windows. Note desktop windows
# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow,
# unless explicitly requested using the wintypes option.
#
# shadow = false
shadow = true;
# The blur radius for shadows, in pixels. (defaults to 12)
# shadow-radius = 12
shadow-radius = 7;
# The opacity of shadows. (0.0 - 1.0, defaults to 0.75)
# shadow-opacity = .75
# The left offset for shadows, in pixels. (defaults to -15)
# shadow-offset-x = -15
shadow-offset-x = -7;
# The top offset for shadows, in pixels. (defaults to -15)
# shadow-offset-y = -15
shadow-offset-y = -7;
# Red color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-red = 0
# Green color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-green = 0
# Blue color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-blue = 0
# Hex string color value of shadow (#000000 - #FFFFFF, defaults to #000000). This option will override options set shadow-(red/green/blue)
# shadow-color = "#000000"
# Specify a list of conditions of windows that should have no shadow.
#
# examples:
# shadow-exclude = "n:e:Notification";
#
# shadow-exclude = []
shadow-exclude = [
"name = 'Notification'",
"class_g = 'Conky'",
"class_g ?= 'Notify-osd'",
"class_g = 'Cairo-clock'",
"_GTK_FRAME_EXTENTS@:c"
];
# Specify a list of conditions of windows that should have no shadow painted over, such as a dock window.
# clip-shadow-above = []
# Specify a X geometry that describes the region in which shadow should not
# be painted in, such as a dock window region. Use
# shadow-exclude-reg = "x10+0+0"
# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on.
#
# shadow-exclude-reg = ""
# Crop shadow of a window fully on a particular Xinerama screen to the screen.
# xinerama-shadow-crop = false
#################################
# Fading #
#################################
# Fade windows in/out when opening/closing and when opacity changes,
# unless no-fading-openclose is used.
# fading = false
fading = true;
# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028)
# fade-in-step = 0.028
fade-in-step = 0.03;
# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03)
# fade-out-step = 0.03
fade-out-step = 0.03;
# The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
# fade-delta = 10
# Specify a list of conditions of windows that should not be faded.
# fade-exclude = []
# Do not fade on window open/close.
# no-fading-openclose = false
# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc.
# no-fading-destroyed-argb = false
#################################
# Transparency / Opacity #
#################################
inactive-opacity = 1;
frame-opacity = 0.7;
inactive-opacity-override = false;
active-opacity = 1.0
inactive-dim = 0.0
focus-exclude = [
"class_g = 'slop'"
];
inactive-dim-fixed = 1.0
opacity-rule = [
"90:class_g = 'st-256color'",
"97:class_g = 'discord'"
]
#################################
# Corners #
#################################
# Sets the radius of rounded window corners. When > 0, the compositor will
# round the corners of windows. Does not interact well with
# `transparent-clipping`.
corner-radius = 0
# Exclude conditions for rounded corners.
rounded-corners-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'"
];
#################################
# Background-Blurring #
#################################
blur-method = "kernel"
blur-size = 12
blur-deviation = false
blur-strength = 5
blur-background = true
blur-background-frame = false
blur-background-fixed = true
blur-kern = "15,15,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,";
# Exclude conditions for background blur.
# blur-background-exclude = []
blur-background-exclude = [
"window_type = 'dock'",
"class_g = 'slop'",
"window_type = 'desktop'",
"_GTK_FRAME_EXTENTS@:c"
];
#################################
# General Settings #
#################################
# Enable remote control via D-Bus. See the man page for more details.
# dbus = true
# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers.
# daemon = false
# Specify the backend to use: `xrender`, `glx`, `egl` or `xr_glx_hybrid`.
# `xrender` is the default one.
#
backend = "glx"
# Use higher precision during rendering, and apply dither when presenting the
# rendered screen. Reduces banding artifacts, but might cause performance
# degradation. Only works with OpenGL.
dithered-present = false;
# Enable/disable VSync.
# vsync = false
vsync = true;
# Enable remote control via D-Bus. See the *D-BUS API* section below for more details.
# dbus = false
# Try to detect WM windows (a non-override-redirect window with no
# child that has 'WM_STATE') and mark them as active.
#
# mark-wmwin-focused = false
mark-wmwin-focused = true;
# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused.
# mark-ovredir-focused = false
mark-ovredir-focused = true;
# Try to detect windows with rounded corners and don't consider them
# shaped windows. The accuracy is not very high, unfortunately.
#
# detect-rounded-corners = false
detect-rounded-corners = true;
# Detect '_NET_WM_WINDOW_OPACITY' on client windows, useful for window managers
# not passing '_NET_WM_WINDOW_OPACITY' of client windows to frame windows.
#
# detect-client-opacity = false
detect-client-opacity = true;
# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window,
# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy,
# provided that the WM supports it.
#
# use-ewmh-active-win = false
# Unredirect all windows if a full-screen opaque window is detected,
# to maximize performance for full-screen windows. Known to cause flickering
# when redirecting/unredirecting windows.
#
# unredir-if-possible = false
# Delay before unredirecting the window, in milliseconds. Defaults to 0.
# unredir-if-possible-delay = 0
# Conditions of windows that shouldn't be considered full-screen for unredirecting screen.
# unredir-if-possible-exclude = []
# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows
# in the same group focused at the same time.
#
# detect-transient = false
detect-transient = true;
# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same
# group focused at the same time. This usually means windows from the same application
# will be considered focused or unfocused at the same time.
# 'WM_TRANSIENT_FOR' has higher priority if detect-transient is enabled, too.
#
# detect-client-leader = false
# Resize damaged region by a specific number of pixels.
# A positive value enlarges it while a negative one shrinks it.
# If the value is positive, those additional pixels will not be actually painted
# to screen, only used in blur calculation, and such. (Due to technical limitations,
# with use-damage, those pixels will still be incorrectly painted to screen.)
# Primarily used to fix the line corruption issues of blur,
# in which case you should use the blur radius value here
# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`,
# with a 5x5 one you use `--resize-damage 2`, and so on).
# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly.
#
# resize-damage = 1
# Specify a list of conditions of windows that should be painted with inverted color.
# Resource-hogging, and is not well tested.
#
# invert-color-include = []
# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer.
# Might cause incorrect opacity when rendering transparent content (but never
# practically happened) and may not work with blur-background.
# My tests show a 15% performance boost. Recommended.
#
# glx-no-stencil = false
# GLX backend: Avoid rebinding pixmap on window damage.
# Probably could improve performance on rapid window content changes,
# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.).
# Recommended if it works.
#
# glx-no-rebind-pixmap = false
# Disable the use of damage information.
# This cause the whole screen to be redrawn every time, instead of the part of the screen
# has actually changed. Potentially degrades the performance, but might fix some artifacts.
# The opposing option is use-damage
#
# no-use-damage = false
use-damage = true;
# Use X Sync fence to sync clients' draw calls, to make sure all draw
# calls are finished before picom starts drawing. Needed on nvidia-drivers
# with GLX backend for some users.
#
# xrender-sync-fence = false
# GLX backend: Use specified GLSL fragment shader for rendering window
# contents. Read the man page for a detailed explanation of the interface.
#
# window-shader-fg = "default"
# Use rules to set per-window shaders. Syntax is SHADER_PATH:PATTERN, similar
# to opacity-rule. SHADER_PATH can be "default". This overrides window-shader-fg.
#
# window-shader-fg-rule = [
# "my_shader.frag:window_type != 'dock'"
# ]
# Force all windows to be painted with blending. Useful if you
# have a glx-fshader-win that could turn opaque pixels transparent.
#
# force-win-blend = false
# Do not use EWMH to detect fullscreen windows.
# Reverts to checking if a window is fullscreen based only on its size and coordinates.
#
# no-ewmh-fullscreen = false
# Dimming bright windows so their brightness doesn't exceed this set value.
# Brightness of a window is estimated by averaging all pixels in the window,
# so this could comes with a performance hit.
# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0)
#
# max-brightness = 1.0
# Make transparent windows clip other windows like non-transparent windows do,
# instead of blending on top of them.
#
# transparent-clipping = false
# Specify a list of conditions of windows that should never have transparent
# clipping applied. Useful for screenshot tools, where you need to be able to
# see through transparent parts of the window.
#
# transparent-clipping-exclude = []
# Set the log level. Possible values are:
# "trace", "debug", "info", "warn", "error"
# in increasing level of importance. Case doesn't matter.
# If using the "TRACE" log level, it's better to log into a file
# using *--log-file*, since it can generate a huge stream of logs.
#
# log-level = "debug"
log-level = "warn";
# Set the log file.
# If *--log-file* is never specified, logs will be written to stderr.
# Otherwise, logs will to written to the given file, though some of the early
# logs might still be written to the stderr.
# When setting this option from the config file, it is recommended to use an absolute path.
#
# log-file = "/path/to/your/log/file"
# Show all X errors (for debugging)
# show-all-xerrors = false
# Write process ID to a file.
# write-pid-path = "/path/to/your/log/file"
# Window type settings
#
# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard:
# "unknown", "desktop", "dock", "toolbar", "menu", "utility",
# "splash", "dialog", "normal", "dropdown_menu", "popup_menu",
# "tooltip", "notification", "combo", and "dnd".
#
# Following per window-type options are available: ::
#
# fade, shadow:::
# Controls window-type-specific shadow and fade settings.
#
# opacity:::
# Controls default opacity of the window type.
#
# focus:::
# Controls whether the window of this type is to be always considered focused.
# (By default, all window types except "normal" and "dialog" has this on.)
#
# full-shadow:::
# Controls whether shadow is drawn under the parts of the window that you
# normally won't be able to see. Useful when the window has parts of it
# transparent, and you want shadows in those areas.
#
# clip-shadow-above:::
# Controls whether shadows that would have been drawn above the window should
# be clipped. Useful for dock windows that should have no shadow painted on top.
#
# redir-ignore:::
# Controls whether this type of windows should cause screen to become
# redirected again after been unredirected. If you have unredir-if-possible
# set, and doesn't want certain window to cause unnecessary screen redirection,
# you can set this to `true`.
#
wintypes:
{
tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; };
dock = { shadow = false; clip-shadow-above = true; }
dnd = { shadow = false; }
popup_menu = { opacity = 0.8; }
dropdown_menu = { opacity = 0.8; }
};

View File

@ -0,0 +1,214 @@
[colors]
foreground = #ffffff
secondary = #5bb1b4
alert = #A54242
disabled = #707880
[settings]
screenchange-reload = true
pseudo-transparency = true
[bar/0]
width = 100%
height = 30pt
radius = 20
background = #99282c30
foreground = ${colors.foreground}
line-size = 3pt
border-size = 5pt
border-color = #00000000
padding-left = 4
padding-right = 4
module-margin = 2
separator = " // "
separator-foreground = ${colors.disabled}
font-0 = "Cartograph CF:size=13;2.5"
font-1 = "Ubuntu Nerd Font:size=12;3"
font-2 = "Ubuntu Nerd Font:size=12;3"
font-3 = "Ubuntu Nerd Font:size=12;3"
font-4 = "Ubuntu Nerd Font:size=12;3"
font-5 = "Ubuntu Nerd Font:size=10;3"
font-6 = "feather:size=14;4"
modules-left = powermenu launcher battery volume
modules-center = playerctl
modules-right = date time wifi
cursor-click = pointer
cursor-scroll = ns-resize
enable-ipc = true
[module/volume]
type = internal/pulseaudio
format-volume = "<ramp-volume> <label-volume>"
label-volume = "%percentage%%"
label-muted = "%{F#5bb1b4}%{F-} 0%"
# The large number of ramps is used to have the mute icon only be displayed for 0% volume
ramp-volume-0 = "%{F#5bb1b4}%{F-}"
ramp-volume-1 = "%{F#5bb1b4}%{F-}"
ramp-volume-2 = "%{F#5bb1b4}%{F-}"
ramp-volume-3 = "%{F#5bb1b4}%{F-}"
ramp-volume-4 = "%{F#5bb1b4}%{F-}"
ramp-volume-5 = "%{F#5bb1b4}%{F-}"
ramp-volume-6 = "%{F#5bb1b4}%{F-}"
ramp-volume-7 = "%{F#5bb1b4}%{F-}"
ramp-volume-8 = "%{F#5bb1b4}%{F-}"
ramp-volume-9 = "%{F#5bb1b4}%{F-}"
ramp-volume-10 = "%{F#5bb1b4}%{F-}"
ramp-volume-11 = "%{F#5bb1b4}%{F-}"
ramp-volume-12 = "%{F#5bb1b4}%{F-}"
ramp-volume-13 = "%{F#5bb1b4}%{F-}"
ramp-volume-14 = "%{F#5bb1b4}%{F-}"
ramp-volume-15 = "%{F#5bb1b4}%{F-}"
ramp-volume-16 = "%{F#5bb1b4}%{F-}"
ramp-volume-17 = "%{F#5bb1b4}%{F-}"
ramp-volume-18 = "%{F#5bb1b4}%{F-}"
ramp-volume-19 = "%{F#5bb1b4}%{F-}"
ramp-volume-20 = "%{F#5bb1b4}%{F-}"
ramp-volume-21 = "%{F#5bb1b4}%{F-}"
ramp-volume-22 = "%{F#5bb1b4}%{F-}"
ramp-volume-23 = "%{F#5bb1b4}%{F-}"
ramp-volume-24 = "%{F#5bb1b4}%{F-}"
ramp-volume-25 = "%{F#5bb1b4}%{F-}"
ramp-volume-26 = "%{F#5bb1b4}%{F-}"
ramp-volume-27 = "%{F#5bb1b4}%{F-}"
ramp-volume-28 = "%{F#5bb1b4}%{F-}"
ramp-volume-29 = "%{F#5bb1b4}%{F-}"
ramp-volume-30 = "%{F#5bb1b4}%{F-}"
ramp-volume-31 = "%{F#5bb1b4}%{F-}"
ramp-volume-32 = "%{F#5bb1b4}%{F-}"
ramp-volume-33 = "%{F#5bb1b4}%{F-}"
ramp-volume-34 = "%{F#5bb1b4}%{F-}"
ramp-volume-35 = "%{F#5bb1b4}%{F-}"
ramp-volume-36 = "%{F#5bb1b4}%{F-}"
ramp-volume-37 = "%{F#5bb1b4}%{F-}"
ramp-volume-38 = "%{F#5bb1b4}%{F-}"
ramp-volume-39 = "%{F#5bb1b4}%{F-}"
ramp-volume-40 = "%{F#5bb1b4}%{F-}"
ramp-volume-41 = "%{F#5bb1b4}%{F-}"
ramp-volume-42 = "%{F#5bb1b4}%{F-}"
ramp-volume-43 = "%{F#5bb1b4}%{F-}"
ramp-volume-44 = "%{F#5bb1b4}%{F-}"
ramp-volume-45 = "%{F#5bb1b4}%{F-}"
ramp-volume-46 = "%{F#5bb1b4}%{F-}"
ramp-volume-47 = "%{F#5bb1b4}%{F-}"
ramp-volume-48 = "%{F#5bb1b4}%{F-}"
ramp-volume-49 = "%{F#5bb1b4}%{F-}"
ramp-volume-50 = "%{F#5bb1b4}%{F-}"
ramp-volume-51 = "%{F#5bb1b4}%{F-}"
ramp-volume-52 = "%{F#5bb1b4}%{F-}"
ramp-volume-53 = "%{F#5bb1b4}%{F-}"
ramp-volume-54 = "%{F#5bb1b4}%{F-}"
ramp-volume-55 = "%{F#5bb1b4}%{F-}"
ramp-volume-56 = "%{F#5bb1b4}%{F-}"
ramp-volume-57 = "%{F#5bb1b4}%{F-}"
ramp-volume-58 = "%{F#5bb1b4}%{F-}"
ramp-volume-59 = "%{F#5bb1b4}%{F-}"
ramp-volume-60 = "%{F#5bb1b4}%{F-}"
ramp-volume-61 = "%{F#5bb1b4}%{F-}"
ramp-volume-62 = "%{F#5bb1b4}%{F-}"
ramp-volume-63 = "%{F#5bb1b4}%{F-}"
ramp-volume-64 = "%{F#5bb1b4}%{F-}"
ramp-volume-65 = "%{F#5bb1b4}%{F-}"
ramp-volume-66 = "%{F#5bb1b4}%{F-}"
ramp-volume-67 = "%{F#5bb1b4}%{F-}"
ramp-volume-68 = "%{F#5bb1b4}%{F-}"
ramp-volume-69 = "%{F#5bb1b4}%{F-}"
ramp-volume-70 = "%{F#5bb1b4}%{F-}"
ramp-volume-71 = "%{F#5bb1b4}%{F-}"
ramp-volume-72 = "%{F#5bb1b4}%{F-}"
ramp-volume-73 = "%{F#5bb1b4}%{F-}"
ramp-volume-74 = "%{F#5bb1b4}%{F-}"
ramp-volume-75 = "%{F#5bb1b4}%{F-}"
ramp-volume-76 = "%{F#5bb1b4}%{F-}"
ramp-volume-77 = "%{F#5bb1b4}%{F-}"
ramp-volume-78 = "%{F#5bb1b4}%{F-}"
ramp-volume-79 = "%{F#5bb1b4}%{F-}"
ramp-volume-80 = "%{F#5bb1b4}%{F-}"
ramp-volume-81 = "%{F#5bb1b4}%{F-}"
ramp-volume-82 = "%{F#5bb1b4}%{F-}"
ramp-volume-83 = "%{F#5bb1b4}%{F-}"
ramp-volume-84 = "%{F#5bb1b4}%{F-}"
ramp-volume-85 = "%{F#5bb1b4}%{F-}"
ramp-volume-86 = "%{F#5bb1b4}%{F-}"
ramp-volume-87 = "%{F#5bb1b4}%{F-}"
ramp-volume-88 = "%{F#5bb1b4}%{F-}"
ramp-volume-89 = "%{F#5bb1b4}%{F-}"
ramp-volume-90 = "%{F#5bb1b4}%{F-}"
ramp-volume-91 = "%{F#5bb1b4}%{F-}"
ramp-volume-92 = "%{F#5bb1b4}%{F-}"
ramp-volume-93 = "%{F#5bb1b4}%{F-}"
ramp-volume-94 = "%{F#5bb1b4}%{F-}"
ramp-volume-95 = "%{F#5bb1b4}%{F-}"
ramp-volume-96 = "%{F#5bb1b4}%{F-}"
ramp-volume-97 = "%{F#5bb1b4}%{F-}"
ramp-volume-98 = "%{F#5bb1b4}%{F-}"
ramp-volume-99 = "%{F#5bb1b4}%{F-}"
ramp-volume-100 = "%{F#5bb1b4}%{F-}"
[module/memory]
type = internal/memory
interval = 2
label = "%{A1:gnome-system-monitor -p:}%{F#5bb1b4}%{F-} %percentage_used:2%%%{A}"
[module/cpu]
type = internal/cpu
interval = 0.5
label = "%{A1:gnome-system-monitor -r:}%{F#5bb1b4}%{F-} %percentage:2%%%{A}"
[module/date]
type = internal/date
interval = 1
date = "%d-%m-%Y"
time = "%H:%M:%S"
label = "%{A1:thunderbird -calendar:}%{F#5bb1b4}%{F-} %date%%{A}"
label-foreground = ${colors.secondary}
[module/time]
type = internal/date
interval = 1
time = "%H:%M:%S"
label = "%{F#5bb1b4}%{F-} %time%"
[module/cpu-temp]
type = custom/script
exec = echo "%{F#5bb1b4}%{F-} `sensors | grep -Po '(?<=Package id 0: \+)([0-9]{1,3})'`°C"
interval = 2
[module/battery]
type = internal/battery
full-at = 95
battery = BAT0
adapter = ADP1
poll-interval = 1
label-charging = "%{A1:gnome-control-center power:}%{F#5bb1b4}%{F-} %percentage%%%{A}"
label-low = "%{A1:gnome-control-center power:}%{F#5bb1b4}%{F-} %percentage%%%{A}"
label-discharging = "%{A1:gnome-control-center power:}%{F#5bb1b4}%{F-} %percentage%%%{A}"
label-full = "%{A1:gnome-control-center power:}%{F#5bb1b4}%{F-} %percentage%%%{A}"
[module/playerctl]
type = custom/script
interval = 0.2
exec = '/home/jab/.config/polybar/playerctl.sh' 2> /dev/null
[module/powermenu]
type = custom/text
content = "%{F#5bb1b4}%{F-}"
click-left = '/home/jab/.config/rofi/powermenu/type-6/powermenu.sh'
[module/wifi]
type = internal/network
interface = wlan0
format-connected = <label-connected>
label-connected = "%{A1:alacritty --command nmtui:}%{F#5bb1b4}%{F-}%{A}"
[module/launcher]
type = custom/text
content = "%{F#5bb1b4}%{F-}"
click-left = ~/.config/rofi/launchers/type-6/launcher.sh
[module/wireguard]
type = custom/script
exec = 'wireguard_selector.sh' polybar_icon
interval = 2
label = "%output%"
click-left = 'wireguard_selector.sh' menu

View File

@ -0,0 +1,138 @@
[colors]
background = #141b1e
background-alt = #242b2e
foreground = #e57474
primary = #e57474
secondary = #c96666
alert = #000000
disabled = #b3b9b8
[bar/bar0]
width = 100%
height = 20pt
radius = 0
tail = true
monitor = ${env:MONITOR:fallback-value}
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 2.8pt
border-size = 0pt
border-color = #00
padding-left = 1
padding-right = 2
module-margin = 1
font-0 = Terminess Nerd Font;2
font-1 = SauceCodePro Nerd Font:size=16;3
modules-left = xworkspaces
modules-right = tray xwindow pulseaudio
modules-center = date
cursor-click = pointer
cursor-scroll = ns-resize
offset-x = 0
offset-y = 0
enable-ipc = true
[module/tray]
type = internal/tray
format-margin = 8px
tray-spacing = 8px
[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:30:...%
[module/pulseaudio]
type = internal/pulseaudio
format-volume-prefix = ""
format-volume-prefix-foreground = ${colors.primary}
format-volume = <label-volume>
label-volume = %percentage%%
click-right = pavucontrol
label-muted = muted
label-muted-foreground = ${colors.disabled}
[module/date]
type = internal/date
interval = 1
date = %R
date-alt = %d-%m-%Y %H:%M:%S
label = %date%
label-foreground = ${colors.primary}
[settings]
screenchange-reload = true
pseudo-transparency = true
[module/spotify-title]
type = custom/script
tail = true
format-prefix = " "
interval = 2
exec = ~/.config/polybar/spotify.sh --scroll
click-left = kitty spt
click-right = playerctl --player=spotifyd metadata --format "{{ xesam:url }}" | xclip -selection clipboard
[module/spotify-prev]
type = custom/text
content = "󰼨 "
content-padding = 0
content-spacing = 0
content-margin = 0
click-left = ~/.config/polybar/spotify.sh --previous
[module/spotify-next]
type = custom/text
content = "󰼧 "
content-padding = 0
content-spacing = 0
content-margin = 0
click-left = ~/.config/polybar/spotify.sh --next
[module/spotify-playpause]
type = custom/text
content = "󰐎 "
content-padding = 0
content-spacing = 0
content-margin = 0
click-left = ~/.config/polybar/spotify.sh --play-pause
; vim:ft=dosini

View File

@ -0,0 +1,174 @@
;==========================================================
;
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;
; To learn more about how to configure Polybar
; go to https://github.com/polybar/polybar
;
; The README contains a lot of information
;
;==========================================================
[colors]
background = #080808
background-alt = #323437
foreground = #bdbdbd
primary = #79dac8
secondary = #36c692
alert = #ff5189
disabled = #465a61
[bar/example]
monitor = ${env:MONITOR:fallback-value}
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 = 0
padding-right = 1
module-margin = 1
separator = |
separator-foreground = ${colors.disabled}
font-0 = monospace;2
modules-left = xworkspaces
modules-center = xwindow
modules-right = pulseaudio memory cpu eth date
cursor-click = pointer
cursor-scroll = ns-resize
enable-ipc = true
tray-position = right
; wm-restack = generic
; wm-restack = bspwm
; wm-restack = i3
; override-redirect = true
[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:50:...%
[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
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/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
label-layout = %layout%
label-layout-foreground = ${colors.primary}
label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-foreground = ${colors.background}
label-indicator-background = ${colors.secondary}
[module/memory]
type = internal/memory
interval = 2
format-prefix = "RAM "
format-prefix-foreground = ${colors.primary}
label = %percentage_used:2%%
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = "CPU "
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
label-connected = %{F#F0C674}%ifname%%{F-} %essid% %local_ip%
[module/eth]
inherit = network-base
interface-type = wired
label-connected = %{F#F0C674}%ifname%%{F-} %local_ip%
[module/date]
type = internal/date
interval = 1
date = %d-%m-%Y - %H:%M
date-alt = %H:%M:%S
label = %date%
label-foreground = ${colors.primary}
[settings]
screenchange-reload = true
pseudo-transparency = true
; vim:ft=dosini

View File

@ -0,0 +1,13 @@
#!/bin/bash
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
# Terminate already running bar instances
pkill polybar
# If all your bars have ipc enabled, you can also use
# polybar-msg cmd quit
# Launch Polybar, using default config location ~/.config/polybar/config.ini
MONITOR=HDMI-1-1 polybar -c "$SCRIPTPATH/everforest.ini" 3>&1 | tee -a /tmp/polybar.log & disown
MONITOR=eDP polybar -c "$SCRIPTPATH/everforest.ini" 3>&1 | tee -a /tmp/polybar.log & disown
echo "Polybar launched..."

View File

@ -0,0 +1,39 @@
#!/bin/bash
#
# User Configuration
#
show_controls=yes
icon_color=5bb1b4
play_icon=""
pause_icon=""
player_icon=""
# Get song title
title=$(playerctl metadata | grep -Po '(?<=title )([^\(]*)')
# Get song artist
artist=$(playerctl metadata | grep -Po '(?<=:artist )[^,]*')
# Get play/paused status
status=$(playerctl status)
# Set play_pause_icon to $play_icon or $pause_icon depending on player status
if [ $status == "Paused" ]; then
play_pause_icon=$play_icon
else
play_pause_icon=$pause_icon
fi
# If title and artist are null, print an empty string so polybar hides the module
if [ -z $title ] && [ -z $artist ]; then
echo ""
else
# Print polybar widget string
if [ $show_controls == "yes" ]; then
echo "%{F#$icon_color}$player_icon%{F-} $(head -c 30 <<< $title) - $(head -c 20 <<< $artist) %{F#$icon_color}%{A1:playerctl previous:}%{A} %{A1:playerctl play-pause:}$play_pause_icon%{A} %{A1:playerctl next:}%{A}%{F-}"
else
echo "%{F#$icon_color}$player_icon%{F-} $(head -c 30 <<< $title) - $(head -c 20 <<< $artist)%{F-}"
fi
fi

View File

@ -0,0 +1,118 @@
#!/bin/bash
# Author : https://github.com/Crash-Zeus
readonly command=$1
# Set the source audio player here.
# Examples: spotify, vlc, chrome, mpv and others.
# See more here: https://github.com/altdesktop/playerctl/#selecting-players-to-control
readonly PLAYER="spotify"
# Delay (in seconds) for scrolling update; lower this for faster scrolling
readonly ZSCROLL_DELAY="0.3"
# Time in seconds to wait in between running update checking commands
# Make also a "pause" in scroll but its just due by playerctl hang time to get informations
readonly ZSCROLL_UPDATE_DELAY="2"
# if display text lenght > number the text is going to scroll
readonly ZSCROLL_LENGTH="20"
function get_status() {
PLAYERCTL_STATUS=$(playerctl --player=$PLAYER status)
EXIT_CODE=$?
if [ $EXIT_CODE -eq 0 ]; then
STATUS=$PLAYERCTL_STATUS
else
STATUS="No player is running"
fi
}
function get_metadata() {
DATA=$(playerctl --player=$PLAYER metadata --format "$1")
echo $DATA
}
function display_data() {
if [ "$STATUS" = "Stopped" ]; then
echo "No music is playing"
elif [ "$STATUS" = "Paused" ]; then
get_metadata "Paused"
elif [ "$STATUS" = "No player is running" ]; then
echo "$STATUS"
else
get_metadata "{{ title }} by {{ artist }}"
fi
}
function display_status() {
if [ "$STATUS" = "Stopped" ]; then
echo ""
elif [ "$STATUS" = "Paused" ]; then
echo ""
elif [ "$STATUS" = "No player is running" ]; then
echo ""
else
echo ""
fi
}
function exec_player_command() {
readonly CMD=$1
playerctl --player=$PLAYER $CMD
}
case $command in
"--get-infos")
get_status
display_data
;;
"--get-status")
get_status
display_status
;;
"--scroll")
$0 --get-infos | zscroll -d $ZSCROLL_DELAY -U $ZSCROLL_UPDATE_DELAY -l $ZSCROLL_LENGTH -u true "`dirname $0`/spotify.sh --get-infos"
# -d update scroll delay
# -U launch update command delay
# -l length of scrolling text
# -u Update command
;;
"--play-pause")
get_status
if [ "$STATUS" = "Playing" ] ; then
exec_player_command pause
elif [ "$STATUS" = "Paused" ] ; then
exec_player_command play
elif [ "$STATUS" = "Stopped" ] ; then
exec_player_command play
fi
;;
"--next")
exec_player_command next
;;
"--previous")
exec_player_command previous
;;
*)
echo "No command specified."
echo ""
echo "Available commands :"
echo "--get-infos Get the song name if playing or return No playing song / Paused"
echo "--get-status Get the current status of player like Playing | Stopped | Paused but return icon"
echo "--scroll Display the song metadata with zscroll to scroll text"
echo "--play-pause Execute play or pause command (depend on playerctl status)"
echo "--next Execute next command"
echo "--previous Execute previous command"
exit 0
;;
esac

View File

@ -0,0 +1,33 @@
set -l mouse_data (xdotool getmouselocation --shell)
set -l M_X
set -l M_Y
for line in $mouse_data
set -l key (echo $line | awk -F '=' '{print $1}')
set -l value (echo $line | awk -F '=' '{print $2}')
switch $key
case X
set M_X $value
case Y
set M_Y $value
end
end
set -l xrandr_data (xrandr)
for line in $xrandr_data
if echo $line | grep -q "connected"
set -l details (echo $line | awk '/connected/ {if (match($0, /([a-zA-Z0-9\-]+).* ([0-9]+)x([0-9]+)\+([0-9]+)\+([0-9]+)/, a)) print a[1], a[2], a[3], a[4], a[5]}')
set -l d (echo $details | awk '{print $1}')
set -l w (echo $details | awk '{print $2}')
set -l h (echo $details | awk '{print $3}')
set -l xo (echo $details | awk '{print $4}')
set -l yo (echo $details | awk '{print $5}')
if test $M_X -ge $xo -a $M_X -le (math $w + $xo) -a $M_Y -ge $yo -a $M_Y -le (math $h + $yo)
echo $d
break
end
end
end

View File

@ -0,0 +1,17 @@
#!/usr/bin/perl
foreach (qx(xdotool getmouselocation --shell)) {
m/^([^=]+)=(.*)$/;
$M{$1} = $2;
};
foreach (qx(xrandr)) {
next unless m/connected/;
($d, $w, $h, $xo, $yo) = m/^([^\s]+) .* (\d+)x(\d+)\+(\d+)\+(\d+)/;
if ($M{X} >= $xo && $M{X} <= $w + $xo &&
$M{Y} >= $yo && $M{Y} <= $h + $yo) {
print "$d\n";
last;
}
}

View File

@ -0,0 +1,65 @@
#!/usr/bin/env sh
save_dir="$HOME/pics/screenshots"
save_file="screenshot-$(date -Iseconds | cut -d '+' -f1).png"
temp_screenshot="/tmp/screenshot.png"
mkdir -p "$save_dir"
upload() {
curl -F'file=@'"${temp_screenshot}" \
-Fsecret= \
-H "X-Auth: $(cat ~/.key)" \
https://paste.jabuxas.xyz | xclip -selection clipboard
}
print_error() {
cat << "EOF"
./x-print.sh <action>
...valid actions are...
p : print all screens
s : snip current screen
m : print focused monitor
t : tmp print
w : current window
EOF
}
case $1 in
p) # print all screens
maim "$temp_screenshot" && \
xclip -selection clipboard -t image/png < "$temp_screenshot"
;;
s) # select area to screenshot
maim -s "$temp_screenshot" && \
xclip -selection clipboard -t image/png < "$temp_screenshot"
;;
m) # screenshot focused monitor
focused_monitor=$(fish /home/lucas/scripts/current_monitor.fish)
maim -g "$(xrandr --query | grep "$focused_monitor" | grep -oP '\d+x\d+\+\d+\+\d+')" "$temp_screenshot" && \
xclip -selection clipboard -t image/png < "$temp_screenshot"
;;
t) # upload to paste
maim -s "$temp_screenshot" && \
xclip -selection clipboard -t image/png < "$temp_screenshot" && \
upload
;;
w) # current window
active_window=$(xdotool getactivewindow)
maim -i "$active_window" "$temp_screenshot" && \
xclip -selection clipboard -t image/png < "$temp_screenshot"
;;
*) # invalid option
print_error
exit 1
;;
esac
# Save and cleanup
cp "$temp_screenshot" "${save_dir}/${save_file}"
rm "$temp_screenshot"

View File

@ -43,9 +43,8 @@ if [ -d /etc/X11/xinit/xinitrc.d ]; then
fi
if [ -n "$failsafe" ]; then
export GTK_THEME="Everforest-Dark-BL"
export XDG_SESSION_TYPE="x11"
exec dbus-launch --exit-with-session leftwm > ~/leftwm.log
exec leftwm > ~/leftwm.log
else
exec $command
fi