diff --git a/leftwm/.config/leftwm/config.ron b/leftwm/.config/leftwm/config.ron new file mode 100644 index 0000000..ce3f155 --- /dev/null +++ b/leftwm/.config/leftwm/config.ron @@ -0,0 +1,104 @@ +// _ ___ ___ _ +// | | / __)_ / __|_) +// | | ____| |__| |_ _ _ _ ____ ____ ___ ____ | |__ _ ____ ____ ___ ____ +// | |/ _ ) __) _) | | | \ / ___) _ \| _ \| __) |/ _ | / ___) _ \| _ \ +// | ( (/ /| | | |_| | | | | | | ( (__| |_| | | | | | | ( ( | |_| | | |_| | | | | +// |_|\____)_| \___)____|_|_|_| \____)___/|_| |_|_| |_|\_|| (_)_| \___/|_| |_| +// A WindowManager for Adventurers (____/ +// For info about configuration please visit https://github.com/leftwm/leftwm/wiki + +#![enable(implicit_some)] +( + modkey: "Mod4", + mousekey: "Mod4", + workspaces: [], + tags: [ + "chat", + "www", + "dev", + "4", + "5", + "6", + "7", + "8", + "9", + ], + max_window_width: None, + layouts: [ + MainAndVertStack, + MainAndHorizontalStack, + /* MainAndDeck, */ + /* GridHorizontal, */ + /* EvenHorizontal, */ + /* EvenVertical, */ + /* Fibonacci, */ + /* LeftMain, */ + /* CenterMain, */ + /* CenterMainBalanced, */ + /* CenterMainFluid, */ + /* Monocle, */ + /* RightWiderLeftStack, */ + /* LeftWiderRightStack, */ + ], + layout_mode: Tag, + insert_behavior: Bottom, + scratchpad: [ + (name: "Alacritty", value: "alacritty", x: 860, y: 390, height: 300, width: 200), + ], + window_rules: [], + 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: "dmenu_run", modifier: ["modkey"], key: "p"), + (command: Execute, value: "alacritty", modifier: ["modkey", "Shift"], key: "Return"), + (command: CloseWindow, value: "", modifier: ["modkey", "Shift"], key: "q"), + (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: "slock", 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"], key: "Return"), + (command: FocusWindowUp, value: "", modifier: ["modkey"], key: "k"), + (command: FocusWindowDown, value: "", modifier: ["modkey"], key: "j"), + (command: NextLayout, value: "", modifier: ["modkey", "Control"], key: "k"), + (command: PreviousLayout, value: "", modifier: ["modkey", "Control"], key: "j"), + (command: FocusWorkspaceNext, value: "", modifier: ["modkey"], key: "l"), + (command: FocusWorkspacePrevious, value: "", modifier: ["modkey"], key: "h"), + (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: ToggleFullScreen, value: "", modifier: ["modkey"], key: "f"), + (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: 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"), + ], + state_path: None, +) diff --git a/leftwm/.config/leftwm/themes.toml b/leftwm/.config/leftwm/themes.toml new file mode 100644 index 0000000..41a7592 --- /dev/null +++ b/leftwm/.config/leftwm/themes.toml @@ -0,0 +1,255 @@ +[[repos]] +url = "https://raw.githubusercontent.com/leftwm/leftwm-community-themes/master/known.toml" +name = "community" +definitions_version = 1 + +[[repos.themes]] +name = "Amber" +repository = "https://github.com/di-effe/amber" +commit = "*" +version = "0.2.2" +leftwm_versions = ">0.2.10, <0.3.0" +current = false + +[[repos.themes]] +name = "arch-one-dark" +directory = "/home/warren/.config/leftwm/themes/arch-one-dark" +repository = "https://github.com/jamesbaker1901/leftwm-arch-one-dark/" +commit = "*" +version = "1.0.0" +leftwm_versions = "^0.3.0" +current = false + +[[repos.themes]] +name = "Ascent" +directory = "/home/warren/.config/leftwm/themes/Ascent" +repository = "https://gitlab.com/mWalrus/ascent" +commit = "*" +version = "1.0.0" +leftwm_versions = ">0.2.7" +current = true + +[[repos.themes]] +name = "Blue Coffee" +directory = "/home/warren/.config/leftwm/themes/Blue Coffee" +repository = "https://github.com/Qwart376/Blue-Coffee/" +commit = "*" +version = "0.0.1" +leftwm_versions = "<0.3.0" +current = false + +[[repos.themes]] +name = "Bumblebee" +repository = "https://github.com/mfdorst/leftwm-bumblebee/" +commit = "*" +version = "0.0.1" +leftwm_versions = "^0.2.8, <0.3.0" +current = false + +[[repos.themes]] +name = "Catppuccin" +repository = "https://github.com/di-effe/catppuccin" +commit = "*" +version = "0.1.1" +leftwm_versions = ">0.2.10, <0.3.0" +current = false + +[[repos.themes]] +name = "Coffee" +repository = "https://github.com/lex148/leftwm-coffee/" +commit = "*" +version = "0.0.1" +leftwm_versions = "<0.3.0" +current = false + +[[repos.themes]] +name = "Desire" +repository = "https://github.com/copypasteonly/Desire" +commit = "*" +version = "0.1" +leftwm_versions = "^0.4.0" +current = false + +[[repos.themes]] +name = "Double Bar" +repository = "https://github.com/PeterDauwe/doublebar/" +commit = "*" +version = "0.0.2" +leftwm_versions = "^0.3.0" +current = false + +[[repos.themes]] +name = "Dracula Rounded" +repository = "https://github.com/AethanFoot/leftwm-theme-dracula-rounded/" +commit = "*" +version = "0.0.3" +leftwm_versions = "^0.3.0" +current = false + +[[repos.themes]] +name = "Epitaph" +repository = "https://github.com/VentGrey/Epitaph" +commit = "*" +version = "0.0.2" +leftwm_versions = "*" +current = false + +[[repos.themes]] +name = "Flamingo" +repository = "https://github.com/necaris/leftwm-theme-flamingo" +commit = "*" +version = "0.0.1" +leftwm_versions = ">0.2.7, <0.3.0" +current = false + +[[repos.themes]] +name = "Forest" +repository = "https://github.com/lex148/forest/" +commit = "*" +version = "0.0.1" +leftwm_versions = "^0.3.0" +current = false + +[[repos.themes]] +name = "Garden" +repository = "https://github.com/taylor85345/leftwm-theme-garden" +commit = "*" +version = "0.0.4" +leftwm_versions = ">0.2.7" +current = false + +[[repos.themes]] +name = "Ground Zero" +repository = "https://github.com/Qwart376/Ground-Zero/" +commit = "*" +version = "0.0.1" +leftwm_versions = "<0.3.0" +current = false + +[[repos.themes]] +name = "minimal-solarized" +repository = "https://github.com/minda1975/minimal_solarized" +commit = "*" +version = "0.1.0" +leftwm_versions = "^0.3.0" +current = false + +[[repos.themes]] +name = "Molese" +repository = "https://github.com/m0lese/leftwm-config" +commit = "*" +version = "2.1.0" +leftwm_versions = ">0.2.10, <0.3.0" +current = false + +[[repos.themes]] +name = "Ocean-night" +repository = "https://github.com/TheRoniOne/ocean-night" +commit = "*" +version = "0.0.1" +leftwm_versions = "*" +current = false + +[[repos.themes]] +name = "Orange Forest" +repository = "https://github.com/PVautour/leftwm-theme-orange-forest/" +commit = "*" +version = "0.0.2" +leftwm_versions = "^0.3.0" +current = false + +[[repos.themes]] +name = "plan9" +repository = "https://github.com/seabassapologist/leftwm-theme-plan9" +commit = "*" +version = "0.1.0" +leftwm_versions = "^0.3.0" +current = false + +[[repos.themes]] +name = "Red Moon" +repository = "https://github.com/Qwart376/Red-Moon" +commit = "*" +version = "0.0.1" +leftwm_versions = "<0.3.0" +current = false + +[[repos.themes]] +name = "Serika" +repository = "https://github.com/VuiMuich/leftwm-theme-serika.git" +commit = "*" +version = "0.0.1" +leftwm_versions = ">=0.3.0" +current = false + +[[repos.themes]] +name = "Soothe" +directory = "/home/warren/.config/leftwm/themes/Soothe" +repository = "https://github.com/b4skyx/leftwm-soothe/" +commit = "*" +version = "0.0.1" +leftwm_versions = "<0.3.0" +current = false +relative_directory = "theme/" + +[[repos.themes]] +name = "SpaceJelly" +repository = "https://gitlab.com/leftwmthemes/space_jelly" +commit = "*" +version = "1.0.0" +leftwm_versions = ">0.2.10, <0.3.0" +current = false + +[[repos.themes]] +name = "sunflower" +repository = "https://github.com/mautamu/leftwm-sunflower/" +commit = "*" +version = "0.1.2" +leftwm_versions = "^0.2.11, <0.3.0" +current = false + +[[repos.themes]] +name = "Sunset" +repository = "https://github.com/Syudagye/leftwm-sunset" +commit = "*" +version = "0.0.1" +leftwm_versions = "<0.3.0" +current = false + +[[repos.themes]] +name = "TNG" +repository = "https://github.com/lex148/leftwm-tng/" +commit = "*" +version = "0.0.1" +leftwm_versions = "<0.3.0" +current = false + +[[repos.themes]] +name = "Windows XP" +repository = "https://github.com/lex148/leftwm-windowsxp/" +commit = "*" +version = "0.0.1" +leftwm_versions = "<0.3.0" +current = false + +[[repos.themes]] +name = "Zexanima" +repository = "https://github.com/calebgasser/zexanima-leftwm-theme/tree/develop" +commit = "*" +version = "0.0.1" +leftwm_versions = ">0.3.0" +current = false + +[[repos.themes]] +name = "Blood-Moon" +repository = "https://github.com/zawesomekid/Blood-Moon-leftwm-theme" +commit = "*" +version = "0.0.1" +leftwm_versions = ">0.3.0" +current = false + +[[repos]] +url = "localhost" +name = "LOCAL" +definitions_version = 1 +themes = [] diff --git a/leftwm/.config/leftwm/themes/Ascent b/leftwm/.config/leftwm/themes/Ascent new file mode 160000 index 0000000..50ffeb8 --- /dev/null +++ b/leftwm/.config/leftwm/themes/Ascent @@ -0,0 +1 @@ +Subproject commit 50ffeb80052dbdfd58e0c5b5185aa877374e74f6 diff --git a/leftwm/.config/leftwm/themes/Blue Coffee b/leftwm/.config/leftwm/themes/Blue Coffee new file mode 160000 index 0000000..b939b71 --- /dev/null +++ b/leftwm/.config/leftwm/themes/Blue Coffee @@ -0,0 +1 @@ +Subproject commit b939b71837a2c1c64c9a612d0fb86e1a693c471c diff --git a/leftwm/.config/leftwm/themes/README.md b/leftwm/.config/leftwm/themes/README.md new file mode 100644 index 0000000..007e680 --- /dev/null +++ b/leftwm/.config/leftwm/themes/README.md @@ -0,0 +1,48 @@ +# Why have themes + +With LeftWM, there are two types of configs: +* **LeftWM Configuration files:** LeftWM configurations are specific to you and don’t change for different themes. These are settings like keybindings, workspace locations, and names of desktops/tags. These settings can be found in `~/.config/leftwm/config.toml`. + +* **Theme Configuration files:** The appearance of your desktop is different. It’s fun to try new looks and feels. It’s fun to tweak and customize the appearance (AKA: [ricing](https://www.reddit.com/r/unixporn/comments/3iy3wd/stupid_question_what_is_ricing/)). It’s fun to share so others can experience your awesome desktop! LeftWM is built around this concept. By pulling all these settings out into themes, you can now easily tweak, switch, and share your experiences. This configuration is spread between `theme.toml` and related files contained within a theme's folder. + + +# We want your themes + +We are looking to expand the list of available themes for an upcoming release. If you enjoy making desktops look good please consider sharing by making a pull request on [the community themes repository](https://github.com/leftwm/leftwm-community-themes). + + +# Requirements for a theme + +A theme has only two requirements. An “up” and a “down” executable/script. They can be written in whatever makes you happy. The up script you guessed it starts up all the things that make your script unique and awesome. The down script restores the environment to an un-themes state. A theme should be self contained if possible so that it can be shared and doesn’t interfere with other themes. For example when booting an application with a config file, put the config file in the theme folder instead of ~/.config. This way other themes can use the same application + + +# Setup / selection of theme + +There are two ways to setup a theme: you can use [leftwm-theme](https://github.com/leftwm/leftwm-theme/) or you can set a symlink yourself. + +## Using LeftWM-theme +Install LeftWM-theme, as per the directions on [its Github](https://github.com/leftwm/leftwm-theme). + +Update your list of themes: +```bash +leftwm-theme update +``` +Install the theme you like: +```bash +leftwm-theme install "THEME NAME GOES HERE" +``` +Apply the theme you like as the current theme: +```bash +leftwm-theme apply "THEME NAME GOES HERE" +``` + +## Using symlinks + +To select a theme all that is required is that it’s located at: `~/.config/leftwm/themes/current` +It is strongly recommended that you do this with a symlink rather than creating a folder. Using a symlink makes it easy to save all your themes in the folder `~/.config/leftwm/themes` and switch between them using a symlink easily. + +The following command would set the included basic_polybar to the current theme: + +```bash +ln -s ~/.config/leftwm/themes/basic_polybar ~/.config/leftwm/themes/current +``` diff --git a/leftwm/.config/leftwm/themes/Soothe b/leftwm/.config/leftwm/themes/Soothe new file mode 160000 index 0000000..a27d123 --- /dev/null +++ b/leftwm/.config/leftwm/themes/Soothe @@ -0,0 +1 @@ +Subproject commit a27d12348489fac04d5790f7043b3eebcaf76950 diff --git a/leftwm/.config/leftwm/themes/arch-one-dark b/leftwm/.config/leftwm/themes/arch-one-dark new file mode 160000 index 0000000..95e0bfb --- /dev/null +++ b/leftwm/.config/leftwm/themes/arch-one-dark @@ -0,0 +1 @@ +Subproject commit 95e0bfb7409d414fa4ea0edcd488704fe8796a07 diff --git a/leftwm/.config/leftwm/themes/basic_eww/README.md b/leftwm/.config/leftwm/themes/basic_eww/README.md new file mode 100644 index 0000000..6786b95 --- /dev/null +++ b/leftwm/.config/leftwm/themes/basic_eww/README.md @@ -0,0 +1,9 @@ +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 legacy eww example was removed here. If you are still using that, pleas refer to the [leftwm-contrib repo](https://github.com/leftwm/leftwm-contrib/tree/main/examples/basic_eww/legacy_eww_xml_config). + +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/leftwm/.config/leftwm/themes/basic_eww/background.jpg b/leftwm/.config/leftwm/themes/basic_eww/background.jpg new file mode 100644 index 0000000..69fa9d0 Binary files /dev/null and b/leftwm/.config/leftwm/themes/basic_eww/background.jpg differ diff --git a/leftwm/.config/leftwm/themes/basic_eww/down b/leftwm/.config/leftwm/themes/basic_eww/down new file mode 100755 index 0000000..0d8c836 --- /dev/null +++ b/leftwm/.config/leftwm/themes/basic_eww/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 + +leftwm-command "UnloadTheme" + +pkill compton +pkill picom +pkill polybar +pkill conky +if [ -x "$(command -v eww)" ]; then + eww kill +fi diff --git a/leftwm/.config/leftwm/themes/basic_eww/down.jpg b/leftwm/.config/leftwm/themes/basic_eww/down.jpg new file mode 100644 index 0000000..da757f7 Binary files /dev/null and b/leftwm/.config/leftwm/themes/basic_eww/down.jpg differ diff --git a/leftwm/.config/leftwm/themes/basic_eww/eww-bar/eww-bar.png b/leftwm/.config/leftwm/themes/basic_eww/eww-bar/eww-bar.png new file mode 100644 index 0000000..e6de6a8 Binary files /dev/null and b/leftwm/.config/leftwm/themes/basic_eww/eww-bar/eww-bar.png differ diff --git a/leftwm/.config/leftwm/themes/basic_eww/eww-bar/eww.scss b/leftwm/.config/leftwm/themes/basic_eww/eww-bar/eww.scss new file mode 100644 index 0000000..b171b8a --- /dev/null +++ b/leftwm/.config/leftwm/themes/basic_eww/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/leftwm/.config/leftwm/themes/basic_eww/eww-bar/eww.yuck b/leftwm/.config/leftwm/themes/basic_eww/eww-bar/eww.yuck new file mode 100644 index 0000000..e8b3751 --- /dev/null +++ b/leftwm/.config/leftwm/themes/basic_eww/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/leftwm/.config/leftwm/themes/basic_eww/eww-bar/scripts/getram b/leftwm/.config/leftwm/themes/basic_eww/eww-bar/scripts/getram new file mode 100755 index 0000000..791a5a5 --- /dev/null +++ b/leftwm/.config/leftwm/themes/basic_eww/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/leftwm/.config/leftwm/themes/basic_eww/eww-bar/scripts/getvol b/leftwm/.config/leftwm/themes/basic_eww/eww-bar/scripts/getvol new file mode 100755 index 0000000..6a95077 --- /dev/null +++ b/leftwm/.config/leftwm/themes/basic_eww/eww-bar/scripts/getvol @@ -0,0 +1,2 @@ +#!/bin/sh +amixer -D pulse sget Master | grep 'Left:' | awk -F'[][]' '{ print $2 }' | tr -d '%' | head -1 diff --git a/leftwm/.config/leftwm/themes/basic_eww/sizes.liquid b/leftwm/.config/leftwm/themes/basic_eww/sizes.liquid new file mode 100644 index 0000000..36f4c00 --- /dev/null +++ b/leftwm/.config/leftwm/themes/basic_eww/sizes.liquid @@ -0,0 +1,3 @@ +{% for workspace in workspaces %} +{{workspace.w}}x{{workspace.h}}+{{workspace.x}}+{{workspace.y}} +{% endfor %} diff --git a/leftwm/.config/leftwm/themes/basic_eww/template.liquid b/leftwm/.config/leftwm/themes/basic_eww/template.liquid new file mode 100644 index 0000000..8e0febe --- /dev/null +++ b/leftwm/.config/leftwm/themes/basic_eww/template.liquid @@ -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 %} +{{unoccupied}}{{workspace.index | append: ' ' | append: tag.index | append: '\"" `'}}{{ "·" }}{{close}} +{% endif %} +{% endfor %} +{{")"}} diff --git a/leftwm/.config/leftwm/themes/basic_eww/theme.ron b/leftwm/.config/leftwm/themes/basic_eww/theme.ron new file mode 100644 index 0000000..5e0dfdc --- /dev/null +++ b/leftwm/.config/leftwm/themes/basic_eww/theme.ron @@ -0,0 +1,6 @@ +(border_width: 1, +margin: 5, +default_border_color: "#37474F", +floating_border_color: "#225588", +focused_border_color: "#885522", +) \ No newline at end of file diff --git a/leftwm/.config/leftwm/themes/basic_eww/up b/leftwm/.config/leftwm/themes/basic_eww/up new file mode 100755 index 0000000..7d45e05 --- /dev/null +++ b/leftwm/.config/leftwm/themes/basic_eww/up @@ -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[@]}" +do + eww open bar$index + let index=index+1 +done diff --git a/leftwm/.config/leftwm/themes/basic_lemonbar/background.jpg b/leftwm/.config/leftwm/themes/basic_lemonbar/background.jpg new file mode 100644 index 0000000..3b35885 Binary files /dev/null and b/leftwm/.config/leftwm/themes/basic_lemonbar/background.jpg differ diff --git a/leftwm/.config/leftwm/themes/basic_lemonbar/change_to_tag b/leftwm/.config/leftwm/themes/basic_lemonbar/change_to_tag new file mode 100755 index 0000000..d652de4 --- /dev/null +++ b/leftwm/.config/leftwm/themes/basic_lemonbar/change_to_tag @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +leftwm-command "SendWorkspaceToTag $1 $2" diff --git a/leftwm/.config/leftwm/themes/basic_lemonbar/down b/leftwm/.config/leftwm/themes/basic_lemonbar/down new file mode 100755 index 0000000..b9fbafe --- /dev/null +++ b/leftwm/.config/leftwm/themes/basic_lemonbar/down @@ -0,0 +1,16 @@ +#!/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 + +leftwm-command "UnloadTheme" + +pkill lemonbar +pkill compton +pkill picom +pkill lemonbar + diff --git a/leftwm/.config/leftwm/themes/basic_lemonbar/down.jpg b/leftwm/.config/leftwm/themes/basic_lemonbar/down.jpg new file mode 100644 index 0000000..da757f7 Binary files /dev/null and b/leftwm/.config/leftwm/themes/basic_lemonbar/down.jpg differ diff --git a/leftwm/.config/leftwm/themes/basic_lemonbar/sizes.liquid b/leftwm/.config/leftwm/themes/basic_lemonbar/sizes.liquid new file mode 100644 index 0000000..1d731bd --- /dev/null +++ b/leftwm/.config/leftwm/themes/basic_lemonbar/sizes.liquid @@ -0,0 +1,3 @@ +{% for workspace in workspaces %} +{{workspace.w}}x{{34}}+{{workspace.x}}+{{workspace.y}} +{% endfor %} diff --git a/leftwm/.config/leftwm/themes/basic_lemonbar/template.liquid b/leftwm/.config/leftwm/themes/basic_lemonbar/template.liquid new file mode 100644 index 0000000..2ff148a --- /dev/null +++ b/leftwm/.config/leftwm/themes/basic_lemonbar/template.liquid @@ -0,0 +1,22 @@ +{% assign mine_open = '%{F#000000}%{B#FFFFFF}' %} +{% assign mine_close = '%{B-}%{F-}' %} +{% assign visible_open = '%{F#000000}%{B#999999}' %} +{% assign visible_close = '%{B-}%{F-}' %} +{% assign busy_open = '%{F#999999}%{B#333333}' %} +{% assign busy_close = '%{B-}%{F-}' %} + +{% for tag in workspace.tags %} +{% if tag.mine %} +{{mine_open}} {{ tag.name }} {{mine_close}} +{% elsif tag.visible %} +{{visible_open}} {{ tag.name }} {{visible_close}} +{% elsif tag.busy %} +{{busy_open}} {{ tag.name }} {{busy_close}} +{% else %} + {{ tag.name }} +{% endif %} +{% endfor %} +%{c} +{{ window_title }} +%{r} +{{ localtime }} diff --git a/leftwm/.config/leftwm/themes/basic_lemonbar/theme.ron b/leftwm/.config/leftwm/themes/basic_lemonbar/theme.ron new file mode 100644 index 0000000..73e73df --- /dev/null +++ b/leftwm/.config/leftwm/themes/basic_lemonbar/theme.ron @@ -0,0 +1,6 @@ +(border_width: 1, +margin: 10, +default_border_color: "#222222", +floating_border_color: "#555555", +focused_border_color: "#AAAAAA", +) \ No newline at end of file diff --git a/leftwm/.config/leftwm/themes/basic_lemonbar/up b/leftwm/.config/leftwm/themes/basic_lemonbar/up new file mode 100755 index 0000000..6a9fdc6 --- /dev/null +++ b/leftwm/.config/leftwm/themes/basic_lemonbar/up @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +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 + + +#boot compton or picom if it exists +if [ -x "$(command -v compton)" ]; then + compton &> /dev/null & +elif [ -x "$(command -v picom)" ]; then + picom &> /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 + + +#boot lemonbar and pipe the status of left into it +sizes=( $(leftwm-state -q -n -t $SCRIPTPATH/sizes.liquid | sed -r '/^\s*$/d') ) + +index=0 +for size in "${sizes[@]}" +do + leftwm-state -w $index -t $SCRIPTPATH/template.liquid | lemonbar -g $size -F#FFFFFFFF -B#AA222222& + let index=index+1 +done + diff --git a/leftwm/.config/leftwm/themes/basic_polybar/README.md b/leftwm/.config/leftwm/themes/basic_polybar/README.md new file mode 100644 index 0000000..ecc1a19 --- /dev/null +++ b/leftwm/.config/leftwm/themes/basic_polybar/README.md @@ -0,0 +1 @@ +I changed the pre-loop section to instead of getting a single monitor, to get all the monitors by removing the grep and tac (which caused monitors to be in reverse order compared to leftwm-state -q -n -t $SCRIPTPATH/sizes.liquid). This is so I can set the monitor variable that's passed to the polybar command to the correct monitor (previously, it only got the first monitor and sent that to each). This fixes the highlighted tag being wrong. I got the correct monitor in-loop by using sed which was already a dependent of this script. However, sed expects it to be indexed at one so I created a new variable for that. I then set the 0-indexed variable at the end to that variable instead of recalculating index+1 (don't know if that's actually faster though). I also changed offsetx=$x to offset=$x since offsetx didn't work for my middle monitor which is index0 and a different size than the others. As far as I know, these changes are only an improvement and shouldn't break old setups. diff --git a/leftwm/.config/leftwm/themes/basic_polybar/background.jpg b/leftwm/.config/leftwm/themes/basic_polybar/background.jpg new file mode 100644 index 0000000..04d5283 Binary files /dev/null and b/leftwm/.config/leftwm/themes/basic_polybar/background.jpg differ diff --git a/leftwm/.config/leftwm/themes/basic_polybar/change_to_tag b/leftwm/.config/leftwm/themes/basic_polybar/change_to_tag new file mode 100755 index 0000000..d652de4 --- /dev/null +++ b/leftwm/.config/leftwm/themes/basic_polybar/change_to_tag @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +leftwm-command "SendWorkspaceToTag $1 $2" diff --git a/leftwm/.config/leftwm/themes/basic_polybar/down b/leftwm/.config/leftwm/themes/basic_polybar/down new file mode 100755 index 0000000..33934df --- /dev/null +++ b/leftwm/.config/leftwm/themes/basic_polybar/down @@ -0,0 +1,15 @@ +#!/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 + +leftwm-command "UnloadTheme" + +pkill compton +pkill picom +pkill polybar + diff --git a/leftwm/.config/leftwm/themes/basic_polybar/down.jpg b/leftwm/.config/leftwm/themes/basic_polybar/down.jpg new file mode 100644 index 0000000..da757f7 Binary files /dev/null and b/leftwm/.config/leftwm/themes/basic_polybar/down.jpg differ diff --git a/leftwm/.config/leftwm/themes/basic_polybar/polybar.config b/leftwm/.config/leftwm/themes/basic_polybar/polybar.config new file mode 100644 index 0000000..9a7f848 --- /dev/null +++ b/leftwm/.config/leftwm/themes/basic_polybar/polybar.config @@ -0,0 +1,447 @@ +;========================================================== +; +; +; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗ +; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗ +; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝ +; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗ +; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║ +; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ +; +; +; To learn more about how to configure Polybar +; go to https://github.com/jaagr/polybar +; +; The README contains a lot of information +; +;========================================================== + +[colors] +background = #99222222 +foreground = #dfdfdf +background-alt = #99444444 +foreground-alt = #FFFFFF +primary = #00ff00 +secondary = #e60053 +alert = #bd2c40 + + +[bar/mainbar0] +inherit = bar/barbase +modules-left = workspace0 +[module/workspace0] +type = custom/script +exec = leftwm-state -w 0 -t $SCRIPTPATH/template.liquid +tail = true + +[bar/mainbar1] +inherit = bar/barbase +modules-left = workspace1 +[module/workspace1] +type = custom/script +exec = leftwm-state -w 1 -t $SCRIPTPATH/template.liquid +tail = true + +[bar/mainbar2] +inherit = bar/barbase +modules-left = workspace2 +[module/workspace2] +type = custom/script +exec = leftwm-state -w 2 -t $SCRIPTPATH/template.liquid +tail = true + +[bar/mainbar3] +inherit = bar/barbase +modules-left = workspace3 +[module/workspace3] +type = custom/script +exec = leftwm-state -w 3 -t $SCRIPTPATH/template.liquid +tail = true + + +[bar/barbase] +width = ${env:width} +offset-x = ${env:offsetx} +monitor = ${env:monitor} +;offset-y = ${env:y} +;width = 100% +height = 27 +fixed-center = false +background = ${colors.background} +foreground = ${colors.foreground} +line-size = 3 +line-color = #f00 +border-size = 0 +border-color = #00000000 +padding-left = 0 +padding-right = 2 +module-margin-left = 1 +module-margin-right = 2 +font-0 = misc fixed:pixelsize=10;1 +font-1 = unifont:fontformat=truetype:size=8:antialias=false;0 +font-2 = wuncon siji:pixelsize=10;1 +modules-center = +modules-right = filesystem xbacklight pulseaudio xkeyboard memory cpu wlan eth battery temperature date powermenu +tray-position = right +tray-padding = 2 +cursor-click = pointer +cursor-scroll = ns-resize + +[module/ewmh] +type = internal/xworkspaces +label-active = " %icon% %name% " +label-active-foreground = ${colors.foreground-alt} +label-active-background = ${colors.background-alt} +label-active-underline = ${colors.primary} +label-occupied = " %icon% %name% " +label-occupied-underline = ${colors.secondary} +label-urgent = " %icon% %name% " +label-urgent-foreground = ${colors.foreground} +label-urgent-background = ${colors.background} +label-urgent-underline = ${colors.alert} +label-empty = " %icon% %name% " +label-empty-foreground = ${colors.foreground} + + +[module/xwindow] +type = internal/xwindow +label = %title:0:30:...% + +[module/xkeyboard] +type = internal/xkeyboard +blacklist-0 = num lock + +format-prefix = " " +format-prefix-foreground = ${colors.foreground-alt} +format-prefix-underline = ${colors.secondary} + +label-layout = %layout% +label-layout-underline = ${colors.secondary} + +label-indicator-padding = 2 +label-indicator-margin = 1 +label-indicator-background = ${colors.secondary} +label-indicator-underline = ${colors.secondary} + +[module/filesystem] +type = internal/fs +interval = 25 + +mount-0 = / + +label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%% +label-unmounted = %mountpoint% not mounted +label-unmounted-foreground = ${colors.foreground-alt} + +[module/bspwm] +type = internal/bspwm + +label-focused = %index% +label-focused-background = ${colors.background-alt} +label-focused-underline= ${colors.primary} +label-focused-padding = 2 + +label-occupied = %index% +label-occupied-padding = 2 + +label-urgent = %index%! +label-urgent-background = ${colors.alert} +label-urgent-padding = 2 + +label-empty = %index% +label-empty-foreground = ${colors.foreground-alt} +label-empty-padding = 2 + +; Separator in between workspaces +; label-separator = | + +[module/i3] +type = internal/i3 +format = +index-sort = true +wrapping-scroll = false + +; Only show workspaces on the same output as the bar +;pin-workspaces = true + +label-mode-padding = 2 +label-mode-foreground = #000 +label-mode-background = ${colors.primary} + +; focused = Active workspace on focused monitor +label-focused = %index% +label-focused-background = ${module/bspwm.label-focused-background} +label-focused-underline = ${module/bspwm.label-focused-underline} +label-focused-padding = ${module/bspwm.label-focused-padding} + +; unfocused = Inactive workspace on any monitor +label-unfocused = %index% +label-unfocused-padding = ${module/bspwm.label-occupied-padding} + +; visible = Active workspace on unfocused monitor +label-visible = %index% +label-visible-background = ${self.label-focused-background} +label-visible-underline = ${self.label-focused-underline} +label-visible-padding = ${self.label-focused-padding} + +; urgent = Workspace with urgency hint set +label-urgent = %index% +label-urgent-background = ${module/bspwm.label-urgent-background} +label-urgent-padding = ${module/bspwm.label-urgent-padding} + +; Separator in between workspaces +; label-separator = | + + +[module/mpd] +type = internal/mpd +format-online = + +icon-prev =  +icon-stop =  +icon-play =  +icon-pause =  +icon-next =  + +label-song-maxlen = 25 +label-song-ellipsis = true + +[module/xbacklight] +type = internal/xbacklight + +format =