From 248ec8fd2647ec7f450066813755bfeebcf8cb32 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Mon, 22 Jan 2024 06:28:52 -0600 Subject: [PATCH] add old qtile configs --- .../eww/bin/executable_bluetooth.sh | 10 + .../eww/bin/executable_check-arch-updates.sh | 11 + .../eww/bin/executable_check-aur-updates.sh | 9 + .../eww/bin/executable_getwifi | 13 + .../eww/bin/executable_volume | 86 ++++ home/private_dot_config/eww/bin/hyprstate.nim | 85 ++++ home/private_dot_config/eww/eww.scss | 124 ++++++ home/private_dot_config/eww/eww.yuck | 3 + .../eww/scss/Catppuccin.scss | 25 ++ home/private_dot_config/eww/yuck/vars.yuck | 9 + home/private_dot_config/eww/yuck/widgets.yuck | 160 ++++++++ home/private_dot_config/eww/yuck/windows.yuck | 41 ++ home/private_dot_config/hypr/hyprland.conf | 83 ++++ home/private_dot_config/hypr/hyprpaper.conf | 5 + home/private_dot_config/hypr/keys.conf | 63 +++ home/private_dot_config/hypr/windows.conf | 1 + .../rofi/bin/executable_bluetooth.sh | 372 ++++++++++++++++++ .../rofi/bin/executable_colors.sh | 6 + .../rofi/bin/executable_confirm.sh | 9 + .../rofi/bin/executable_dqtile-cmd | 66 ++++ .../rofi/bin/executable_launcher.sh | 4 + .../rofi/bin/executable_powermenu.sh | 79 ++++ .../rofi/bin/executable_ssh.sh | 4 + .../rofi/bin/executable_windows.sh | 4 + .../rofi/styles/bluetooth.rasi | 32 ++ .../rofi/styles/colors.rasi | 13 + .../rofi/styles/confirm.rasi | 46 +++ .../rofi/styles/default.rasi | 55 +++ .../rofi/styles/dqtile.rasi | 38 ++ .../rofi/styles/keymap.rasi | 48 +++ .../rofi/styles/launcher.rasi | 29 ++ .../rofi/styles/message.rasi | 8 + .../rofi/styles/powermenu.rasi | 50 +++ .../rofi/styles/windows.rasi | 7 + 34 files changed, 1598 insertions(+) create mode 100644 home/private_dot_config/eww/bin/executable_bluetooth.sh create mode 100644 home/private_dot_config/eww/bin/executable_check-arch-updates.sh create mode 100644 home/private_dot_config/eww/bin/executable_check-aur-updates.sh create mode 100644 home/private_dot_config/eww/bin/executable_getwifi create mode 100644 home/private_dot_config/eww/bin/executable_volume create mode 100644 home/private_dot_config/eww/bin/hyprstate.nim create mode 100644 home/private_dot_config/eww/eww.scss create mode 100644 home/private_dot_config/eww/eww.yuck create mode 100644 home/private_dot_config/eww/scss/Catppuccin.scss create mode 100644 home/private_dot_config/eww/yuck/vars.yuck create mode 100644 home/private_dot_config/eww/yuck/widgets.yuck create mode 100644 home/private_dot_config/eww/yuck/windows.yuck create mode 100644 home/private_dot_config/hypr/hyprland.conf create mode 100644 home/private_dot_config/hypr/hyprpaper.conf create mode 100644 home/private_dot_config/hypr/keys.conf create mode 100644 home/private_dot_config/hypr/windows.conf create mode 100644 home/private_dot_config/rofi/bin/executable_bluetooth.sh create mode 100644 home/private_dot_config/rofi/bin/executable_colors.sh create mode 100644 home/private_dot_config/rofi/bin/executable_confirm.sh create mode 100644 home/private_dot_config/rofi/bin/executable_dqtile-cmd create mode 100644 home/private_dot_config/rofi/bin/executable_launcher.sh create mode 100644 home/private_dot_config/rofi/bin/executable_powermenu.sh create mode 100644 home/private_dot_config/rofi/bin/executable_ssh.sh create mode 100644 home/private_dot_config/rofi/bin/executable_windows.sh create mode 100644 home/private_dot_config/rofi/styles/bluetooth.rasi create mode 100644 home/private_dot_config/rofi/styles/colors.rasi create mode 100644 home/private_dot_config/rofi/styles/confirm.rasi create mode 100644 home/private_dot_config/rofi/styles/default.rasi create mode 100644 home/private_dot_config/rofi/styles/dqtile.rasi create mode 100644 home/private_dot_config/rofi/styles/keymap.rasi create mode 100644 home/private_dot_config/rofi/styles/launcher.rasi create mode 100644 home/private_dot_config/rofi/styles/message.rasi create mode 100644 home/private_dot_config/rofi/styles/powermenu.rasi create mode 100644 home/private_dot_config/rofi/styles/windows.rasi diff --git a/home/private_dot_config/eww/bin/executable_bluetooth.sh b/home/private_dot_config/eww/bin/executable_bluetooth.sh new file mode 100644 index 0000000..e9d1a54 --- /dev/null +++ b/home/private_dot_config/eww/bin/executable_bluetooth.sh @@ -0,0 +1,10 @@ +#!/bin/sh +if [ "$(bluetoothctl show | grep "Powered: yes" | wc -c)" -eq 0 ]; then + echo "󰂲" +else + if [ "$(bluetoothctl devices Connected | wc -c)" -eq 0 ]; then + echo "" + else + echo "󰂱" + fi +fi diff --git a/home/private_dot_config/eww/bin/executable_check-arch-updates.sh b/home/private_dot_config/eww/bin/executable_check-arch-updates.sh new file mode 100644 index 0000000..961c39f --- /dev/null +++ b/home/private_dot_config/eww/bin/executable_check-arch-updates.sh @@ -0,0 +1,11 @@ +#!/bin/sh +#source https://github.com/x70b1/polybar-scripts +#source https://github.com/polybar/polybar-scripts + +if ! updates_arch=$(checkupdates 2>/dev/null | wc -l); then + updates_arch=0 +fi + +if [ $updates_arch -gt 0 ]; then + echo "Arch: $updates_arch" +fi diff --git a/home/private_dot_config/eww/bin/executable_check-aur-updates.sh b/home/private_dot_config/eww/bin/executable_check-aur-updates.sh new file mode 100644 index 0000000..aa51535 --- /dev/null +++ b/home/private_dot_config/eww/bin/executable_check-aur-updates.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +if ! updates_aur=$(($(pikaur -Qua 2>/dev/null | wc -l) - 1)); then + updates_aur=0 +fi + +if [ $updates_aur -gt 0 ]; then + echo "Aur: ${updates_aur}" +fi diff --git a/home/private_dot_config/eww/bin/executable_getwifi b/home/private_dot_config/eww/bin/executable_getwifi new file mode 100644 index 0000000..a385ab4 --- /dev/null +++ b/home/private_dot_config/eww/bin/executable_getwifi @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +# nmcli -f IN-USE,SIGNAL,SSID device wifi | awk '/^\*/{if (NR!=1) {print $2}}' +# nmcli con show --active +get-network() { + nmcli --get-values name,type con show --active +} +wifi=$(get-network | grep "wireless") +ethernet=$(get-network | grep "ethernet") +if [[ -n $ethernet ]]; then + echo 'ethernet' +elif [[ -n $wifi ]]; then + echo $wifi | sed 's/:.*//' +fi diff --git a/home/private_dot_config/eww/bin/executable_volume b/home/private_dot_config/eww/bin/executable_volume new file mode 100644 index 0000000..4c40276 --- /dev/null +++ b/home/private_dot_config/eww/bin/executable_volume @@ -0,0 +1,86 @@ +#!/usr/bin/env bash +# https://raw.githubusercontent.com/adi1090x/widgets/main/eww/arin/scripts/volume +# add commit info +# Get Volume + +get_volume() { + status=$(pamixer --get-mute) + + if [[ $status == "false" ]]; then + volume=$(pamixer --get-volume-human) + echo "$volume" + else + echo "Mute" + fi +} + +# Get icons +get_icon() { + vol="$(get_volume)" + + if [[ $vol == "Mute" ]]; then + echo "󰖁" + else + echo "󰕾" + fi +} + +# Increase Volume +inc_volume() { + pamixer --increase 5 +} + +# Decrease Volume +dec_volume() { + pamixer --decrease 5 +} + +# Toggle Mute +toggle_mute() { + pamixer --toggle-mute +} + +usage() { + cat <&2 "Rofi or dmenu not found" + exit +fi + +action_info=$? # get the return code from rofi + +action=$(echo "$action" | cut -f 1 | sed -e 's/ *$//g') + +# if kb-mod-1 key was pressed in rofi +if [ "$action_info" -eq "10" ]; then + # only run when -f is present (then -i makes sense) + if [[ $action == *"-f"* ]]; then + info=$(qtile cmd-obj $action -i) + action=$($menu -mesg "$global_mesg +Help +$info" -filter "$action -a ") + fi +fi + +case $action in +"") ;; # exit +..) $0 ;; # Go back to main menu +*) $0 "$action" ;; +esac diff --git a/home/private_dot_config/rofi/bin/executable_launcher.sh b/home/private_dot_config/rofi/bin/executable_launcher.sh new file mode 100644 index 0000000..196f620 --- /dev/null +++ b/home/private_dot_config/rofi/bin/executable_launcher.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +styles="$(dirname $(which $0))/../styles" +rofi -show drun -show-icons -theme $styles/launcher.rasi diff --git a/home/private_dot_config/rofi/bin/executable_powermenu.sh b/home/private_dot_config/rofi/bin/executable_powermenu.sh new file mode 100644 index 0000000..5b35a09 --- /dev/null +++ b/home/private_dot_config/rofi/bin/executable_powermenu.sh @@ -0,0 +1,79 @@ +#!/usr/bin/env bash + +styles="$(dirname $(which $0))/../styles" +rofi_command="rofi -theme $styles/powermenu.rasi" + +#### Options ### +shutdown="" +reboot="" +lock="" +suspend="" +logout="󰗼" + +options="$shutdown\n$reboot\n$lock\n$suspend\n$logout" + +uptime=$(uptime | sed -e 's/up //g') + +confirm_exit() { + "$(dirname $(which $0))/confirm.sh" +} + +# Message +msg() { + rofi -theme "$styles/message.rasi" -e "Available Options - yes / y / no / n" +} + +chosen="$(echo -e "$options" | $rofi_command -p "󱎫 $uptime " -dmenu -selected-row 2)" +case $chosen in +$lock) + if [[ -f $HOME/bin/lock ]]; then + $HOME/bin/lock + elif [[ -f /usr/bin/i3lock ]]; then + i3lock + elif [[ -f /usr/bin/dm-tool ]]; then + dm-tool "lock" + fi + ;; +$shutdown) + ans=$(confirm_exit &) + if [[ $ans == "yes" ]]; then + systemctl poweroff + elif [[ $ans == "no" ]]; then + exit 0 + else + msg + fi + ;; +$reboot) + ans=$(confirm_exit &) + if [[ $ans == "yes" ]]; then + systemctl reboot + elif [[ $ans == "no" ]]; then + exit 0 + else + msg + fi + ;; +$suspend) + ans=$(confirm_exit &) + if [[ $ans == "yes" ]]; then + mpc -q pause + amixer set Master mute + systemctl suspend + elif [[ $ans == "no" ]]; then + exit 0 + else + msg + fi + ;; +$logout) + ans=$(confirm_exit &) + if [[ $ans == "yes" || $ans == "y" ]]; then + loginctl terminate-session ${XDG_SESSION_ID-} + elif [[ $ans == "no" || $ans == "n" ]]; then + exit 0 + else + msg + fi + ;; +esac diff --git a/home/private_dot_config/rofi/bin/executable_ssh.sh b/home/private_dot_config/rofi/bin/executable_ssh.sh new file mode 100644 index 0000000..6368b3c --- /dev/null +++ b/home/private_dot_config/rofi/bin/executable_ssh.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +styles="$(dirname $(which $0))/../styles" +rofi -show ssh -theme $styles/launcher.rasi -disable-history -no-parse-known-hosts diff --git a/home/private_dot_config/rofi/bin/executable_windows.sh b/home/private_dot_config/rofi/bin/executable_windows.sh new file mode 100644 index 0000000..3e7fb3b --- /dev/null +++ b/home/private_dot_config/rofi/bin/executable_windows.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +styles="$(dirname $(which $0))/../styles" +rofi -show window -theme $styles/windows.rasi diff --git a/home/private_dot_config/rofi/styles/bluetooth.rasi b/home/private_dot_config/rofi/styles/bluetooth.rasi new file mode 100644 index 0000000..6453665 --- /dev/null +++ b/home/private_dot_config/rofi/styles/bluetooth.rasi @@ -0,0 +1,32 @@ +@import "default.rasi" +@import "colors.rasi" + +mainbox { + padding: 12px; +} + +inputbar { + background-color: @background; + border-color: @primary; + border: 2px; + border-radius: 4px; + padding: 8px 16px; + spacing: 8px; + children: [ prompt, entry ]; +} + +entry { + placeholder: "search"; +} + +listview { + margin: 12px 0 0; + lines: 8; + columns: 1; + fixed-height: false; +} + +element { + padding: 8px 16px; + border-radius: 4px; +} diff --git a/home/private_dot_config/rofi/styles/colors.rasi b/home/private_dot_config/rofi/styles/colors.rasi new file mode 100644 index 0000000..f8eadb2 --- /dev/null +++ b/home/private_dot_config/rofi/styles/colors.rasi @@ -0,0 +1,13 @@ +@import "~/.config/qtile/colors/colors.rasi" + +/* default colors */ + +* { + background: #1E1E2E; + background-light:#313244; + background-dark: #11111b; + foreground: #cdd6f4; + foreground-light: #6c7086; + border-color: @bordercolor; + primary: var(theme-primary, #fab387); +} diff --git a/home/private_dot_config/rofi/styles/confirm.rasi b/home/private_dot_config/rofi/styles/confirm.rasi new file mode 100644 index 0000000..df00f7b --- /dev/null +++ b/home/private_dot_config/rofi/styles/confirm.rasi @@ -0,0 +1,46 @@ +@import "default.rasi" +@import "colors.rasi" + +configuration { + disable-history: false; + sidebar-mode: false; + show-icons: false; +} + +window { + width: 500px; +} + +listview { + columns: 2; + lines: 1; + spacing: 12px; + cycle: true; + layout: vertical; +} + +textbox-custom { + expand: false; + content: "Are you Sure?"; + padding: 10px; + border: 2px; + border-radius: 10px; + border-color:@primary; +} + +mainbox { + orientation: horizontal; + children: [ textbox-custom,listview ]; + spacing: 20px; + margin: 20px; +} + +element { + background-color: @background-light; + border-radius: 4px; +} + +element-text { + horizontal-align: 0.5; + margin: 10px 5px; +} diff --git a/home/private_dot_config/rofi/styles/default.rasi b/home/private_dot_config/rofi/styles/default.rasi new file mode 100644 index 0000000..8d80af2 --- /dev/null +++ b/home/private_dot_config/rofi/styles/default.rasi @@ -0,0 +1,55 @@ +* { + small-font: "FiraCode Nerd Font Propo 12"; + big-font: "FiraCode Nerd Font Propo 50"; + font: @small-font; + background-color: transparent; + text-color: @foreground; + margin: 0px; + padding: 0px; + spacing: 0px; +} + +window { + border-radius: 4px; + location: center; + width: 30%; + background-color: @background; + border: 2px; + border-color:@theme-primary; +} + +inputbar { + background-color: @background; + border-color: @primary; + + border: 2px; + border-radius: 4px; + + padding: 8px 16px; + spacing: 8px; + children: [ prompt, entry ]; +} + +prompt { + text-color: @foreground; +} + +entry { + placeholder-color: @foreground-light; +} + +element selected, +element selected normal, +element selected active { + text-color: @background; + background-color: @primary; +} + +element-text { + text-color: inherit; +} + +element-icon { + size: 1em; + vertical-align: 0.5; +} diff --git a/home/private_dot_config/rofi/styles/dqtile.rasi b/home/private_dot_config/rofi/styles/dqtile.rasi new file mode 100644 index 0000000..1e14e1a --- /dev/null +++ b/home/private_dot_config/rofi/styles/dqtile.rasi @@ -0,0 +1,38 @@ +@import "default.rasi" +@import "colors.rasi" + +window { + border-radius: 4px; + location: center; + width: 60%; + background-color: @background; + border: 2px; + border-color:@theme-primary; +} + +// TODO: add dotted item seperator? + +mainbox { + padding: 12px; +} + +entry { + placeholder-color: @foreground-light; +} + +listview { + lines: 20; + fixed-height: false; +} + + +element { + padding: 2px 16px; + spacing: 8px; + border-radius: 4px; +} + +element-icon { + size: 1em; + vertical-align: 0.5; +} diff --git a/home/private_dot_config/rofi/styles/keymap.rasi b/home/private_dot_config/rofi/styles/keymap.rasi new file mode 100644 index 0000000..dd36497 --- /dev/null +++ b/home/private_dot_config/rofi/styles/keymap.rasi @@ -0,0 +1,48 @@ +@import "default.rasi" +@import "colors.rasi" + +window { + width: 50%; + } + +inputbar { + border: 0 0 1px 0; + children: [prompt, entry]; +} + +prompt { + padding: 10px; + background-color: @primary; + text-color: @background; + font-weight: bold; + border: 0 1px 0 0; +} + +textbox { + padding: 8px 16px; +} + +entry { + padding: 10px; +} + +listview { + cycle: false; + margin: 10 10 10 10; + scrollbar: false; +} + +element { + border: 1; + padding: 5px; +} + +element-text { + background-color: inherit; + text-color: inherit; +} + +element selected { + background-color: @primary; + text-color: @background; +} diff --git a/home/private_dot_config/rofi/styles/launcher.rasi b/home/private_dot_config/rofi/styles/launcher.rasi new file mode 100644 index 0000000..bc57876 --- /dev/null +++ b/home/private_dot_config/rofi/styles/launcher.rasi @@ -0,0 +1,29 @@ +@import "default.rasi" +@import "colors.rasi" + +mainbox { + padding: 12px; +} + +entry { + placeholder: "search"; + placeholder-color: @foreground-light; +} + +listview { + margin: 12px 0 0; + lines: 8; + columns: 1; + fixed-height: false; +} + +element { + padding: 8px 16px; + spacing: 8px; + border-radius: 4px; +} + +element-icon { + size: 1em; + vertical-align: 0.5; +} diff --git a/home/private_dot_config/rofi/styles/message.rasi b/home/private_dot_config/rofi/styles/message.rasi new file mode 100644 index 0000000..aa2a18a --- /dev/null +++ b/home/private_dot_config/rofi/styles/message.rasi @@ -0,0 +1,8 @@ +/* Confirm Dialog */ +@import "default.rasi" +@import "colors.rasi" + + +window { + padding: 25px; +} diff --git a/home/private_dot_config/rofi/styles/powermenu.rasi b/home/private_dot_config/rofi/styles/powermenu.rasi new file mode 100644 index 0000000..90492ff --- /dev/null +++ b/home/private_dot_config/rofi/styles/powermenu.rasi @@ -0,0 +1,50 @@ +@import "default.rasi" +@import "colors.rasi" + +configuration { + disable-history: false; + sidebar-mode: false; + show-icons: false; +} + +window { + width: 800px; +} + +prompt { + enabled: true; + padding: 10px; + background-color: @background-dark; + text-color: @primary; + border: 0px 2px 0px 2px; + border-radius: 10px; + border-color: @primary; +} + +listview { + columns: 5; + lines: 1; + spacing: 12px; + cycle: true; + dynamic: true; + layout: vertical; +} + +mainbox { + children: [ prompt, listview ]; + spacing: 20px; + margin: 20px; +} + +element { + background-color: @background-dark; + border-radius: 10px; +} + +element-text { + font: @big-font; + background-color: inherit; + text-color: inherit; + horizontal-align: 0.5; + margin: 20px; +} diff --git a/home/private_dot_config/rofi/styles/windows.rasi b/home/private_dot_config/rofi/styles/windows.rasi new file mode 100644 index 0000000..ec3694a --- /dev/null +++ b/home/private_dot_config/rofi/styles/windows.rasi @@ -0,0 +1,7 @@ +@import "default.rasi" +@import "colors.rasi" +@import "launcher.rasi" + +window { + width: 60%; +}