diff --git a/work-laptop/configs/alacritty/.config/alacritty/alacritty.toml b/work-laptop/configs/alacritty/.config/alacritty/alacritty.toml index c255e41..bf1b8f3 100644 --- a/work-laptop/configs/alacritty/.config/alacritty/alacritty.toml +++ b/work-laptop/configs/alacritty/.config/alacritty/alacritty.toml @@ -16,7 +16,7 @@ import = ["~/.config/alacritty/black.toml"] [window] -opacity = 1 +opacity = 0.93 padding.x = 10 # padding.y = 10 decorations = "Full" diff --git a/work-laptop/configs/fish/.config/fish/config.fish b/work-laptop/configs/fish/.config/fish/config.fish index 530c091..006e97f 100644 --- a/work-laptop/configs/fish/.config/fish/config.fish +++ b/work-laptop/configs/fish/.config/fish/config.fish @@ -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" diff --git a/work-laptop/configs/leftwm/.config/leftwm/config.ron b/work-laptop/configs/leftwm/.config/leftwm/config.ron new file mode 100644 index 0000000..b9f3e6c --- /dev/null +++ b/work-laptop/configs/leftwm/.config/leftwm/config.ron @@ -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, +) diff --git a/work-laptop/configs/leftwm/.config/leftwm/themes/current b/work-laptop/configs/leftwm/.config/leftwm/themes/current new file mode 120000 index 0000000..426fcad --- /dev/null +++ b/work-laptop/configs/leftwm/.config/leftwm/themes/current @@ -0,0 +1 @@ +rose \ No newline at end of file diff --git a/work-laptop/configs/leftwm/.config/leftwm/themes/everforest/down b/work-laptop/configs/leftwm/.config/leftwm/themes/everforest/down new file mode 100755 index 0000000..3e5c36b --- /dev/null +++ b/work-laptop/configs/leftwm/.config/leftwm/themes/everforest/down @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" + + +leftwm-command "UnloadTheme" + +pkill polybar +pkill picom diff --git a/work-laptop/configs/leftwm/.config/leftwm/themes/everforest/theme.ron b/work-laptop/configs/leftwm/.config/leftwm/themes/everforest/theme.ron new file mode 100644 index 0000000..738081d --- /dev/null +++ b/work-laptop/configs/leftwm/.config/leftwm/themes/everforest/theme.ron @@ -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", +) diff --git a/work-laptop/configs/leftwm/.config/leftwm/themes/everforest/up b/work-laptop/configs/leftwm/.config/leftwm/themes/everforest/up new file mode 100755 index 0000000..0524563 --- /dev/null +++ b/work-laptop/configs/leftwm/.config/leftwm/themes/everforest/up @@ -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 & diff --git a/work-laptop/configs/leftwm/.config/leftwm/themes/rose/down b/work-laptop/configs/leftwm/.config/leftwm/themes/rose/down new file mode 100755 index 0000000..3e5c36b --- /dev/null +++ b/work-laptop/configs/leftwm/.config/leftwm/themes/rose/down @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" + + +leftwm-command "UnloadTheme" + +pkill polybar +pkill picom diff --git a/work-laptop/configs/leftwm/.config/leftwm/themes/rose/theme.ron b/work-laptop/configs/leftwm/.config/leftwm/themes/rose/theme.ron new file mode 100644 index 0000000..c9dbcdd --- /dev/null +++ b/work-laptop/configs/leftwm/.config/leftwm/themes/rose/theme.ron @@ -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", +) diff --git a/work-laptop/configs/leftwm/.config/leftwm/themes/rose/up b/work-laptop/configs/leftwm/.config/leftwm/themes/rose/up new file mode 100755 index 0000000..b5bdca3 --- /dev/null +++ b/work-laptop/configs/leftwm/.config/leftwm/themes/rose/up @@ -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 & diff --git a/work-laptop/configs/leftwm/.config/leftwm/themes/solarized/down b/work-laptop/configs/leftwm/.config/leftwm/themes/solarized/down new file mode 100755 index 0000000..80f398a --- /dev/null +++ b/work-laptop/configs/leftwm/.config/leftwm/themes/solarized/down @@ -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 + diff --git a/work-laptop/configs/leftwm/.config/leftwm/themes/solarized/theme.ron b/work-laptop/configs/leftwm/.config/leftwm/themes/solarized/theme.ron new file mode 100644 index 0000000..c9f5e56 --- /dev/null +++ b/work-laptop/configs/leftwm/.config/leftwm/themes/solarized/theme.ron @@ -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", +) diff --git a/work-laptop/configs/leftwm/.config/leftwm/themes/solarized/up b/work-laptop/configs/leftwm/.config/leftwm/themes/solarized/up new file mode 100755 index 0000000..6e21877 --- /dev/null +++ b/work-laptop/configs/leftwm/.config/leftwm/themes/solarized/up @@ -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 diff --git a/work-laptop/configs/leftwm/.config/leftwm/themes/test/README.md b/work-laptop/configs/leftwm/.config/leftwm/themes/test/README.md new file mode 100644 index 0000000..2d6e4dc --- /dev/null +++ b/work-laptop/configs/leftwm/.config/leftwm/themes/test/README.md @@ -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. diff --git a/work-laptop/configs/leftwm/.config/leftwm/themes/test/background.jpg b/work-laptop/configs/leftwm/.config/leftwm/themes/test/background.jpg new file mode 100644 index 0000000..69fa9d0 Binary files /dev/null and b/work-laptop/configs/leftwm/.config/leftwm/themes/test/background.jpg differ diff --git a/work-laptop/configs/leftwm/.config/leftwm/themes/test/down b/work-laptop/configs/leftwm/.config/leftwm/themes/test/down new file mode 100755 index 0000000..53e7a2e --- /dev/null +++ b/work-laptop/configs/leftwm/.config/leftwm/themes/test/down @@ -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 diff --git a/work-laptop/configs/leftwm/.config/leftwm/themes/test/down.jpg b/work-laptop/configs/leftwm/.config/leftwm/themes/test/down.jpg new file mode 100644 index 0000000..da757f7 Binary files /dev/null and b/work-laptop/configs/leftwm/.config/leftwm/themes/test/down.jpg differ diff --git a/work-laptop/configs/leftwm/.config/leftwm/themes/test/eww-bar/eww-bar.png b/work-laptop/configs/leftwm/.config/leftwm/themes/test/eww-bar/eww-bar.png new file mode 100644 index 0000000..e6de6a8 Binary files /dev/null and b/work-laptop/configs/leftwm/.config/leftwm/themes/test/eww-bar/eww-bar.png differ diff --git a/work-laptop/configs/leftwm/.config/leftwm/themes/test/eww-bar/eww.scss b/work-laptop/configs/leftwm/.config/leftwm/themes/test/eww-bar/eww.scss new file mode 100644 index 0000000..b171b8a --- /dev/null +++ b/work-laptop/configs/leftwm/.config/leftwm/themes/test/eww-bar/eww.scss @@ -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; +} diff --git a/work-laptop/configs/leftwm/.config/leftwm/themes/test/eww-bar/eww.yuck b/work-laptop/configs/leftwm/.config/leftwm/themes/test/eww-bar/eww.yuck new file mode 100644 index 0000000..e8b3751 --- /dev/null +++ b/work-laptop/configs/leftwm/.config/leftwm/themes/test/eww-bar/eww.yuck @@ -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)) diff --git a/work-laptop/configs/leftwm/.config/leftwm/themes/test/eww-bar/scripts/getram b/work-laptop/configs/leftwm/.config/leftwm/themes/test/eww-bar/scripts/getram new file mode 100755 index 0000000..791a5a5 --- /dev/null +++ b/work-laptop/configs/leftwm/.config/leftwm/themes/test/eww-bar/scripts/getram @@ -0,0 +1,2 @@ +#!/bin/sh +printf "%.0f\n" $(free -m | grep Mem | awk '{print ($3/$2)*100}') diff --git a/work-laptop/configs/leftwm/.config/leftwm/themes/test/eww-bar/scripts/getvol b/work-laptop/configs/leftwm/.config/leftwm/themes/test/eww-bar/scripts/getvol new file mode 100755 index 0000000..5d7988a --- /dev/null +++ b/work-laptop/configs/leftwm/.config/leftwm/themes/test/eww-bar/scripts/getvol @@ -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 diff --git a/work-laptop/configs/leftwm/.config/leftwm/themes/test/legacy_eww_xml_config/eww-bar/eww-bar.png b/work-laptop/configs/leftwm/.config/leftwm/themes/test/legacy_eww_xml_config/eww-bar/eww-bar.png new file mode 100644 index 0000000..e6de6a8 Binary files /dev/null and b/work-laptop/configs/leftwm/.config/leftwm/themes/test/legacy_eww_xml_config/eww-bar/eww-bar.png differ diff --git a/work-laptop/configs/leftwm/.config/leftwm/themes/test/legacy_eww_xml_config/eww-bar/eww.scss b/work-laptop/configs/leftwm/.config/leftwm/themes/test/legacy_eww_xml_config/eww-bar/eww.scss new file mode 100644 index 0000000..139c3ee --- /dev/null +++ b/work-laptop/configs/leftwm/.config/leftwm/themes/test/legacy_eww_xml_config/eww-bar/eww.scss @@ -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; +} + + diff --git a/work-laptop/configs/leftwm/.config/leftwm/themes/test/legacy_eww_xml_config/eww-bar/eww.xml b/work-laptop/configs/leftwm/.config/leftwm/themes/test/legacy_eww_xml_config/eww-bar/eww.xml new file mode 100644 index 0000000..b9d3993 --- /dev/null +++ b/work-laptop/configs/leftwm/.config/leftwm/themes/test/legacy_eww_xml_config/eww-bar/eww.xml @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ๏€ {{music}} + + + + + + ๏ŸŠ + + + + + + + ๏กš + + + + + + {{hour}}:{{min}} {{month}} {{number_day}}, {{year_full}} + + + + + + + + + playerctl metadata --format '{{ artist }} - {{ title }}' + + + + + + ~/.config/eww/scripts/getvol + + + date "+%d" + date "+%b" + date "+%M" + date "+%H" + date "+%Y" + + + ~/.config/eww/scripts/getram + + + cat /sys/class/power_supply/BAT0/capacity + + + + leftwm-state -w 0 -t ~/.config/leftwm/themes/current/template.liquid + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/work-laptop/configs/leftwm/.config/leftwm/themes/test/legacy_eww_xml_config/eww-bar/scripts/getram b/work-laptop/configs/leftwm/.config/leftwm/themes/test/legacy_eww_xml_config/eww-bar/scripts/getram new file mode 100755 index 0000000..791a5a5 --- /dev/null +++ b/work-laptop/configs/leftwm/.config/leftwm/themes/test/legacy_eww_xml_config/eww-bar/scripts/getram @@ -0,0 +1,2 @@ +#!/bin/sh +printf "%.0f\n" $(free -m | grep Mem | awk '{print ($3/$2)*100}') diff --git a/work-laptop/configs/leftwm/.config/leftwm/themes/test/legacy_eww_xml_config/eww-bar/scripts/getvol b/work-laptop/configs/leftwm/.config/leftwm/themes/test/legacy_eww_xml_config/eww-bar/scripts/getvol new file mode 100755 index 0000000..3c31607 --- /dev/null +++ b/work-laptop/configs/leftwm/.config/leftwm/themes/test/legacy_eww_xml_config/eww-bar/scripts/getvol @@ -0,0 +1,2 @@ +#!/bin/sh +amixer -D pulse sget Master | grep 'Left:' | awk -F'[][]' '{ print $2 }' | tr -d '%' diff --git a/work-laptop/configs/leftwm/.config/leftwm/themes/test/legacy_eww_xml_config/template.liquid b/work-laptop/configs/leftwm/.config/leftwm/themes/test/legacy_eww_xml_config/template.liquid new file mode 100644 index 0000000..b77c33d --- /dev/null +++ b/work-laptop/configs/leftwm/.config/leftwm/themes/test/legacy_eww_xml_config/template.liquid @@ -0,0 +1,20 @@ +{% assign mine_open = '