├── README.md ├── kitty.conf ├── new_eww ├── config.yuck ├── eww.scss ├── eww.yuck ├── images │ ├── endeavouros-icon.png │ ├── gab.png │ └── music.png ├── scripts │ ├── _not_used │ │ ├── _time.py │ │ ├── _workspaces.py │ │ └── _workspaces.sh │ ├── audio.sh │ ├── battery.sh │ ├── bluetooth.sh │ ├── cava │ │ ├── cava_pipe.sh │ │ └── config │ ├── chcolor.sh │ ├── client_list │ │ ├── client_list.py │ │ └── manage_eww_json.sh │ ├── convert_images │ │ ├── convert_images.py │ │ ├── images │ │ │ ├── currentwall │ │ │ │ └── res.png │ │ │ └── mpris │ │ │ │ └── res.png │ │ └── mpris_blur.sh │ ├── desktop_apps │ │ ├── manage_apps.py │ │ └── manage_eww_json.sh │ ├── desktop_view │ │ ├── _json │ │ │ └── img_path.json │ │ ├── _main │ │ ├── _main.c │ │ ├── images │ │ │ ├── 14680078.jpg │ │ │ ├── 16777230.jpg │ │ │ ├── 18874382.jpg │ │ │ └── 25165838.jpg │ │ ├── log.txt │ │ ├── main.py │ │ ├── manage_images.sh │ │ └── manage_windows.sh │ ├── display.sh │ ├── fet.sh │ ├── launcher │ │ ├── launch_center_dmenu.sh │ │ ├── launch_left_widget.sh │ │ ├── launch_right_mplayer.sh │ │ ├── launch_right_notifpop.sh │ │ └── launch_top_bar.sh │ ├── manage_power.sh │ ├── mpris.sh │ ├── network.sh │ ├── rev_sw │ │ ├── rev_sw_center_dmenu.sh │ │ └── rev_sw_top_bar.sh │ ├── rice_changer │ │ ├── chcolor.sh │ │ ├── json │ │ │ └── riceset.json │ │ ├── manage_eww_colors.sh │ │ ├── manage_eww_index.sh │ │ ├── manage_eww_json.sh │ │ ├── rice_changer.py │ │ └── wallpaper.sh │ ├── screenshot.sh │ ├── wallpaper.sh │ ├── weather.sh │ ├── workspace │ │ ├── main │ │ └── main.c │ └── workspaces.sh ├── scss │ ├── colors │ │ ├── calm_blue.scss │ │ ├── calm_pink.scss │ │ ├── patch.scss │ │ ├── rust.scss │ │ ├── soft_blue.scss │ │ └── soft_purple.scss │ └── normal_css │ │ ├── _style_bottom_bar.scss │ │ ├── _style_center_dmenu.scss │ │ ├── _style_left_widget.scss │ │ ├── _style_right_mplayer.scss │ │ ├── _style_right_notifpop.scss │ │ └── _style_top_bar.scss ├── variables.yuck ├── windows.yuck └── yuck │ ├── modules │ ├── bottom_bar │ │ └── module_bottom_bar_dock_center.yuck │ ├── center_dashboard │ │ └── module_center_dashboard_rice_changer.yuck │ ├── center_dmenu │ │ └── module_center_dmenu_gamepad.yuck │ ├── left_widget │ │ ├── module_left_widget_bluetooth.yuck │ │ ├── module_left_widget_clock.yuck │ │ ├── module_left_widget_lan.yuck │ │ ├── module_left_widget_profile.yuck │ │ ├── module_left_widget_sysinfo.yuck │ │ └── module_left_widget_weather.yuck │ ├── right_mplayer │ │ └── module_right_mplayer_uwustagram.yuck │ ├── right_notifpop │ │ ├── module_right_notifpop_bg.yuck │ │ └── module_right_notifpop_fg.yuck │ └── top_bar │ │ ├── module_top_bar_bar_center.yuck │ │ ├── module_top_bar_bar_left.yuck │ │ └── module_top_bar_bar_right.yuck │ └── widgets │ ├── widget_bottom_bar.yuck │ ├── widget_center_dashboard.yuck │ ├── widget_center_dmenu.yuck │ ├── widget_left_widget.yuck │ ├── widget_right_mplayer.yuck │ ├── widget_right_notifpop.yuck │ └── widget_top_bar.yuck ├── old_eww ├── bar │ ├── eww.scss │ ├── eww.yuck │ ├── eww_variables.yuck │ ├── eww_widgets.yuck │ ├── eww_windows.yuck │ ├── images │ │ ├── gab.png │ │ └── musical-note.png │ ├── launch.sh │ └── scripts │ │ ├── battery.sh │ │ ├── bluetooth.sh │ │ ├── brightness.sh │ │ ├── music.sh │ │ ├── network.sh │ │ ├── screenshot.sh │ │ ├── volume.sh │ │ └── workspaces.sh ├── minimal-bar │ ├── eww.scss │ ├── eww.yuck │ ├── eww_variables.yuck │ ├── eww_widgets.yuck │ ├── eww_windows.yuck │ ├── launch.sh │ └── scripts │ │ ├── battery.sh │ │ ├── music.sh │ │ └── workspaces.sh └── popup │ ├── eww.scss │ ├── eww.yuck │ ├── eww_windows.yuck │ ├── launch.sh │ └── modules │ ├── gnome_widget.yuck │ ├── music.yuck │ ├── powermenu.yuck │ └── ssmenu.yuck ├── scripts ├── rand_wall.sh └── ss.sh ├── vimrc └── xmonad.hs /README.md: -------------------------------------------------------------------------------- 1 | # XMonad + Eww 🌸 2 | 3 | you are allowed to steal everything uwu* 4 | 5 | [new version] 6 | https://www.reddit.com/r/unixporn/s/Aney9YPD3a 7 | ![image](https://github.com/Tail-R/xmonad_eww_dotfiles/assets/132870183/95fea5d7-28c2-442e-af79-25a2f5a93587) 8 | 9 | [old version] 10 | https://www.reddit.com/r/unixporn/s/Rd9LsEZuZS 11 | ![image](https://github.com/Tail-R/xmonad_eww_dotfiles/assets/132870183/ce5286a3-2f4f-40b4-8d9b-c4d8c13d342c) 12 | 13 | -------------------------------------------------------------------------------- /kitty.conf: -------------------------------------------------------------------------------- 1 | # Font config 2 | # font_family Inconsolata 3 | font_family Hack 4 | font_size 12.5 5 | 6 | # General 7 | mouse_hide_wait 2.0 8 | confirm_os_window_close 0 9 | window_padding_width 10 10 | 11 | # Color schemes 12 | background_opacity 1 13 | 14 | foreground #fadee1 15 | background #32322e 16 | 17 | selection_background #545454 18 | selection_foreground #fadee1 19 | 20 | cursor #fec9cb 21 | 22 | # pink version 23 | color0 #fadee1 24 | color8 #fadee1 25 | 26 | color1 #fdafab 27 | color9 #fdafab 28 | 29 | color2 #f6baba 30 | color10 #f6baba 31 | 32 | color3 #e89292 33 | color11 #e89292 34 | 35 | color4 #fec9cb 36 | color12 #fec9cb 37 | 38 | color5 #fea4b0 39 | color13 #fea4b0 40 | 41 | color6 #f38d98 42 | color14 #f38d98 43 | 44 | color7 #f282a7 45 | color15 #f282a7 46 | 47 | 48 | 49 | 50 | # # black 51 | # color0 #645454 52 | # color8 #645454 53 | # 54 | # # orange 55 | # color1 #efb286 56 | # color9 #efb286 57 | # 58 | # # green 59 | # color2 #6bdbca 60 | # color10 #6bdbca 61 | # 62 | # # yellow 63 | # color3 #efeda4 64 | # color11 #efeda4 65 | # 66 | # # pink 67 | # color4 #f290c2 68 | # color12 #f290c2 69 | # 70 | # # purple 71 | # color5 #a68bcf 72 | # color13 #a68bcf 73 | # 74 | # # blue 75 | # color6 #6dc2e9 76 | # color14 #6dc2e9 77 | # 78 | # # white 79 | # color7 #ece0ec 80 | # color15 #ece0ec 81 | -------------------------------------------------------------------------------- /new_eww/config.yuck: -------------------------------------------------------------------------------- 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2 | ;; This is a ".yuck" file for the eww configuration 3 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 4 | 5 | ;; ***** User variables ********************************************** 6 | ;; Profile 7 | (defvar PF_FACE "images/gab.png") 8 | (defpoll PF_NAME :interval "1h" "echo $USER") 9 | 10 | ; ;; Display size 11 | ; (defvar DP_WIDTH "1920") 12 | ; (defvar DP_HEIGHT "1200") 13 | 14 | ;; Automaticary detect the primary mointor size 15 | (defpoll DP_WIDTH :interval "1h" 16 | "scripts/display.sh --get_dp_width") 17 | 18 | (defpoll DP_HEIGHT :interval "1h" 19 | "scripts/display.sh --get_dp_height") 20 | 21 | ;; Distro logo 22 | (defvar DISTRO_LOGO "images/endeavouros-icon.png") 23 | 24 | ;; Default apps name 25 | (defvar _TERMINAL "kitty") 26 | (defvar _BROWSER "firefox") 27 | 28 | ;; ***** Dependency list ******************************************** 29 | (defvar _DEPENDENCY_LIST 30 | " 31 | source-code-font 32 | nerd-font 33 | 34 | xdotool 35 | xprop 36 | wmctrl 37 | feh 38 | maim 39 | acpi 40 | pamixer 41 | 42 | networkmanager 43 | iw 44 | nmcli 45 | 46 | brightnessctl 47 | playerctl 48 | 49 | python-opencv 50 | " 51 | ) 52 | 53 | 54 | -------------------------------------------------------------------------------- /new_eww/eww.scss: -------------------------------------------------------------------------------- 1 | * { 2 | all: unset; 3 | font-family: "Source Code"; 4 | } 5 | 6 | /***** Color scheme *************************************************/ 7 | // @import 'scss/color.scss' 8 | @import 'scss/colors/calm_pink.scss' 9 | 10 | /***** Style ********************************************************/ 11 | @import 'scss/normal_css/_style_top_bar.scss' 12 | @import 'scss/normal_css/_style_bottom_bar.scss' 13 | @import 'scss/normal_css/_style_left_widget.scss' 14 | @import 'scss/normal_css/_style_right_mplayer.scss' 15 | @import 'scss/normal_css/_style_right_notifpop.scss' 16 | @import 'scss/normal_css/_style_center_dmenu.scss' 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /new_eww/eww.yuck: -------------------------------------------------------------------------------- 1 | ;; ***** Variables ***** 2 | (include "variables.yuck") 3 | (include "config.yuck") 4 | 5 | ;; ***** Windows ***** 6 | (include "windows.yuck") 7 | 8 | ;; ***** Widgets ***** 9 | (include "yuck/widgets/widget_top_bar.yuck") 10 | (include "yuck/widgets/widget_bottom_bar.yuck") 11 | (include "yuck/widgets/widget_left_widget.yuck") 12 | (include "yuck/widgets/widget_right_mplayer.yuck") 13 | (include "yuck/widgets/widget_right_notifpop.yuck") 14 | (include "yuck/widgets/widget_center_dmenu.yuck") 15 | 16 | ;; ***** Modules ***** 17 | 18 | ;; Top bar 19 | (include "yuck/modules/top_bar/module_top_bar_bar_left.yuck") 20 | (include "yuck/modules/top_bar/module_top_bar_bar_center.yuck") 21 | (include "yuck/modules/top_bar/module_top_bar_bar_right.yuck") 22 | 23 | ;; Bottom bar 24 | (include "yuck/modules/bottom_bar/module_bottom_bar_dock_center.yuck") 25 | 26 | ;; Left widget 27 | (include "yuck/modules/left_widget/module_left_widget_clock.yuck") 28 | (include "yuck/modules/left_widget/module_left_widget_weather.yuck") 29 | (include "yuck/modules/left_widget/module_left_widget_profile.yuck") 30 | (include "yuck/modules/left_widget/module_left_widget_sysinfo.yuck") 31 | (include "yuck/modules/left_widget/module_left_widget_lan.yuck") 32 | (include "yuck/modules/left_widget/module_left_widget_bluetooth.yuck") 33 | 34 | ;; Right mplayer 35 | (include "yuck/modules/right_mplayer/module_right_mplayer_uwustagram.yuck") 36 | 37 | ;; Right notifpop 38 | (include "yuck/modules/right_notifpop/module_right_notifpop_bg.yuck") 39 | (include "yuck/modules/right_notifpop/module_right_notifpop_fg.yuck") 40 | 41 | ;; Center dmenu 42 | (include "yuck/modules/center_dmenu/module_center_dmenu_gamepad.yuck") 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /new_eww/images/endeavouros-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tail-R/xmonad_eww_dotfiles/6888e82c377fb16d67fa4741f5fabd6ffdf5225a/new_eww/images/endeavouros-icon.png -------------------------------------------------------------------------------- /new_eww/images/gab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tail-R/xmonad_eww_dotfiles/6888e82c377fb16d67fa4741f5fabd6ffdf5225a/new_eww/images/gab.png -------------------------------------------------------------------------------- /new_eww/images/music.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tail-R/xmonad_eww_dotfiles/6888e82c377fb16d67fa4741f5fabd6ffdf5225a/new_eww/images/music.png -------------------------------------------------------------------------------- /new_eww/scripts/_not_used/_time.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import datetime 4 | import time 5 | import subprocess 6 | 7 | while True: 8 | ctime = datetime.datetime.now().time().replace(microsecond=0) 9 | subprocess.run(f"echo '{ctime}'", shell=True) 10 | 11 | time.sleep(1) 12 | -------------------------------------------------------------------------------- /new_eww/scripts/_not_used/_workspaces.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | ###################################################################### 4 | ## You need to install python-ewmh 5 | ###################################################################### 6 | 7 | import time 8 | import json 9 | import subprocess 10 | from ewmh import EWMH # sudo pacman -S python-ewmh 11 | ewmh = EWMH() 12 | 13 | # Main 14 | while True: 15 | wsList = ["󰧞"] * ewmh.getNumberOfDesktops() 16 | cList = ewmh.getClientList() 17 | 18 | for client in cList: 19 | wsList[ewmh.getWmDesktop(client)] = "󰊠" 20 | 21 | wsList[ewmh.getCurrentDesktop()] = "󰮯" 22 | 23 | res = json.dumps(wsList) 24 | # print(res) 25 | subprocess.run(f"echo '{res}'", shell=True) 26 | time.sleep(0.2) 27 | 28 | -------------------------------------------------------------------------------- /new_eww/scripts/_not_used/_workspaces.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ###################################################################### 4 | # You need to install wmctrl, xdotool and nerd-font 5 | ###################################################################### 6 | 7 | check_occupied() { 8 | wmctrl -l | awk '{print $2}' | while read -r occupied; do 9 | if [ "$occupied" == "$1" ]; then 10 | echo "occupied" 11 | return 12 | fi 13 | done 14 | } 15 | 16 | get_workspaces_yuck() { 17 | workspacesNumber=$(wmctrl -d | awk '{print $1}' | tail -c 2) 18 | 19 | wmctrl -d | awk '{print $1 " " $2 " " $9}' \ 20 | | while read -r number status name; 21 | do 22 | statusClass="workspace_inactive" 23 | icon="󰧞" 24 | 25 | if [ "$(check_occupied $number)" == "occupied" ]; then 26 | statusClass="workspace_occupied" 27 | icon="" 28 | # icon="󰊠" 29 | fi 30 | 31 | if [ "$status" == "*" ]; then # "*" mean active 32 | statusClass="workspace_active" 33 | icon="" 34 | # icon="󰮯" 35 | fi 36 | 37 | buffered+=$'\n' 38 | buffered+="(label :class '$statusClass' :text '$icon')" 39 | 40 | if [ "$number" == "$workspacesNumber" ]; then 41 | echo "(box :space-evenly false :spacing 20 $buffered)" 42 | fi 43 | done 44 | } 45 | 46 | get_activewindow_name() { 47 | windowName=$(xdotool getwindowfocus getwindowname) 48 | 49 | if [ "$windowName" == "" ]; then 50 | echo "inactive" 51 | else 52 | echo "$windowName" 53 | fi 54 | } 55 | 56 | # Main 57 | if [ "$1" == "--yuck" ]; then 58 | get_workspaces_yuck 59 | elif [ "$1" == "--active_winname" ]; then 60 | get_activewindow_name 61 | fi 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /new_eww/scripts/audio.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ###################################################################### 4 | ## You need to install pamixer 5 | ###################################################################### 6 | 7 | # Main 8 | if [ "$1" == "--get_volume" ]; then 9 | echo $(amixer -D pulse sget Master \ 10 | | grep "Left:" \ 11 | | awk -F'[][]' '{print $2}' \ 12 | | tr -d "%") 13 | elif [ "$1" == "--get_micvol" ]; then 14 | echo $(amixer -D pulse sget Capture \ 15 | | grep "Left:" \ 16 | | awk -F'[][]' '{print $2}' \ 17 | | tr -d "%") 18 | fi 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /new_eww/scripts/battery.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ###################################################################### 4 | ## You need to install acpi 5 | ###################################################################### 6 | 7 | get_battery_level() { 8 | echo $(acpi -b | sed -e "s/[A-Za-z:,-.%]\+//g" | awk 'NR == 1 {print $2}') 9 | } 10 | 11 | get_adapter_status() { 12 | echo "$(acpi -b | awk 'NR == 1 {print $3}' | sed -e 's/,//g')" 13 | } 14 | 15 | get_battery_icons() { 16 | battery_level=$(get_battery_level) 17 | battery_level_trunc=$(($battery_level / 10 * 10)) 18 | 19 | if [ "$(get_adapter_status)" == "Charging" ]; then 20 | # Charging 21 | case "$battery_level_trunc" in 22 | "100" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐" 23 | return ;; 24 | "90" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰗶" 25 | return ;; 26 | "80" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰗶 󱢠" 27 | return ;; 28 | "70" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰗶 󱢠 󱢠" 29 | return ;; 30 | "60" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰗶 󱢠 󱢠 󱢠" 31 | return ;; 32 | "50" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰗶 󱢠 󱢠 󱢠 󱢠" 33 | return ;; 34 | "40" ) echo "󰣐 󰣐 󰣐 󰣐 󰗶 󱢠 󱢠 󱢠 󱢠 󱢠" 35 | return ;; 36 | "30" ) echo "󰣐 󰣐 󰣐 󰗶 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠" 37 | return ;; 38 | "20" ) echo "󰣐 󰣐 󰗶 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠" 39 | return ;; 40 | "10" ) echo "󰣐 󰗶 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠" 41 | return ;; 42 | "0" ) echo "󰗶 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠" 43 | return ;; 44 | esac 45 | else 46 | # Discharging 47 | case "$battery_level_trunc" in 48 | "100" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐" 49 | return ;; 50 | "90" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰛞" 51 | return ;; 52 | "80" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰛞 󱢠" 53 | return ;; 54 | "70" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰛞 󱢠 󱢠" 55 | return ;; 56 | "60" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰛞 󱢠 󱢠 󱢠" 57 | return ;; 58 | "50" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰛞 󱢠 󱢠 󱢠 󱢠" 59 | return ;; 60 | "40" ) echo "󰣐 󰣐 󰣐 󰣐 󰛞 󱢠 󱢠 󱢠 󱢠 󱢠" 61 | return ;; 62 | "30" ) echo "󰣐 󰣐 󰣐 󰛞 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠" 63 | return ;; 64 | "20" ) echo "󰣐 󰣐 󰛞 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠" 65 | return ;; 66 | "10" ) echo "󰣐 󰛞 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠" 67 | return ;; 68 | "0" ) echo "󰛞 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠" 69 | return ;; 70 | esac 71 | fi 72 | } 73 | 74 | # Main 75 | if [ "$1" == "--level" ]; then 76 | get_battery_level 77 | 78 | elif [ "$1" == "--icons" ]; then 79 | get_battery_icons 80 | fi 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /new_eww/scripts/bluetooth.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | ewwPath="$HOME/.config/eww/" 4 | 5 | get_device_name() { 6 | if [ "$(get_con_status)" == "connected" ]; then 7 | knownDeviceNumber=$(bluetoothctl devices | awk '{print $2}') 8 | 9 | for deviceNumber in $knownDeviceNumber; do 10 | if [ "$(bluetoothctl info $deviceNumber | grep Connected: | awk '{print $2}')" == "yes" ]; then 11 | echo $(bluetoothctl info $deviceNumber | grep Name: | awk '{print $2}') 12 | return 13 | fi 14 | done 15 | fi 16 | 17 | echo "--" 18 | } 19 | 20 | get_con_status() { 21 | knownDeviceNumber=$(bluetoothctl devices | awk '{print $2}') 22 | 23 | for deviceNumber in $knownDeviceNumber; do 24 | conStatus=$(bluetoothctl info $deviceNumber | grep Connected: | awk '{print $2}') 25 | if [ "$conStatus" == "yes" ]; then 26 | echo "connected" 27 | return 28 | fi 29 | done 30 | 31 | echo "disconnected" 32 | } 33 | 34 | toggle() { 35 | if [ "$(get_con_status)" == "connected" ]; then 36 | bluetoothctl disconnect 37 | else 38 | knownDeviceNumber=$(bluetoothctl devices | awk '{print $2}') 39 | 40 | for deviceNumber in $knownDeviceNumber; do 41 | bluetoothctl connect $deviceNumber 42 | done 43 | fi 44 | } 45 | 46 | update_eww_json() { 47 | deviceNameList=$(bluetoothctl devices | awk '{print $2}') 48 | 49 | # Create json array 50 | deviceNameListJson=[\"$(echo $deviceNameList | sed -e 's/ /", "/g')\"] 51 | eww -c $ewwPath update JSON_BT_DEVNAME="$deviceNameListJson" 52 | } 53 | 54 | # Main 55 | if [ "$1" == "--con_status" ]; then 56 | get_con_status 57 | elif [ "$1" == "--devname" ]; then 58 | get_device_name 59 | elif [ "$1" == "--toggle" ]; then 60 | toggle 61 | elif [ "$1" == "--update_eww_json" ]; then 62 | update_eww_json 63 | fi 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /new_eww/scripts/cava/cava_pipe.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | confPath="$HOME/.config/eww/scripts/cava/config" 4 | 5 | # Main 6 | cava -p $confPath | while read -r line; do echo $line| sed -e 's/;/,/g'; done | while read -r line; do echo "["`echo ${line/%?/}`"]"; done 7 | -------------------------------------------------------------------------------- /new_eww/scripts/cava/config: -------------------------------------------------------------------------------- 1 | [general] 2 | 3 | framerate = 60 4 | bars = 30 5 | 6 | [input] 7 | method = pulse 8 | 9 | [output] 10 | 11 | method = raw 12 | raw_target = /dev/stdout 13 | data_format = ascii 14 | bit_format = 8bit 15 | ascii_max_range = 100 16 | 17 | 18 | -------------------------------------------------------------------------------- /new_eww/scripts/chcolor.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ewwPath="$HOME/.config/eww" 4 | 5 | re_link() { 6 | 7 | if [ -L $ewwPath/scss/color.scss ]; then 8 | ln -fs $ewwPath/scss/colors/$name.scss $ewwPath/scss/color.scss 9 | else 10 | ln -s $ewwPath/scss/colors/$name.scss $ewwPath/scss/color.scss 11 | fi 12 | } 13 | 14 | # Main 15 | name=$(echo $1 | sed -e 's/^--//g') 16 | 17 | if [ -f $ewwPath/scss/colors/$name.scss ]; then 18 | re_link $name 19 | fi 20 | -------------------------------------------------------------------------------- /new_eww/scripts/client_list/client_list.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import os 4 | import sys 5 | import re 6 | import json 7 | import subprocess 8 | 9 | import Xlib.X 10 | import Xlib.display 11 | 12 | import gi 13 | gi.require_version('Gtk', '3.0') 14 | from gi.repository import Gtk 15 | 16 | imgPath = "/.config/eww/images/cat.png" 17 | icon_size = 64 18 | 19 | #--------------------------------------------------------------------- 20 | class AppIcon: 21 | def __init__(self, win_id, icon_path): 22 | self.win_id = win_id 23 | self.icon_path = icon_path 24 | 25 | #--------------------------------------------------------------------- 26 | def get_gtk_icon(icon_name): 27 | icon_theme = Gtk.IconTheme.get_default() 28 | icon_info = icon_theme.lookup_icon(icon_name, icon_size, 0) 29 | 30 | return os.environ['HOME'] + imgPath if icon_info is None else icon_info.get_filename() 31 | 32 | #--------------------------------------------------------------------- 33 | def main(): 34 | # Open display 35 | disp = Xlib.display.Display() 36 | 37 | if (disp == None): 38 | print("Can't open display!", file=sys.stderr) 39 | sys.exit(1) 40 | 41 | # Get the root window 42 | root = disp.screen().root 43 | 44 | if (root == None): 45 | print("Can't get root window!", file=sys.stderr) 46 | sys.exit(1) 47 | 48 | # Get atom name 49 | NET_CLIENT_LIST = disp.intern_atom('_NET_CLIENT_LIST') 50 | WM_CLASS = disp.intern_atom('WM_CLASS') 51 | 52 | res = root.get_full_property(NET_CLIENT_LIST, Xlib.X.AnyPropertyType).value 53 | 54 | all_apps_icon = [] 55 | 56 | for i in res: 57 | win = disp.create_resource_object("window", i) 58 | byte_name = win.get_full_property(WM_CLASS, Xlib.X.AnyPropertyType).value 59 | 60 | if byte_name: 61 | icon_name = byte_name.decode().split("\x00")[1] 62 | all_apps_icon.append(AppIcon(i, get_gtk_icon(icon_name))) 63 | 64 | buffered = "" 65 | 66 | for app_icon in all_apps_icon: 67 | buffered += json.dumps(app_icon.__dict__) + "," 68 | 69 | print ("[" + buffered[:-1] + "]") 70 | 71 | if __name__ == "__main__": 72 | main() 73 | 74 | 75 | -------------------------------------------------------------------------------- /new_eww/scripts/client_list/manage_eww_json.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ewwPath="$HOME/.config/eww" 4 | v0="JSON_DOCK_CLIENT_LIST" 5 | 6 | cd $ewwPath/scripts/client_list 7 | 8 | # Main 9 | xprop -spy -root _NET_CLIENT_LIST | while read -r; do 10 | res=$(./client_list.py | jq ". | sort_by(.icon_path)") 11 | # eww -c $ewwPath update $v0="$res" 12 | echo $res 13 | done 14 | -------------------------------------------------------------------------------- /new_eww/scripts/convert_images/convert_images.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | ###################################################################### 4 | ## you need to install opencv, numpy 5 | ###################################################################### 6 | 7 | import os 8 | import sys 9 | import subprocess 10 | import numpy as np # sudo pacman -S python-numpy 11 | import cv2 # sudo pacman -S python-opencv 12 | 13 | workDir = "/.config/eww/scripts/convert_images" 14 | out_name = "/res.png" 15 | 16 | def make_blurrrrrrr(path, opt_path): 17 | try: 18 | img = cv2.imread(path) 19 | except: 20 | print("invalid args!", file=sys.stderr) 21 | sys.exit(1) 22 | 23 | beta = 70 # must be 0 ~ 255 24 | height, width = img.shape[:2] 25 | 26 | # Blurrrrrrr 27 | blur_res = cv2.GaussianBlur(img, (15, 15), 5) 28 | dark_res = cv2.subtract(blur_res, np.full((height, width, 3), beta, np.uint8)) 29 | 30 | cv2.imwrite(os.getcwd() + opt_path + out_name, dark_res) 31 | 32 | cmd = "echo " + os.getcwd() + opt_path + out_name 33 | subprocess.run(cmd, shell=True) 34 | 35 | def get_one_color(path): 36 | try: 37 | img = cv2.imread(path) 38 | except: 39 | print("invalid args!", file=sys.stderr) 40 | sys.exit(1) 41 | 42 | print("hehehe") 43 | 44 | #--------------------------------------------------------------------- 45 | def main(): 46 | os.chdir(os.environ["HOME"] + workDir) 47 | # print(os.getcwd()) 48 | 49 | args = sys.argv 50 | 51 | if (args[1] == "-b"): 52 | make_blurrrrrrr(args[2], args[3]) 53 | elif (args[1] == "-c"): 54 | get_one_color(args[2]) 55 | 56 | if __name__ == '__main__': 57 | main() 58 | 59 | -------------------------------------------------------------------------------- /new_eww/scripts/convert_images/images/currentwall/res.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tail-R/xmonad_eww_dotfiles/6888e82c377fb16d67fa4741f5fabd6ffdf5225a/new_eww/scripts/convert_images/images/currentwall/res.png -------------------------------------------------------------------------------- /new_eww/scripts/convert_images/images/mpris/res.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tail-R/xmonad_eww_dotfiles/6888e82c377fb16d67fa4741f5fabd6ffdf5225a/new_eww/scripts/convert_images/images/mpris/res.png -------------------------------------------------------------------------------- /new_eww/scripts/convert_images/mpris_blur.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ###################################################################### 4 | ## You need to install playerctl 5 | ###################################################################### 6 | 7 | workDir="$HOME/.config/eww/scripts/convert_images" 8 | 9 | cd $workDir 10 | 11 | mkdir -p ./images 12 | mkdir -p ./images/mpris 13 | 14 | # Main 15 | playerctl --follow metadata | while read -r metadata; do 16 | imgPath=$(echo $metadata | grep mpris:artUrl | sed -e 's/.*file:\/\///g') 17 | 18 | if [ -a ./imgaes/mpris/* ]; then 19 | rm ./images/mpris/* 20 | fi 21 | 22 | if [ "$(playerctl -l | grep 'firefox')" != "" ]; then 23 | if [ "$imgPath" != "" ]; then 24 | ./convert_images.py -b $imgPath "/images/mpris" 25 | fi 26 | else 27 | echo $imgPath 28 | fi 29 | done 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /new_eww/scripts/desktop_apps/manage_apps.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import os 4 | import sys 5 | import subprocess 6 | import json 7 | 8 | import gi 9 | gi.require_version('Gtk', '3.0') 10 | from gi.repository import Gtk 11 | from gi.repository import Gio 12 | 13 | workDir = "/.config/eww/scripts/desktop_apps" 14 | ewwPath = "$HOME/.config/eww" 15 | iconSize = 100 16 | 17 | #--------------------------------------------------------------------- 18 | class DesktopApp: 19 | def __init__(self, disp_name, exec_name, icon_path): 20 | self.disp_name = disp_name 21 | self.exec_name = exec_name 22 | self.icon_path = icon_path 23 | 24 | #--------------------------------------------------------------------- 25 | # return Json array of the all desktop apps objects 26 | def get_json_all_apps(): 27 | icon_theme = Gtk.IconTheme.get_default() 28 | all_apps_obj = Gio.AppInfo.get_all() 29 | 30 | all_apps = [] 31 | 32 | # create object array 33 | for app in all_apps_obj: 34 | icon_obj = app.get_icon() 35 | icon_path = "" 36 | 37 | if (icon_obj is not None): 38 | icon_name = icon_obj.get_names()[0] 39 | icon_info = icon_theme.lookup_icon(icon_name, iconSize, 0) 40 | icon_path = "" if icon_info is None else icon_info.get_filename() 41 | else: 42 | icon_path = "" 43 | 44 | all_apps.append(DesktopApp(app.get_display_name(), 45 | app.get_executable(), 46 | icon_path)) 47 | 48 | buffered = "" 49 | 50 | # convert an array to the json format 51 | for app in all_apps: 52 | buffered += json.dumps(app.__dict__) + "," 53 | 54 | return "[" + buffered[:-1] + "]" 55 | 56 | def update_eww(): 57 | json_all_apps = get_json_all_apps() 58 | 59 | # formating 60 | cmd = "eww -c " + ewwPath + " update " + "JSON_DESKTOP_APPS=" + "'" + json_all_apps + "'" 61 | 62 | # update an eww variable 63 | subprocess.run(cmd, shell=True) 64 | 65 | def exec_app(app): 66 | pass 67 | 68 | #--------------------------------------------------------------------- 69 | def main(): 70 | os.chdir(os.environ["HOME"] + workDir) 71 | args = sys.argv 72 | 73 | try: 74 | if (args[1] == "--update_eww"): 75 | update_eww() 76 | 77 | except IndexError: 78 | print("Invalid args!", file=sys.stderr) 79 | sys.exit(1) 80 | 81 | if __name__ == '__main__': 82 | main() 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /new_eww/scripts/desktop_apps/manage_eww_json.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ###################################################################### 4 | ## You need to install jq command 5 | ###################################################################### 6 | 7 | ewwPath="$HOME/.config/eww" 8 | v0="JSON_DESKTOP_APPS" 9 | 10 | cd $ewwPath/scripts/desktop_apps 11 | 12 | json_regex_match() { 13 | res=[$(echo $(eww -c $ewwPath get JSON_DESKTOP_APPS | \ 14 | jq '.[] | select(.disp_name | test("'$1'"))') \ 15 | | sed -e 's/} /},/g')] 16 | 17 | eww -c $ewwPath update $v0="$res" 18 | } 19 | 20 | # Main 21 | if [ "$1" == "--regex_match" ]; then 22 | ./manage_apps.py --update_eww 23 | json_regex_match $2 24 | elif [ "$1" == "--asc_order" ]; then 25 | res=$(eww -c $ewwPath get JSON_DESKTOP_APPS | jq ". | sort_by(.disp_name)") 26 | 27 | eww -c $ewwPath update $v0="$res" 28 | elif [ "$1" == "--des_order" ]; then 29 | res=$(eww -c $ewwPath get JSON_DESKTOP_APPS | jq ". | sort_by(.disp_name) | reverse") 30 | 31 | eww -c $ewwPath update $v0="$res" 32 | elif [ "$1" == "--reverse" ]; then 33 | echo 1 34 | fi 35 | 36 | 37 | -------------------------------------------------------------------------------- /new_eww/scripts/desktop_view/_json/img_path.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tail-R/xmonad_eww_dotfiles/6888e82c377fb16d67fa4741f5fabd6ffdf5225a/new_eww/scripts/desktop_view/_json/img_path.json -------------------------------------------------------------------------------- /new_eww/scripts/desktop_view/_main: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tail-R/xmonad_eww_dotfiles/6888e82c377fb16d67fa4741f5fabd6ffdf5225a/new_eww/scripts/desktop_view/_main -------------------------------------------------------------------------------- /new_eww/scripts/desktop_view/_main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | enum states { 6 | Maped, 7 | Unmaped 8 | }; 9 | 10 | int main(void) { 11 | Display *disp; 12 | Window win; 13 | XEvent event; 14 | FILE *fp; 15 | unsigned char cmd[1024]; 16 | // unsigned char res[1024]; 17 | 18 | disp = XOpenDisplay(NULL); 19 | if (!disp) { 20 | fprintf(stderr, "Can't open display!"); 21 | return 1; 22 | } 23 | 24 | win = DefaultRootWindow(disp); 25 | XSelectInput(disp, win, SubstructureNotifyMask); 26 | 27 | for (;;) { 28 | XNextEvent(disp, &event); 29 | 30 | if (event.xmap.type == MapNotify) { 31 | printf("%s %d\n", "Maped", event.xmap.window); 32 | 33 | // sprintf(cmd, "./manage_windowthumb.sh %d %d", 34 | // Maped, event.xmap.window); 35 | 36 | // fp = popen(cmd, "r"); 37 | // if (fp == NULL) return 1; 38 | 39 | // while (fgets(res, sizeof(res), fp) != NULL) { 40 | // printf("%s\n", res); 41 | // } 42 | 43 | // pclose(fp); 44 | } 45 | 46 | if (event.xunmap.type == UnmapNotify) { 47 | printf("%s %d\n", "Unmaped", event.xunmap.window); 48 | 49 | // sprintf(cmd, "./manage_windowthumb.sh %d %d", 50 | // Unmaped, event.xunmap.window); 51 | 52 | // fp = popen(cmd, "r"); 53 | // if (fp == NULL) return 1; 54 | 55 | // while (fgets(res, sizeof(res), fp) != NULL) { 56 | // printf("%s\n", res); 57 | // } 58 | // 59 | // pclose(fp); 60 | } 61 | } 62 | 63 | return 0; 64 | } 65 | -------------------------------------------------------------------------------- /new_eww/scripts/desktop_view/images/14680078.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tail-R/xmonad_eww_dotfiles/6888e82c377fb16d67fa4741f5fabd6ffdf5225a/new_eww/scripts/desktop_view/images/14680078.jpg -------------------------------------------------------------------------------- /new_eww/scripts/desktop_view/images/16777230.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tail-R/xmonad_eww_dotfiles/6888e82c377fb16d67fa4741f5fabd6ffdf5225a/new_eww/scripts/desktop_view/images/16777230.jpg -------------------------------------------------------------------------------- /new_eww/scripts/desktop_view/images/18874382.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tail-R/xmonad_eww_dotfiles/6888e82c377fb16d67fa4741f5fabd6ffdf5225a/new_eww/scripts/desktop_view/images/18874382.jpg -------------------------------------------------------------------------------- /new_eww/scripts/desktop_view/images/25165838.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tail-R/xmonad_eww_dotfiles/6888e82c377fb16d67fa4741f5fabd6ffdf5225a/new_eww/scripts/desktop_view/images/25165838.jpg -------------------------------------------------------------------------------- /new_eww/scripts/desktop_view/log.txt: -------------------------------------------------------------------------------- 1 | 2 | /home/tailr/.config/eww/scripts/vdesk_viewer 3 | 4 | 5 | 5 6 | [<__main__.Thumbnail object at 0x7f9376e97e90>, <__main__.Thumbnail object at 0x7f9376ea0250>, <__main__.Thumbnail object at 0x7f9376ea0090>, <__main__.Thumbnail object at 0x7f9376ea00d0>, <__main__.Thumbnail object at 0x7f9376ea0150>] 7 | /home/tailr/.config/eww/scripts/ws_preview 8 | 9 | 10 | 5 11 | [<__main__.Thumbnail object at 0x7f1864fa9fd0>, <__main__.Thumbnail object at 0x7f1864fcc350>, <__main__.Thumbnail object at 0x7f1864fcc190>, <__main__.Thumbnail object at 0x7f1864fcc150>, <__main__.Thumbnail object at 0x7f1864fcc310>] 12 | /home/tailr/.config/eww/scripts/ws_preview 13 | 14 | 15 | 5 16 | [<__main__.Thumbnail object at 0x7fe1a08d3f50>, <__main__.Thumbnail object at 0x7fe1a08d3d90>, <__main__.Thumbnail object at 0x7fe1a08d3f10>, <__main__.Thumbnail object at 0x7fe1a08d3fd0>, <__main__.Thumbnail object at 0x7fe1a08dc150>] 17 | /home/tailr/.config/eww/scripts/ws_preview 18 | 19 | 20 | 5 21 | [<__main__.Thumbnail object at 0x7f3a98195d90>, <__main__.Thumbnail object at 0x7f3a97ec7fd0>, <__main__.Thumbnail object at 0x7f3a97ec7e10>, <__main__.Thumbnail object at 0x7f3a97ec7dd0>, <__main__.Thumbnail object at 0x7f3a97ec7f90>] 22 | /home/tailr/.config/eww/scripts/ws_preview 23 | 24 | 25 | 5 26 | [<__main__.Thumbnail object at 0x7fb614bf03d0>, <__main__.Thumbnail object at 0x7fb6153266d0>, <__main__.Thumbnail object at 0x7fb6149b4610>, <__main__.Thumbnail object at 0x7fb6149b42d0>, <__main__.Thumbnail object at 0x7fb6149b4490>] 27 | destroyed20971534 28 | destroyed20971534 29 | unmapped18874382 30 | destroyed25165838 31 | destroyed23068686 32 | destroyed20971534 33 | destroyed18874382 34 | destroyed25165838 35 | destroyed23068686 36 | destroyed27262990 37 | destroyed23068686 38 | destroyed20971534 39 | /home/tailr/.config/eww/scripts/ws_preview 40 | 41 | 42 | 5 43 | [<__main__.Thumbnail object at 0x7f64c05fed10>, <__main__.Thumbnail object at 0x7f64c07fe850>, <__main__.Thumbnail object at 0x7f64c0303f50>, <__main__.Thumbnail object at 0x7f64c0303d90>, <__main__.Thumbnail object at 0x7f64c0303dd0>] 44 | mapped20971534 45 | unmapped18874382 46 | unmapped25165838 47 | mapped23068686 48 | mapped27262990 49 | mapped29360142 50 | destroyed29360142 51 | destroyed27262990 52 | destroyed23068686 53 | mapped18874382 54 | mapped25165838 55 | unmapped20971534 56 | mapped20971534 57 | unmapped18874382 58 | unmapped25165838 59 | mapped18874382 60 | mapped25165838 61 | unmapped20971534 62 | mapped20971534 63 | unmapped18874382 64 | unmapped25165838 65 | destroyed23068673 66 | destroyed20971534 67 | mapped18874382 68 | mapped25165838 69 | /home/tailr/.config/eww/scripts/ws_preview 70 | 71 | 72 | 5 73 | [<__main__.Thumbnail object at 0x7f9515b266d0>, <__main__.Thumbnail object at 0x7f95151c8210>, <__main__.Thumbnail object at 0x7f95151c8590>, <__main__.Thumbnail object at 0x7f95151c83d0>, <__main__.Thumbnail object at 0x7f95151c8410>] 74 | /home/tailr/.config/eww/scripts/desktop_prev 75 | 76 | 77 | 5 78 | [<__main__.Thumbnail object at 0x7f9b28baa150>, <__main__.Thumbnail object at 0x7f9b28bc8110>, <__main__.Thumbnail object at 0x7f9b28bc8490>, <__main__.Thumbnail object at 0x7f9b28bc82d0>, <__main__.Thumbnail object at 0x7f9b28bc8310>] 79 | mapped27262990 80 | destroyed27262990 81 | /home/tailr/.config/eww/scripts/desktop_prev 82 | 83 | 84 | 5 85 | [<__main__.Thumbnail object at 0x7f90623aa150>, <__main__.Thumbnail object at 0x7f90623c8110>, <__main__.Thumbnail object at 0x7f90623c8490>, <__main__.Thumbnail object at 0x7f90623c82d0>, <__main__.Thumbnail object at 0x7f90623c8310>] 86 | unmapped18874382 87 | unmapped14680078 88 | unmapped16777230 89 | mapped18874382 90 | mapped14680078 91 | mapped16777230 92 | /home/tailr/.config/eww/scripts/desktop_view 93 | 94 | 95 | 5 96 | [<__main__.Thumbnail object at 0x7f33d230aad0>, <__main__.Thumbnail object at 0x7f33d1d02990>, <__main__.Thumbnail object at 0x7f33d1d02b50>, <__main__.Thumbnail object at 0x7f33d1a17fd0>, <__main__.Thumbnail object at 0x7f33d1a17f10>] 97 | mapped27262990 98 | destroyed27262990 99 | mapped27262990 100 | destroyed27262990 101 | unmapped18874382 102 | unmapped14680078 103 | unmapped16777230 104 | mapped18874382 105 | mapped14680078 106 | mapped16777230 107 | /home/tailr/.config/eww/scripts/desktop_view 108 | 109 | 110 | 5 111 | [<__main__.Thumbnail object at 0x7f130628fdd0>, <__main__.Thumbnail object at 0x7f130628ff90>, <__main__.Thumbnail object at 0x7f130628ffd0>, <__main__.Thumbnail object at 0x7f1306298190>, <__main__.Thumbnail object at 0x7f1306298090>] 112 | -------------------------------------------------------------------------------- /new_eww/scripts/desktop_view/main.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import os 4 | import subprocess 5 | # import time 6 | import json 7 | import Xlib.X 8 | import Xlib.display 9 | import Xlib.error 10 | 11 | #--------------------------------------------------------------------- 12 | workDir = "/.config/eww/scripts/desktop_view" 13 | ewwPath = "$HOME/.config/eww" 14 | logFile = "./log.txt" 15 | scripts = "$HOME/.config/eww/scripts/desktop_view/manage_images.sh" 16 | cmd0 = "sleep 0.1 && maim -i " 17 | cmd1 = " -u ./images/" 18 | fmt = ".jpg" 19 | 20 | #--------------------------------------------------------------------- 21 | class Thumbnail: 22 | def __init__(self, desk_num): 23 | self.desk_num = desk_num 24 | self.img_path_array = [] 25 | 26 | #--------------------------------------------------------------------- 27 | def output_json(vdesk_array, nod): 28 | buffered = "" 29 | 30 | for i in range(nod): 31 | buffered += json.dumps(vdesk_array[i].__dict__) + "," 32 | 33 | res = json.dumps("[" + buffered[:-1] + "]") 34 | 35 | cmd = "eww -c " + ewwPath + " update JSON_VDESK_IMG=" + res 36 | subprocess.Popen(cmd, 37 | shell=True, 38 | stdin=None, 39 | stdout=None, 40 | stderr=None, 41 | close_fds=True) 42 | 43 | def output_img_add(vdesk_array, wid, desktop, nod): 44 | # add window id to the json 45 | if (str(wid) + fmt not in vdesk_array[desktop].img_path_array): 46 | vdesk_array[desktop].img_path_array.append(str(wid) + fmt) 47 | 48 | output_json(vdesk_array, nod) 49 | 50 | # take the image 51 | # cmd = scripts + " --add " + str(wid) 52 | cmd = cmd0 + str(wid) + cmd1 + str(wid) + fmt 53 | subprocess.Popen(cmd, 54 | shell=True, 55 | stdin=None, 56 | stdout=None, 57 | stderr=None, 58 | close_fds=True) 59 | 60 | def output_img_del(vdesk_array, wid, nod): 61 | # delete wid from the json 62 | for i in range(nod): 63 | if (str(wid) + fmt in vdesk_array[i].img_path_array): 64 | vdesk_array[i].img_path_array.remove(str(wid) + fmt) 65 | 66 | output_json(vdesk_array, nod) 67 | 68 | # remove the image 69 | cmd = scripts + " --del " + str(wid) 70 | subprocess.Popen(cmd, 71 | shell=True, 72 | stdin=None, 73 | stdout=None, 74 | stderr=None, 75 | close_fds=True) 76 | 77 | def output_log(any_date): 78 | try: 79 | f = open(logFile, "a") 80 | f.write(str(any_date) + "\n") 81 | f.close() 82 | 83 | except FileNotFoundError: 84 | sys.exit(1) 85 | 86 | #---- Main ----------------------------------------------------------- 87 | os.chdir(os.environ["HOME"] + workDir) 88 | output_log(os.getcwd()) 89 | 90 | disp = Xlib.display.Display() 91 | if (disp is None): 92 | output_log("Can't open display!") 93 | sys.exit(1) 94 | 95 | root = disp.screen().root 96 | root.change_attributes(event_mask=Xlib.X.SubstructureNotifyMask) 97 | 98 | if (root is None): 99 | output_log("Can't connect to the root window!") 100 | sys.exit(1) 101 | 102 | # get number of the desktops 103 | nod = root.get_full_property(disp.intern_atom('_NET_NUMBER_OF_DESKTOPS'), 104 | Xlib.X.AnyPropertyType).value[0] 105 | 106 | # init array 107 | vdesk_array = [] 108 | 109 | for i in range(nod): 110 | desk = Thumbnail(i) 111 | vdesk_array.append(desk) 112 | 113 | # Output rezults of the initialize 114 | output_log(disp) 115 | output_log(root) 116 | output_log(nod) 117 | output_log(vdesk_array) 118 | 119 | #--------------------------------------------------------------------- 120 | while True: 121 | # read new event 122 | event = disp.next_event() 123 | 124 | try: 125 | win = event.window 126 | wid = win.id 127 | 128 | except: 129 | continue 130 | 131 | if (win is None or wid is None): 132 | continue 133 | 134 | NET_WM_DESKTOP = disp.intern_atom('_NET_WM_DESKTOP') 135 | 136 | # mapped 137 | if (event.type == Xlib.X.MapNotify): 138 | try: 139 | NET_WM_DESKTOP = win.get_full_property(NET_WM_DESKTOP, Xlib.X.AnyPropertyType).value 140 | desktop = NET_WM_DESKTOP.tolist()[0] 141 | 142 | # output 143 | if (0 <= desktop < nod): 144 | output_log("mapped" + str(wid)) 145 | output_img_add(vdesk_array, wid, desktop, nod) 146 | 147 | except: 148 | continue 149 | 150 | # unmapped 151 | if (event.type == Xlib.X.UnmapNotify): 152 | try: 153 | NET_WM_DESKTOP = win.get_full_property(NET_WM_DESKTOP, Xlib.X.AnyPropertyType).value 154 | output_log("unmapped" + str(wid)) 155 | desktop = NET_WM_DESKTOP.tolist()[0] 156 | 157 | # the window does not exists 158 | except: 159 | output_log("destroyed" + str(wid)) 160 | output_img_del(vdesk_array, wid, nod) 161 | 162 | -------------------------------------------------------------------------------- /new_eww/scripts/desktop_view/manage_images.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | fmt="jpg" 4 | 5 | # Main 6 | if [ "$1" == "--add" ]; then 7 | # for i in `seq 1 3`; do 8 | # if [ $(xprop -id $2 | grep "window state:" | awk 'NR == 1 {print $3}') == "Normal" ]; then 9 | # maim -i $2 -u -m 3 ./images/$2.$fmt 10 | # fi 11 | 12 | # sleep 0.1 13 | # done 14 | sleep 0.1 15 | maim -i $2 -u ./images/$2.$fmt 16 | # xwd -id $2 | convert xwd:- ./images/$2.$fmt 17 | elif [ "$1" == "--del" ]; then 18 | if [ -e ./images/$2.$fmt ]; then 19 | rm ./images/$2.$fmt 20 | fi 21 | fi 22 | -------------------------------------------------------------------------------- /new_eww/scripts/desktop_view/manage_windows.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ###################################################################### 4 | ## You need to install wmctrl 5 | ###################################################################### 6 | 7 | killWin() { 8 | if [ "$1" != "" ]; then 9 | wmctrl -ic $(echo $1 | sed -e s/\.jpg//g) 10 | fi 11 | } 12 | 13 | # Main 14 | if [ "$1" == "--kill" ]; then 15 | killWin $2 16 | fi 17 | 18 | -------------------------------------------------------------------------------- /new_eww/scripts/display.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ###################################################################### 4 | ## You need to install xrandr, brightnessctl 5 | ###################################################################### 6 | 7 | get_resolution_width() { 8 | echo $(xrandr --current | grep '*' | uniq | awk '{print $1}' | sed -e 's/x[0-9]*//g') 9 | } 10 | 11 | get_resolution_height() { 12 | echo $(xrandr --current | grep '*' | uniq | awk '{print $1}' | sed -e 's/[0-9]*x//g') 13 | } 14 | 15 | # Get a primary display name like a eDP-1, LVDS-1, ... 16 | get_dp_name() { 17 | echo $(xrandr | grep "primary" | awk '{print $1}') 18 | } 19 | 20 | get_bright_level() { 21 | max_level=$(brightnessctl m) 22 | current_level=$(brightnessctl g) 23 | 24 | echo $((current_level * 100 / max_level)) 25 | } 26 | 27 | set_max_brightness() { 28 | if [ $(echo "1 > $1 > 0" | bc) == 1 ]; then 29 | dpName=$(get_dp_name) 30 | $(xrandr --output $dpName --brightness $1) 31 | fi 32 | } 33 | 34 | toggle_nightmode() { 35 | dpName=$(get_dp_name) 36 | 37 | if [ "$(xrandr --verbose | grep "Brightness:" | awk 'NR == 1 {print $2}')" == "1.0" ]; then 38 | xrandr --output $dpName --brightness 0.7 39 | else 40 | xrandr --output $dpName --brightness 1 41 | fi 42 | } 43 | 44 | # If the nightmode is enabled return true 45 | get_nightmode_status() { 46 | if [ "$(xrandr --verbose | grep "Brightness:" | awk 'NR == 1 {print $2}')" == "1.0" ]; then 47 | echo false 48 | else 49 | echo true 50 | fi 51 | } 52 | 53 | # Main 54 | if [ "$1" == "--get_dp_width" ]; then 55 | get_resolution_width 56 | elif [ "$1" == "--get_dp_height" ]; then 57 | get_resolution_height 58 | elif [ "$1" == "--get_dp_name" ]; then 59 | get_dp_name 60 | elif [ "$1" == "--get_brightness" ]; then 61 | get_bright_level 62 | elif [ "$1" == "--set_max_brightness" ]; then 63 | set_max_brightness $2 64 | elif [ "$1" == "--toggle_nightmode" ]; then 65 | toggle_nightmode 66 | elif [ "$1" == "--get_nightmode_status" ]; then 67 | get_nightmode_status 68 | fi 69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /new_eww/scripts/fet.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ###################################################################### 4 | ## You need to install hostnamectl, wmctrl 5 | ###################################################################### 6 | 7 | fet_all() { 8 | fet_hostname 9 | fet_distro 10 | fet_model 11 | fet_wmname 12 | } 13 | 14 | fet_hostname() { 15 | echo $(whoami)@$(hostname) 16 | } 17 | 18 | fet_distro() { 19 | cat /etc/os-release | grep -E "^NAME" | sed -e 's/^.*=//g' -e 's/"//g' 20 | } 21 | 22 | fet_model() { 23 | hostnamectl | grep "Hardware Model" | sed -e 's/ *Hardware Model: //g' 24 | } 25 | 26 | fet_wmname() { 27 | wmctrl -m | grep "Name:" | awk '{print $2}' 28 | } 29 | 30 | # Main 31 | if [ "$1" == "" ]; then 32 | fet_all 33 | elif [ "$1" == "--hostname" ]; then 34 | fet_hostname 35 | elif [ "$1" == "--distro" ]; then 36 | fet_distro 37 | elif [ "$1" == "--model" ]; then 38 | fet_model 39 | elif [ "$1" == "--wmname" ]; then 40 | fet_wmname 41 | fi 42 | -------------------------------------------------------------------------------- /new_eww/scripts/launcher/launch_center_dmenu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ewwPath="$HOME/.config/eww" 4 | tmpPath="$HOME/.cache/eww/center_dmenu" 5 | v0="SHOW_CENTER_DMENU" 6 | 7 | if [ ! -d $HOME/.cache/eww ]; then 8 | mkdir $HOME/.cache/eww; 9 | fi 10 | 11 | window="window_center_dmenu" 12 | 13 | toggle() { 14 | if [ -f $tmpPath ]; then 15 | rm $tmpPath 16 | eww -c $ewwPath close $window 17 | eww -c $ewwPath update $v0=false 18 | else 19 | touch $tmpPath 20 | $ewwPath/scripts/desktop_apps/./manage_apps.py --update_eww 21 | eww -c $ewwPath open-many $window 22 | eww -c $ewwPath update $v0=true 23 | fi 24 | } 25 | 26 | # Main 27 | if [ "$1" == "--open" ]; then 28 | touch $tmpPath 29 | $ewwPath/scripts/desktop_apps/./manage_apps.py --update_eww 30 | eww -c $ewwPath open-many $window 31 | eww -c $ewwPath update $v0=true 32 | elif [ "$1" == "--toggle" ]; then 33 | toggle 34 | elif [ "$1" == "--close" ]; then 35 | rm $tmpPath 36 | eww -c $ewwPath close $window 37 | eww -c $ewwPath update $v0=false 38 | fi 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /new_eww/scripts/launcher/launch_left_widget.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # To-Do: Delete the tmp files with more smart way. 4 | 5 | ewwPath="$HOME/.config/eww" 6 | tmpPath="$HOME/.cache/eww/left_widget" 7 | v0="SHOW_BAR_CENTER" 8 | v1="SHOW_LEFT_WIDGET" 9 | 10 | if [ ! -d $HOME/.cache/eww ]; then 11 | mkdir $HOME/.cache/eww; 12 | fi 13 | 14 | window="window_left_widget" 15 | 16 | toggle() { 17 | if [ -f $tmpPath ]; then 18 | rm $tmpPath 19 | eww -c $ewwPath close $window 20 | eww -c $ewwPath update $v1=false 21 | else 22 | touch $tmpPath 23 | 24 | # Preludes uwu* 25 | eww -c $ewwPath update $v0=false 26 | sleep 0.3 27 | eww -c $ewwPath open-many $window 28 | eww -c $ewwPath update $v1=true 29 | 30 | # Run service 31 | $ewwPath/scripts/bluetooth.sh --update_eww_json 32 | $ewwPath/scripts/network.sh --update_eww_json 33 | fi 34 | } 35 | 36 | # Main 37 | if [ "$1" == "--open" ]; then 38 | touch $tmpPath 39 | 40 | # Preludes uwu* 41 | eww -c $ewwPath update $v0=false 42 | sleep 0.3 43 | eww -c $ewwPath open-many $window 44 | eww -c $ewwPath update $v1=true 45 | 46 | # Run service 47 | $ewwPath/scripts/bluetooth.sh --update_eww_json 48 | $ewwPath/scripts/network.sh --update_eww_json 49 | elif [ "$1" == "--toggle" ]; then 50 | toggle 51 | elif [ "$1" == "--close" ]; then 52 | rm $tmpPath 53 | eww -c $ewwPath close $window 54 | eww -c $ewwPath update $v1=false 55 | fi 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /new_eww/scripts/launcher/launch_right_mplayer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ewwPath="$HOME/.config/eww" 4 | tmpPath="$HOME/.cache/eww/right_mplayer" 5 | v0="SHOW_RIGHT_MPLAYER" 6 | 7 | if [ ! -d $HOME/.cache/eww ]; then 8 | mkdir $HOME/.cache/eww; 9 | fi 10 | 11 | window="window_right_mplayer" 12 | 13 | toggle() { 14 | if [ -f $tmpPath ]; then 15 | rm $tmpPath 16 | eww -c $ewwPath close $window 17 | eww -c $ewwPath update $v0=false 18 | else 19 | touch $tmpPath 20 | eww -c $ewwPath open-many $window 21 | eww -c $ewwPath update $v0=true 22 | fi 23 | } 24 | 25 | # Main 26 | if [ "$1" == "--open" ]; then 27 | touch $tmpPath 28 | eww -c $ewwPath open-many $window 29 | eww -c $ewwPath update $v0=true 30 | elif [ "$1" == "--toggle" ]; then 31 | toggle 32 | fi 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /new_eww/scripts/launcher/launch_right_notifpop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ewwPath="$HOME/.config/eww" 4 | tmpPath="$HOME/.cache/eww/right_notifpop" 5 | v0="SHOW_RIGHT_NOTIFPOP" 6 | 7 | if [ ! -d $HOME/.cache/eww ]; then 8 | mkdir $HOME/.cache/eww; 9 | fi 10 | 11 | window="window_right_notifpop" 12 | 13 | toggle() { 14 | if [ -f $tmpPath ]; then 15 | rm $tmpPath 16 | eww -c $ewwPath close $window 17 | eww -c $ewwPath update $v0=false 18 | else 19 | touch $tmpPath 20 | eww -c $ewwPath open-many $window 21 | eww -c $ewwPath update $v0=true 22 | fi 23 | } 24 | 25 | # Main 26 | if [ "$1" == "--open" ]; then 27 | touch $tmpPath 28 | eww -c $ewwPath open-many $window 29 | eww -c $ewwPath update $v0=true 30 | elif [ "$1" == "--toggle" ]; then 31 | toggle 32 | fi 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /new_eww/scripts/launcher/launch_top_bar.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ewwPath="$HOME/.config/eww" 4 | tmpPath="$HOME/.cache/eww/top_bar" 5 | 6 | if [ ! -d $HOME/.cache/eww ]; then 7 | mkdir $HOME/.cache/eww; 8 | fi 9 | 10 | window="window_top_bar" 11 | 12 | toggle() { 13 | if [ -f $tmpPath ]; then 14 | rm $tmpPath 15 | eww -c $ewwPath close $window 16 | else 17 | touch $tmpPath 18 | eww -c $ewwPath open-many $window 19 | fi 20 | } 21 | 22 | # Main 23 | if [ "$1" == "--open" ]; then 24 | touch $tmpPath 25 | eww -c $ewwPath open-many $window 26 | elif [ "$1" == "--toggle" ]; then 27 | toggle 28 | fi 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /new_eww/scripts/manage_power.sh: -------------------------------------------------------------------------------- 1 | #/bin/bash 2 | 3 | # Main 4 | if [ "$1" == "--poweroff" ]; then 5 | systemctl poweroff 6 | elif [ "$1" == "--suspend" ]; then 7 | systemctl suspend 8 | elif [ "$1" == "--logout" ]; then 9 | kill -9 -1 # Note: search more smart way 10 | elif [ "$1" == "--reboot" ]; then 11 | systemctl reboot 12 | fi 13 | 14 | -------------------------------------------------------------------------------- /new_eww/scripts/mpris.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ###################################################################### 4 | ## You need to install playerctl 5 | ###################################################################### 6 | 7 | get_music_title() { 8 | if [ "$(playerctl status)" == "Playing" ]; then 9 | echo $(playerctl metadata --format '{{title}}') 10 | else 11 | echo "offline" 12 | fi 13 | } 14 | 15 | get_music_artist() { 16 | if [ "$(playerctl status)" == "Playing" ]; then 17 | echo $(playerctl metadata --format '{{artist}}') 18 | else 19 | echo "unknown" 20 | fi 21 | } 22 | 23 | get_music_cover() { 24 | playerctl --follow metadata | while read -r metadata; do 25 | 26 | if [ "$(playerctl -l | grep 'firefox')" != "" ]; then 27 | echo $(echo $metadata | grep "mpris:artUrl" | sed -e 's/.*file:\/\///g') 28 | fi 29 | done 30 | 31 | # # Firefox founded 32 | # if [ "${playerStatus:0:7}" == "firefox" ]; then 33 | # playerctl --follow metadata | while read -r metadata; do 34 | # artUrl=$(echo $metadata | grep "mpris:artUrl" | sed -e 's/.*file:\/\///g') 35 | # echo $artUrl 36 | 37 | # done 38 | 39 | # # Spotify founded 40 | # elif [ "$playerStatus" == "spotify" ]; then 41 | # playerctl --follow metadata | while read -r metadata; do 42 | # artUrl=$(echo $metadata | grep "mpris:artUrl" | awk '{print $3}') 43 | # echo $artUrl 44 | # done 45 | # fi 46 | } 47 | 48 | get_music_status() { 49 | status=$(playerctl status --no-messages) 50 | 51 | if [ "$status" == "Playing" ]; then 52 | echo "playing" 53 | else 54 | echo "" 55 | fi 56 | } 57 | 58 | get_music_player_name() { 59 | player=$(playerctl -l --no-messages | awk 'NR == 1 {print $1}') 60 | 61 | if [ "${player:0:7}" == "firefox" ]; then 62 | echo "Firefox" 63 | elif [ "$player" == "spotify" ]; then 64 | echo "Spotify" 65 | fi 66 | } 67 | 68 | get_music_player_icon() { 69 | player=$(playerctl -l --no-messages | awk 'NR == 1 {print $1}') 70 | 71 | if [ "${player:0:7}" == "firefox" ]; then 72 | echo "󰈹" 73 | elif [ "$player" == "spotify" ]; then 74 | echo "󰓇" 75 | fi 76 | } 77 | 78 | # Main 79 | case "$1" in 80 | "--title" ) get_music_title ;; 81 | "--artist" ) get_music_artist ;; 82 | "--cover" ) get_music_cover ;; 83 | "--status" ) get_music_status ;; 84 | "--toggle" ) playerctl play-pause --no-messages ;; 85 | "--next" ) playerctl next --no-messages ;; 86 | "--prev" ) playerctl previous --no-messages ;; 87 | "--player_name" ) get_music_player_name ;; 88 | "--player_icon" ) get_music_player_icon ;; 89 | esac 90 | 91 | 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /new_eww/scripts/network.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ###################################################################### 4 | ## You need to install iw, networkmanager, nmcli 5 | ###################################################################### 6 | 7 | ewwPath="$HOME/.config/eww" 8 | 9 | get_con_status() { 10 | if [ "$(nmcli g | awk '{print $1}' | grep connected)" == "connected" ]; then 11 | echo "connected" 12 | else 13 | echo "disconnected" 14 | fi 15 | } 16 | 17 | get_ssid() { 18 | ssid=$(nmcli device show | grep GENERAL.CONNECTION | grep -v -E "\slo$") 19 | echo $(echo $ssid | awk 'NR == 1 {print $2}') 20 | } 21 | 22 | get_inet4() { 23 | echo $(nmcli --pretty | grep inet4 | awk 'NR == 1 {print $2}') 24 | } 25 | 26 | toggle() { 27 | conName=$(nmcli con show | grep -v -E "^lo\s" | awk 'NR == 2 {print $1}') 28 | 29 | if [ "$(get_con_status)" == "connected" ]; then 30 | nmcli con down $conName 31 | else 32 | nmcli con up $conName 33 | fi 34 | } 35 | 36 | update_eww_json() { 37 | ssidList=$(sudo iw wlan0 scan | grep "SSID:" | awk '{print $2}' | sort | uniq | grep "^[A-Za-z].*$") 38 | 39 | # Create json array 40 | ssidJson=[\"$(echo $ssidList | sed -e 's/ /", "/g')\"] 41 | 42 | eww -c $ewwPath update JSON_SSID="$ssidJson" 43 | } 44 | 45 | # Main 46 | if [ "$1" == "--con_status" ]; then 47 | get_con_status 48 | elif [ "$1" == "--ssid" ]; then 49 | get_ssid 50 | elif [ "$1" == "--inet4" ]; then 51 | get_inet4 52 | elif [ "$1" == "--toggle" ]; then 53 | toggle 54 | elif [ "$1" == "--update_eww_json" ]; then 55 | update_eww_json 56 | fi 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /new_eww/scripts/rev_sw/rev_sw_center_dmenu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ewwPath="$HOME/.config/eww" 4 | 5 | v0="SHOW_CENTER_DMENU_PAGE0" 6 | v1="SHOW_CENTER_DMENU_PAGE1" 7 | 8 | case "$1" in 9 | "--rev_page0" ) 10 | eww -c $ewwPath update $v0=true $v1=false 11 | ;; 12 | 13 | "--rev_page1" ) 14 | eww -c $ewwPath update $v0=false $v1=true 15 | ;; 16 | esac 17 | 18 | -------------------------------------------------------------------------------- /new_eww/scripts/rev_sw/rev_sw_top_bar.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ewwPath="$HOME/.config/eww" 4 | 5 | vs="SHOW_BAR_CENTER_REV_SW" 6 | v0="SHOW_BAR_CENTER_PAGE0" 7 | v1="SHOW_BAR_CENTER_PAGE1" 8 | v2="SHOW_BAR_CENTER_PAGE2" 9 | 10 | case "$1" in 11 | "--rev_rev_switcher" ) 12 | eww -c $ewwPath update $vs=true $v0=false $v1=false $v2=false 13 | ;; 14 | 15 | "--rev_page0" ) 16 | eww -c $ewwPath update $vs=false $v0=true $v1=false $v2=false 17 | ;; 18 | 19 | "--rev_page1" ) 20 | eww -c $ewwPath update $vs=false $v0=false $v1=true $v2=false 21 | ;; 22 | 23 | "--rev_page2" ) 24 | eww -c $ewwPath update $vs=false $v0=false $v1=false $v2=true 25 | ;; 26 | esac 27 | 28 | -------------------------------------------------------------------------------- /new_eww/scripts/rice_changer/chcolor.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ewwPath="$HOME/.config/eww" 4 | 5 | re_link() { 6 | 7 | if [ -L $ewwPath/scss/color.scss ]; then 8 | ln -fs $ewwPath/scss/colors/$name.scss $ewwPath/scss/color.scss 9 | else 10 | ln -s $ewwPath/scss/colors/$name.scss $ewwPath/scss/color.scss 11 | fi 12 | } 13 | 14 | # Main 15 | name=$(echo $1 | sed -e 's/^--//g') 16 | 17 | if [ -f $ewwPath/scss/colors/$name.scss ]; then 18 | re_link $name 19 | fi 20 | -------------------------------------------------------------------------------- /new_eww/scripts/rice_changer/json/riceset.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "rice_name": "rose", 4 | "wall_path": "rose.jpeg", 5 | "scss_name": "rose" 6 | }, 7 | { 8 | "rice_name": "sugar", 9 | "wall_path": "sugar.jpg", 10 | "scss_name": "sugar" 11 | }, 12 | { 13 | "rice_name": "hard_purple", 14 | "wall_path": "hard_purple.jpg", 15 | "scss_name": "hard_purple" 16 | }, 17 | { 18 | "rice_name": "soft_blue", 19 | "wall_path": "soft_blue.jpg", 20 | "scss_name": "soft_blue" 21 | }, 22 | { 23 | "rice_name": "solid_white", 24 | "wall_path": "solid_white.png", 25 | "scss_name": "solid_white" 26 | }, 27 | { 28 | "rice_name": "cosmic", 29 | "wall_path": "cosmic.jpg", 30 | "scss_name": "cosmic" 31 | }, 32 | { 33 | "rice_name": "soft_purple", 34 | "wall_path": "soft_purple.jpg", 35 | "scss_name": "soft_purple" 36 | }, 37 | { 38 | "rice_name": "bubblegum", 39 | "wall_path": "bubblegum.jpg", 40 | "scss_name": "bubblegum" 41 | }, 42 | { 43 | "rice_name": "rosepine", 44 | "wall_path": "rosepine_flower.jpg", 45 | "scss_name": "rosepine" 46 | }, 47 | { 48 | "rice_name": "calm_pink", 49 | "wall_path": "calm_pink.jpg", 50 | "scss_name": "calm_pink" 51 | }, 52 | { 53 | "rice_name": "siroihana", 54 | "wall_path": "hana.jpg", 55 | "scss_name": "siroihana" 56 | } 57 | ] -------------------------------------------------------------------------------- /new_eww/scripts/rice_changer/manage_eww_colors.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ewwPath="$HOME/.config/eww" 4 | vIndex="INDEX_RICESET_CURR" 5 | v0="COLOR_RICESET_CURR_FG" 6 | v1="COLOR_RICESET_CURR_PR" 7 | 8 | 9 | get_fg() { 10 | index=$(eww -c $ewwPath get $vIndex) 11 | cat ~/.config/eww/scss/colors/$(eww -c $ewwPath get JSON_RICESET | jq ".[$index].scss_name" | sed -e 's/"//g').scss | grep \$fg: | awk '{print $2}' | sed -e 's/#//g' -e 's/;//g' 12 | } 13 | 14 | get_primary() { 15 | index=$(eww -c $ewwPath get $vIndex) 16 | cat ~/.config/eww/scss/colors/$(eww -c $ewwPath get JSON_RICESET | jq ".[$index].scss_name" | sed -e 's/"//g').scss | grep \$primary: | awk '{print $2}' | sed -e 's/#//g' -e 's/;//g' 17 | } 18 | 19 | update_fg() { 20 | fg=$(get_fg) 21 | eww -c $ewwPath update $v0="$fg" 22 | } 23 | 24 | update_primary() { 25 | primary=$(get_primary) 26 | eww -c $ewwPath update $v1="$primary" 27 | } 28 | 29 | # Main 30 | if [ "$1" == "--get_fg" ]; then 31 | get_fg 32 | elif [ "$1" == "--get_primary" ]; then 33 | get_primary 34 | elif [ "$1" == "--update_fg" ]; then 35 | update_fg 36 | elif [ "$1" == "--update_primary" ]; then 37 | update_primary 38 | elif [ "$1" == "--update_all" ]; then 39 | $(update_fg) 40 | $(update_primary) 41 | fi 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /new_eww/scripts/rice_changer/manage_eww_index.sh: -------------------------------------------------------------------------------- 1 | #/bin/bash 2 | 3 | ewwPath="$HOME/.config/eww" 4 | v0="INDEX_RICESET_CURR" 5 | v1="INDEX_RICESET_NEXT" 6 | v2="INDEX_RICESET_PREV" 7 | 8 | get_curr() { 9 | eww -c $ewwPath get $v0 10 | } 11 | 12 | get_next() { 13 | length=$(eww -c $ewwPath get JSON_RICESET | jq ". | length") 14 | current=$(eww -c $ewwPath get $v0) 15 | next=$(( $current + 1 )) 16 | 17 | # Null check 18 | if [ "$length" == "" ]; then 19 | return 20 | fi 21 | 22 | if [ "$next" == "$length" ]; then 23 | echo 0 24 | else 25 | echo $(( $next )) 26 | fi 27 | } 28 | 29 | get_prev() { 30 | length=$(eww -c $ewwPath get JSON_RICESET | jq ". | length") 31 | current=$(eww -c $ewwPath get $v0) 32 | prev=$(( $current - 1 )) 33 | 34 | # Null check 35 | if [ "$length" == "" ]; then 36 | return 37 | fi 38 | 39 | if [ "$prev" == "-1" ]; then 40 | echo $(( $length - 1 )) 41 | else 42 | echo $prev 43 | fi 44 | } 45 | 46 | incr() { 47 | length=$(eww -c $ewwPath get JSON_RICESET | jq ". | length") 48 | current=$(eww -c $ewwPath get $v0) 49 | next=$(( $current + 1 )) 50 | 51 | # Null check 52 | if [ "$length" == "" ]; then 53 | return 54 | fi 55 | 56 | if [ "$next" == "$length" ]; then 57 | eww -c $ewwPath update $v0="0" 58 | else 59 | eww -c $ewwPath update $v0=$next 60 | fi 61 | 62 | next_next=$(get_next) 63 | echo $next_next 64 | eww -c $ewwPath update $v1="$next_next" 65 | eww -c $ewwPath update $v2="$current" 66 | } 67 | 68 | decr() { 69 | length=$(eww -c $ewwPath get JSON_RICESET | jq ". | length") 70 | current=$(eww -c $ewwPath get $v0) 71 | prev=$(( $current - 1 )) 72 | 73 | # Null check 74 | if [ "$length" == "" ]; then 75 | return 76 | fi 77 | 78 | if [ "$prev" == "-1" ]; then 79 | eww -c $ewwPath update $v0="$(( $length - 1 ))" 80 | else 81 | eww -c $ewwPath update $v0=$prev 82 | fi 83 | 84 | prev_prev=$(get_prev) 85 | eww -c $ewwPath update $v1="$current" 86 | eww -c $ewwPath update $v2="$prev_prev" 87 | } 88 | 89 | set_index() { 90 | length=$(eww -c $ewwPath get JSON_RICESET | jq ". | length") 91 | 92 | if [ $(( $1 )) -lt $(( $length )) ]; then 93 | eww -c $ewwPath update $v0=$1 94 | 95 | next=get_next 96 | prev=get_prev 97 | 98 | eww -c $ewwPath update $v1="$next" 99 | eww -c $ewwPath update $v2="$prev" 100 | fi 101 | } 102 | 103 | # Main 104 | if [ "$1" == "--get_curr" ]; then 105 | get_curr 106 | elif [ "$1" == "--get_next" ]; then 107 | get_next 108 | elif [ "$1" == "--get_prev" ]; then 109 | get_prev 110 | elif [ "$1" == "--incr" ]; then 111 | incr 112 | elif [ "$1" == "--decr" ]; then 113 | decr 114 | elif [ "$1" == "--set_index" ]; then 115 | set_index $2 116 | fi 117 | 118 | 119 | -------------------------------------------------------------------------------- /new_eww/scripts/rice_changer/manage_eww_json.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ewwPath="$HOME/.config/eww" 4 | v0="JSON_RICESET" 5 | 6 | if [[ -d $ewwPath/scripts/rice_changer/json && -f $ewwPath/scripts/rice_changer/json/riceset.json ]]; then 7 | json=$(cat $ewwPath/scripts/rice_changer/json/riceset.json) 8 | eww -c $ewwPath update $v0="$json" 9 | fi 10 | 11 | 12 | -------------------------------------------------------------------------------- /new_eww/scripts/rice_changer/rice_changer.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import os 4 | import sys 5 | import json 6 | import subprocess 7 | 8 | workDir = "/.config/eww/scripts/rice_changer" 9 | jsonPath = "./json/riceset.json" 10 | converterPath = "/.config/eww/scripts/convert_images/convert_images.py" 11 | imgDir = "/.config/eww/scripts/convert_images/images" 12 | 13 | ewwLauncher0 = "/.config/eww/scripts/launcher/launch_top_bar.sh" 14 | ewwLauncher1 = "/.config/eww/scripts/launcher/launch_left_widget_v2.sh" 15 | ewwLauncher2 = "/.config/eww/scripts/launcher/launch_right_mplayer.sh" 16 | ewwLauncher3 = "/.config/eww/scripts/launcher/launch_bottom_bar.sh" 17 | ewwLauncher4 = "/.config/eww/scripts/launcher/launch_center_dashboard.sh" 18 | 19 | #--------------------------------------------------------------------- 20 | class RiceManager: 21 | def __init__(self, rice_name, wall_path, scss_name): 22 | self.rice_name = rice_name 23 | self.wall_path = wall_path 24 | self.scss_name = scss_name 25 | 26 | def add_rice(self): 27 | HOME=os.environ["HOME"] 28 | 29 | # Read the json file 30 | with open(jsonPath, 'r') as f: 31 | rice_list = json.load(f) 32 | 33 | # Check the name collision 34 | if (rice_list != []): 35 | for rice in rice_list: 36 | if (rice["rice_name"] == self.rice_name): 37 | print("The name is already used.") 38 | return 39 | 40 | rice = dict(rice_name=self.rice_name, 41 | wall_path=self.wall_path, 42 | scss_name=self.scss_name) 43 | 44 | # Add a new rice 45 | rice_list.append(rice) 46 | 47 | # It's absolutely IDIOT. but im lazy uwu* 48 | # Save blurred wall 49 | subprocess.run(HOME + converterPath + " -b " + 50 | HOME + "/Pictures/wallpapers/" + rice["wall_path"] + 51 | " " + "/images/wall_blur/" + rice["wall_path"], shell=True) 52 | 53 | # Save ziped wall 54 | subprocess.run(HOME + converterPath + " -z " + 55 | HOME + "/Pictures/wallpapers/" + rice["wall_path"] + 56 | " " + "/images/zip_imgs/" + rice["wall_path"], shell=True) 57 | 58 | # Overwrite the json file 59 | with open(jsonPath, 'w') as f: 60 | json.dump(rice_list, f, indent=4) 61 | 62 | #--------------------------------------------------------------------- 63 | def del_rice(rice_name): 64 | # Read the json file 65 | with open(jsonPath, 'r') as f: 66 | rice_list = json.load(f) 67 | 68 | # Remove the blurred wall 69 | # Remove the ziped wall 70 | for rice in rice_list: 71 | if rice["rice_name"] == rice_name: 72 | cmd = "rm -f " + os.environ["HOME"] + imgDir + "/wall_blur/" + rice["wall_path"] 73 | subprocess.run(cmd, shell=True) 74 | 75 | cmd = "rm -f " + os.environ["HOME"] + imgDir + "/zip_imgs/" + rice["wall_path"] 76 | subprocess.run(cmd, shell=True) 77 | 78 | # Delete the specified rice 79 | rice_list = [rice for rice in rice_list if (rice_name != rice["rice_name"])] 80 | 81 | # Overwrite the json file 82 | with open(jsonPath, 'w') as f: 83 | json.dump(rice_list, f, indent=4) 84 | 85 | def del_all(): 86 | # Read the json file 87 | # Remove the images 88 | with open(jsonPath, 'r') as f: 89 | rice_list = json.load(f) 90 | 91 | for rice in rice_list: 92 | cmd = "rm -f " + os.environ["HOME"] + imgDir + "/wall_blur/" + rice["wall_path"] 93 | subprocess.run(cmd, shell=True) 94 | 95 | cmd = "rm -f " + os.environ["HOME"] + imgDir + "/zip_imgs/" + rice["wall_path"] 96 | subprocess.run(cmd, shell=True) 97 | 98 | # Delete everything 99 | with open(jsonPath, 'w') as f: 100 | json.dump([], f, indent=4) 101 | 102 | 103 | def set_rice(rice_name): 104 | HOME=os.environ["HOME"] 105 | CDIR=os.getcwd() 106 | 107 | # Read the json file 108 | with open(jsonPath, 'r') as f: 109 | rice_list = json.load(f) 110 | 111 | for rice in rice_list: 112 | if rice["rice_name"] == rice_name: 113 | 114 | subprocess.run(HOME + ewwLauncher0 + " --close", shell=True) 115 | subprocess.run(HOME + ewwLauncher1 + " --close", shell=True) 116 | subprocess.run(HOME + ewwLauncher2 + " --close", shell=True) 117 | subprocess.run(HOME + ewwLauncher3 + " --close", shell=True) 118 | 119 | subprocess.run(CDIR + "/./wallpaper.sh --set " + rice["wall_path"], shell=True) 120 | subprocess.run(CDIR + "/./chcolor.sh " + rice["scss_name"], shell=True) 121 | 122 | subprocess.run(HOME + ewwLauncher4 + " --close", shell=True) 123 | 124 | subprocess.run(HOME + ewwLauncher0 + " --open", shell=True) 125 | subprocess.run(HOME + ewwLauncher1 + " --open", shell=True) 126 | subprocess.run(HOME + ewwLauncher2 + " --open", shell=True) 127 | subprocess.run(HOME + ewwLauncher3 + " --open", shell=True) 128 | 129 | def sort_by(rice_name): 130 | with open(jsonPath, 'r') as f: 131 | rice_list = json.load(f) 132 | 133 | sorted_rice_list = [rice for rice in rice_list if (rice_name == rice["rice_name"])] + [rice for rice in rice_list if (rice_name != rice["rice_name"])] 134 | 135 | with open(jsonPath, 'w') as f: 136 | json.dump(sorted_rice_list, f, indent=4) 137 | 138 | #--------------------------------------------------------------------- 139 | def main(): 140 | os.chdir(os.environ["HOME"] + workDir) 141 | args = sys.argv 142 | HOME=os.environ["HOME"] 143 | 144 | # Create img dir 145 | if not os.path.isdir(HOME + imgDir): 146 | subprocess.run("mkdir " + HOME + imgDir, shell=True) 147 | 148 | # Create json dir 149 | if not os.path.isdir("./json"): 150 | subprocess.run("mkdir ./json", shell=True) 151 | 152 | # Create json file 153 | if not os.path.isfile(jsonPath): 154 | subprocess.run("touch " + jsonPath, shell=True) 155 | subprocess.run("echo '[]' > " + jsonPath, shell=True) 156 | 157 | # Check the args 158 | try: 159 | if args[1] == "--add": 160 | rice_manager = RiceManager(args[2], args[3], args[4]) 161 | rice_manager.add_rice() 162 | 163 | elif args[1] == "--del": 164 | if args[2] == "-a": 165 | del_all() 166 | else: 167 | del_rice(args[2]) 168 | 169 | elif args[1] == "--set": 170 | set_rice(args[2]) 171 | 172 | elif args[1] == "--sort_by": 173 | sort_by(args[2]) 174 | except IndexError: 175 | print("Invalid args!", file=sys.stderr) 176 | sys.exit(1) 177 | 178 | if __name__ == "__main__": 179 | main() 180 | 181 | -------------------------------------------------------------------------------- /new_eww/scripts/rice_changer/wallpaper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ###################################################################### 4 | ## You need to install feh 5 | ###################################################################### 6 | 7 | ewwPath="$HOME/.config/eww" 8 | 9 | if [ ! -d $HOME/Pictures ]; then 10 | mkdir $HOME/Pictures 11 | fi 12 | 13 | if [ ! -d $HOME/Pictures/wallpapers ]; then 14 | mkdir $HOME/Pictures/wallpapers 15 | fi 16 | 17 | set_wall() { 18 | if [ -a $HOME/Pictures/wallpapers/$1 ]; then 19 | path="$HOME/Pictures/wallpapers/$1" 20 | 21 | # Create link to the original source 22 | rm -f $ewwPath/images/currentwall/* 23 | ln -s $path $ewwPath/images/currentwall/currentwall 24 | 25 | # Create Blurred version 26 | $ewwPath/scripts/convert_images/./convert_images.py -b $ewwPath/images/currentwall/currentwall "/images/currentwall/res.png" 27 | 28 | # Set wallpaper 29 | feh --bg-fill $path 30 | fi 31 | } 32 | 33 | set_rand_wall() { 34 | # Get list of the path 35 | wallPathArray=$(ls -1 $HOME/Pictures/wallpapers/*) 36 | 37 | # Random value that 1 to MAX 38 | index=$(( (`echo $RANDOM`) % (`echo $wallPathArray | tr -dc ' ' | wc -c` + 1) + 1 )) 39 | 40 | # Chose a wallpaper 41 | path=$(echo $wallPathArray | cut -d " " -f $index) 42 | 43 | # Create link to the original source 44 | rm -f $ewwPath/images/currentwall/* 45 | ln -s $path $ewwPath/images/currentwall/currentwall 46 | 47 | # Create Blurred version 48 | $ewwPath/scripts/convert_images/./convert_images.py -b $ewwPath/images/currentwall/currentwall "/images/currentwall/res.png" 49 | 50 | # Set wallpaper 51 | feh --bg-fill $path 52 | } 53 | 54 | # Main 55 | if [[ "$1" == "--set" && "$2" != "" ]]; then 56 | set_wall $2 57 | elif [[ "$1" == "--set_rand_wall" ]]; then 58 | set_rand_wall 59 | fi 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /new_eww/scripts/screenshot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ###################################################################### 4 | ## You need to install maim 5 | ###################################################################### 6 | 7 | ewwPath="$HOME/.config/eww/" 8 | path="$HOME/Pictures/screenshots" 9 | name=$(date '+screenShot%Y%m%d_%H%M%S.jpg') 10 | 11 | # Take screenshot 12 | case "$1" in 13 | "--select" ) maim -m 10 -s $path/$name; feh $path/$name ;; 14 | "--full" ) maim -m 10 $path/$name ;; 15 | esac 16 | 17 | 18 | -------------------------------------------------------------------------------- /new_eww/scripts/wallpaper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ###################################################################### 4 | ## You need to install feh 5 | ###################################################################### 6 | 7 | ewwPath="$HOME/.config/eww" 8 | 9 | if [ ! -d $HOME/Pictures ]; then 10 | mkdir $HOME/Pictures 11 | fi 12 | 13 | if [ ! -d $HOME/Pictures/wallpapers ]; then 14 | mkdir $HOME/Pictures/wallpapers 15 | fi 16 | 17 | # Get list of the path 18 | wallPathArray=$(ls -1 $HOME/Pictures/wallpapers/*) 19 | 20 | # Random value that 1 to MAX 21 | index=$(( (`echo $RANDOM`) % (`echo $wallPathArray | tr -dc ' ' | wc -c` + 1) + 1 )) 22 | 23 | # Chose a wallpaper 24 | path=$(echo $wallPathArray | cut -d " " -f $index) 25 | 26 | # Create link to the original source 27 | rm -f $ewwPath/images/currentwall/* 28 | ln -s $path $ewwPath/images/currentwall/currentwall 29 | 30 | # Create Blurred version 31 | $ewwPath/scripts/convert_images/./convert_images.py -b $ewwPath/images/currentwall/currentwall "/images/currentwall" 32 | 33 | # Set wallpaper 34 | feh --bg-fill $path 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /new_eww/scripts/weather.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ###################################################################### 4 | # Put in your api and stuff link here 5 | # If you dunno, head to openweathermap.org, and make and account 6 | # (completely free I swear, and then get your API Key and your City ID) 7 | # I wish I was smart enough to do it like Elena, but this is the top I could do lol 8 | # 9 | # ~~~~~ From Github.com/Axarva/dotfiles-2.0 ~~~~~ 10 | # 11 | # And this script require jq 12 | ###################################################################### 13 | 14 | KEY="580b0c4f99b71700c309e7f90cafabc8" 15 | ID="Tokyo" 16 | UNIT="metric" # Available values : metric, imperial 17 | 18 | get_conditions() { 19 | wheather_json=$(curl -s "https://api.openweathermap.org/data/2.5/weather?q=$ID&units=$UNIT&APPID=$KEY") 20 | echo $wheather_json | jq '.weather[0].main' | sed -e 's/"//g' 21 | } 22 | 23 | get_temperature() { 24 | wheather_json=$(curl -s "https://api.openweathermap.org/data/2.5/weather?q=$ID&units=$UNIT&APPID=$KEY") 25 | echo $wheather_json | jq '.main.temp' | awk '{printf "%d\n", $1}' 26 | } 27 | 28 | # Main 29 | if [ "$1" == "--conditions" ]; then 30 | get_conditions 31 | elif [ "$1" == "--temperature" ]; then 32 | get_temperature 33 | elif [ "$1" == "--locale" ]; then 34 | echo $ID 35 | fi 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /new_eww/scripts/workspace/main: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tail-R/xmonad_eww_dotfiles/6888e82c377fb16d67fa4741f5fabd6ffdf5225a/new_eww/scripts/workspace/main -------------------------------------------------------------------------------- /new_eww/scripts/workspace/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | unsigned short get_number_of_desktops( 8 | Display *disp, 9 | Window root 10 | ) { 11 | 12 | // Results 13 | Atom type_return; 14 | int format_return; 15 | unsigned long nitems_return; 16 | unsigned long bytes_left; 17 | unsigned char *data; 18 | 19 | Atom prop = XInternAtom(disp, "_NET_NUMBER_OF_DESKTOPS", False); 20 | 21 | XGetWindowProperty( 22 | disp, 23 | root, 24 | prop, 25 | 0, 26 | 1, 27 | False, 28 | AnyPropertyType, 29 | &type_return, 30 | &format_return, 31 | &nitems_return, 32 | &bytes_left, 33 | &data 34 | ); 35 | 36 | unsigned short res = *((unsigned short*)data); 37 | XFree(data); 38 | return res; 39 | } 40 | 41 | //******************************************************************** 42 | int main (void) { 43 | Display *disp; 44 | Window root; 45 | Atom property; 46 | XEvent event; 47 | 48 | FILE *fp; 49 | unsigned char cmd[1024]; 50 | 51 | // Open default display 52 | disp = XOpenDisplay(NULL); 53 | if (!disp) return 1; 54 | 55 | // Get default root window 56 | root = DefaultRootWindow(disp); 57 | 58 | // Get number of the desktops 59 | unsigned short nod = get_number_of_desktops(disp, root); 60 | printf("Number of the desktops: %d\n", nod); 61 | 62 | // Request send notifycations 63 | XSelectInput(disp, root, SubstructureNotifyMask); 64 | 65 | for (;;) { 66 | XNextEvent(disp, &event); 67 | 68 | if (event.xmap.type == MapNotify) { 69 | // printf("Mapped: %d\n", event.xmap.window); 70 | sprintf(cmd, "echo %s %d", "Mapped:", event.xmap.window); 71 | system(cmd); 72 | } 73 | 74 | if (event.xunmap.type == UnmapNotify) { 75 | // printf("Unmapped: %d\n", event.xunmap.window); 76 | sprintf(cmd, "echo %s %d", "Unmapped:", event.xmap.window); 77 | system(cmd); 78 | } 79 | } 80 | 81 | return 0; 82 | } 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /new_eww/scripts/workspaces.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | check_occupied() { 4 | wmctrl -l | awk '{print $2}' | uniq | while read -r op; do 5 | if [ "$op" == "$1" ]; then 6 | echo "true" 7 | return 8 | fi 9 | done 10 | } 11 | 12 | # Main 13 | xprop -spy -root _NET_CURRENT_DESKTOP | while read -r; do 14 | wsNumber=$(wmctrl -d | awk '{print $1}' | tail -c 2) 15 | 16 | wmctrl -d | awk '{print $1 " " $2 " " $9}' | while read -r number status name; do 17 | statusClass="ws_inactive" 18 | # icon="󰧞" 19 | icon="󰣏" 20 | 21 | if [ "$(check_occupied $number)" == "true" ]; then 22 | statusClass="ws_occupied" 23 | # icon="󰊠" 24 | # icon="" 25 | icon="󰮿" 26 | fi 27 | 28 | if [ "$status" == "*" ]; then # "*" mean active 29 | statusClass="ws_active" 30 | # icon="󰮯" 31 | # icon="" 32 | icon="" 33 | fi 34 | 35 | buffered+=$' ' 36 | buffered+="(label :class '$statusClass' :text '$icon')" 37 | 38 | if [ "$number" == "$wsNumber" ]; then 39 | echo "(box :space-evenly false :spacing 20 $buffered)" 40 | fi 41 | done 42 | done 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /new_eww/scss/colors/calm_blue.scss: -------------------------------------------------------------------------------- 1 | $fg: #fdf1f3; 2 | $fg-alt: #545450; 3 | $bg: #2f2524; 4 | $bg-alt: #52433e; 5 | 6 | $shadow: #1e1e1e; 7 | 8 | $primary: #7d83a7; 9 | $primary-alt: #efeda4; 10 | $secondary: #8aa0ae; 11 | $secondary-alt: #f0be9d; 12 | -------------------------------------------------------------------------------- /new_eww/scss/colors/calm_pink.scss: -------------------------------------------------------------------------------- 1 | $fg: #f5f5f5; 2 | $fg-alt: #a07572; 3 | $bg: #543b3c; 4 | $bg-alt: #906562; 5 | 6 | $shadow: #1e1e1e; 7 | 8 | $primary: #fea4b0; 9 | $primary-alt: #eeeffe; 10 | $secondary: #fdafab; 11 | $secondary-alt: #fec9cb; 12 | -------------------------------------------------------------------------------- /new_eww/scss/colors/patch.scss: -------------------------------------------------------------------------------- 1 | $fg: #ece0ec; 2 | $fg-alt: #545454; 3 | $bg: #32322e; 4 | $bg-alt: #444444; 5 | 6 | $shadow: #1e1e1e; 7 | 8 | $primary: #a68bcf; 9 | $primary-alt: #efeda4; 10 | $secondary: #f290c2; 11 | $secondary-alt: #6dc2e9; 12 | -------------------------------------------------------------------------------- /new_eww/scss/colors/rust.scss: -------------------------------------------------------------------------------- 1 | $fg: #fbf5e9; 2 | $fg-alt: #545450; 3 | $bg: #2f2524; 4 | $bg-alt: #52433e; 5 | 6 | $shadow: #1e1e1e; 7 | 8 | $primary: #f26f21; 9 | $primary-alt: #eeeecc; 10 | $secondary: #ce9578; 11 | $secondary-alt: #a0a86d; 12 | -------------------------------------------------------------------------------- /new_eww/scss/colors/soft_blue.scss: -------------------------------------------------------------------------------- 1 | $fg: #ece0ec; 2 | $fg-alt: #545454; 3 | $bg: #32322e; 4 | $bg-alt: #444444; 5 | 6 | $shadow: #1e1e1e; 7 | 8 | $primary: #a0c0eb; 9 | $primary-alt: #efeda4; 10 | $secondary: #f290c2; 11 | $secondary-alt: #e9bfc8; 12 | 13 | -------------------------------------------------------------------------------- /new_eww/scss/colors/soft_purple.scss: -------------------------------------------------------------------------------- 1 | $fg: #ece0ec; 2 | $fg-alt: #545450; 3 | $bg: #32322e; 4 | $bg-alt: #43433f; 5 | 6 | $shadow: #1e1e1e; 7 | 8 | $primary: #a68bcf; 9 | $primary-alt: #efeda4; 10 | $secondary: #f290c2; 11 | $secondary-alt: #efb286; 12 | 13 | -------------------------------------------------------------------------------- /new_eww/scss/normal_css/_style_bottom_bar.scss: -------------------------------------------------------------------------------- 1 | /***** Window *******************************************************/ 2 | .window_bottom_bar { 3 | // background-color: rgba($primary, 0.5); 4 | } 5 | 6 | /***** Widget *******************************************************/ 7 | .bottom_bar_root_box { 8 | transition: 300ms ease; 9 | } 10 | 11 | .bottom_bar_dock_center { 12 | background-color: $bg; 13 | border-radius: 1rem; 14 | box-shadow: 0rem 0rem 0.4rem $shadow; 15 | } 16 | 17 | .dock_center_bumper_left { 18 | background-color: $bg-alt; 19 | border-radius: 1rem 0rem 0rem 1rem; 20 | } 21 | 22 | .dock_center_launch_left_widget { 23 | background-color: $bg-alt; 24 | border-radius: 1rem; 25 | transition: 200ms ease; 26 | 27 | .icon { 28 | color: $primary; 29 | font-size: 2.8rem; 30 | padding-right: 0.5rem; 31 | } 32 | 33 | &:hover { 34 | opacity: 0.5; 35 | } 36 | } 37 | 38 | .dock_center_launch_center_dashboard { 39 | background-color: $bg-alt; 40 | border-radius: 1rem; 41 | transition: 200ms ease; 42 | 43 | .icon { 44 | color: $primary-alt; 45 | font-size: 2.8rem; 46 | padding-right: 0.2rem; 47 | } 48 | 49 | &:hover { 50 | opacity: 0.5; 51 | } 52 | } 53 | 54 | .dock_center_launch_terminal { 55 | background-color: $bg-alt; 56 | border-radius: 1rem; 57 | transition: 200ms ease; 58 | 59 | .icon { 60 | color: $secondary; 61 | font-size: 2.8rem; 62 | padding-right: 0.3rem; 63 | } 64 | 65 | &:hover { 66 | opacity: 0.5; 67 | } 68 | } 69 | 70 | .dock_center_launch_browser { 71 | background-color: $bg-alt; 72 | border-radius: 1rem; 73 | transition: 200ms ease; 74 | 75 | .icon { 76 | color: $secondary-alt; 77 | font-size: 2.8rem; 78 | padding-right: 0.5rem; 79 | } 80 | 81 | &:hover { 82 | opacity: 0.5; 83 | } 84 | } 85 | 86 | 87 | .dock_center_launch_ss_full { 88 | background-color: $bg-alt; 89 | border-radius: 1rem; 90 | transition: 200ms ease; 91 | 92 | .icon { 93 | color: $primary-alt; 94 | font-size: 2.8rem; 95 | padding-right: 0.5rem; 96 | } 97 | 98 | &:hover { 99 | opacity: 0.5; 100 | } 101 | } 102 | 103 | .dock_center_launch_ss_select { 104 | background-color: $bg-alt; 105 | border-radius: 1rem; 106 | transition: 200ms ease; 107 | 108 | .icon { 109 | color: $secondary-alt; 110 | font-size: 2.6rem; 111 | padding-right: 0.5rem; 112 | } 113 | 114 | &:hover { 115 | opacity: 0.5; 116 | } 117 | } 118 | 119 | .dock_center_launch_right_mplayer { 120 | background-color: $bg-alt; 121 | border-radius: 1rem; 122 | transition: 300ms ease; 123 | 124 | .icon { 125 | color: $secondary; 126 | font-size: 2.8rem; 127 | padding-right: 0.5rem; 128 | } 129 | 130 | &:hover { 131 | opacity: 0.5; 132 | } 133 | } 134 | 135 | .dock_center_bumper_right { 136 | background-color: $bg-alt; 137 | border-radius: 0rem 1rem 1rem 0rem; 138 | } 139 | -------------------------------------------------------------------------------- /new_eww/scss/normal_css/_style_center_dmenu.scss: -------------------------------------------------------------------------------- 1 | /***** Window *******************************************************/ 2 | .window_center_dmenu { 3 | // background-color: rgba($bg, 0.5); 4 | } 5 | 6 | /***** Widget *******************************************************/ 7 | .gamepad_root_box { 8 | background-color: $primary; 9 | border: 0.25rem solid $fg; 10 | border-top-left-radius: 2rem; 11 | border-top-right-radius: 2rem; 12 | border-bottom-right-radius: 10rem 4rem; 13 | border-bottom-left-radius: 10rem 4rem; 14 | box-shadow: 0rem 0rem 0.4rem $shadow; 15 | } 16 | 17 | .gamepad_disp_padding { 18 | background-color: $fg-alt; 19 | border-top-left-radius: 1rem; 20 | border-top-right-radius: 1rem; 21 | border-bottom-right-radius: 8rem 4rem; 22 | border-bottom-left-radius: 8rem 4rem; 23 | box-shadow: inset 0rem 0rem 0.4rem $bg; 24 | } 25 | 26 | .gamepad_disp_bg { 27 | background-color: $bg; 28 | border-radius: 0.5rem; 29 | } 30 | 31 | .gamepad_input_bar { 32 | background-color: $fg; 33 | border-radius: 1rem; 34 | } 35 | 36 | .gamepad_input_placeholder { 37 | .icon { 38 | color: $primary; 39 | font-size: 1.2rem; 40 | } 41 | 42 | .label { 43 | color: $primary; 44 | font-size: 1.2rem; 45 | font-weight: bold; 46 | } 47 | } 48 | 49 | .gamepad_input_box { 50 | color: $fg-alt; 51 | font-size: 1.15rem; 52 | font-weight: bold; 53 | } 54 | 55 | .gamepad_app_elem { 56 | .label { 57 | color: $fg; 58 | font-weight: bold; 59 | } 60 | } 61 | 62 | .gamepad_app_btn { 63 | background-color: $bg-alt; 64 | border-radius: 1rem; 65 | border: 1rem solid transparent; 66 | transition: 200ms ease; 67 | 68 | &:hover { 69 | background-color: $fg-alt; 70 | border: 0rem solid $primary; 71 | transition: 300ms ease; 72 | } 73 | } 74 | 75 | .gamepad_systemfetch { 76 | .hostname { 77 | .icon { 78 | color: $primary; 79 | font-size: 1.2rem; 80 | } 81 | } 82 | 83 | .distro { 84 | .icon { 85 | color: $primary-alt; 86 | font-size: 1.2rem; 87 | } 88 | 89 | .label { 90 | color: $fg; 91 | font-size: 1.1rem; 92 | font-weight: bold; 93 | } 94 | } 95 | 96 | .model { 97 | .icon { 98 | color: $secondary; 99 | font-size: 1.2rem; 100 | } 101 | 102 | .label { 103 | color: $fg; 104 | font-size: 1.1rem; 105 | font-weight: bold; 106 | } 107 | } 108 | 109 | .wmname { 110 | .icon { 111 | color: $primary; 112 | font-size: 1.4rem; 113 | } 114 | 115 | .label { 116 | color: $fg; 117 | font-size: 1.1rem; 118 | font-weight: bold; 119 | } 120 | } 121 | } 122 | 123 | .gamepad_disp_title { 124 | .e { 125 | color: $primary; 126 | font-size: 2.2rem; 127 | font-weight: bold; 128 | font-style: italic; 129 | text-shadow: 0rem 0rem 0.8rem $primary; 130 | } 131 | 132 | .n { 133 | color: $primary-alt; 134 | font-size: 2.2rem; 135 | font-weight: bold; 136 | font-style: italic; 137 | text-shadow: 0rem 0rem 0.8rem $primary; 138 | } 139 | 140 | .d { 141 | color: $secondary; 142 | font-size: 2.2rem; 143 | font-weight: bold; 144 | font-style: italic; 145 | text-shadow: 0rem 0rem 0.8rem $secondary; 146 | } 147 | 148 | .label { 149 | color: $fg; 150 | font-size: 2.2rem; 151 | font-weight: bold; 152 | font-style: italic; 153 | text-shadow: 0rem 0rem 0.8rem $primary; 154 | } 155 | } 156 | 157 | // .gamepad_con_0_btn, 158 | .gamepad_con_1_btn, 159 | // .gamepad_con_2_btn, 160 | .gamepad_con_3_btn, 161 | .gamepad_con_4_btn, 162 | .gamepad_con_5_btn, 163 | // .gamepad_con_6_btn, 164 | .gamepad_con_7_btn { 165 | // .gamepad_con_8_btn { 166 | background-color: $bg-alt; 167 | 168 | .icon { 169 | color: $fg; 170 | font-size: 1.2rem; 171 | padding-right: 0.2rem; 172 | } 173 | } 174 | 175 | .gamepad_con_1_btn { 176 | border-radius: 0.5rem 0.5rem 0rem 0rem; 177 | } 178 | 179 | .gamepad_con_3_btn { 180 | border-radius: 0.5rem 0rem 0rem 0.5rem; 181 | transition: 200ms ease; 182 | &:hover {opacity: 0.5;} 183 | } 184 | 185 | .gamepad_con_5_btn { 186 | border-radius: 0rem 0.5rem 0.5rem 0rem; 187 | transition: 200ms ease; 188 | &:hover {opacity: 0.5;} 189 | } 190 | 191 | .gamepad_con_7_btn { 192 | border-radius: 0rem 0rem 0.5rem 0.5rem; 193 | } 194 | 195 | .gamepad_con_b_btn { 196 | background-color: $bg-alt; 197 | border-radius: 4rem; 198 | transition: 200ms ease; 199 | 200 | .icon { 201 | color: $fg; 202 | font-size: 3.2rem; 203 | } 204 | 205 | &:hover {opacity: 0.5;} 206 | } 207 | 208 | .gamepad_con_a_btn { 209 | background-color: $bg-alt; 210 | border-radius: 4rem; 211 | transition: 200ms ease; 212 | 213 | .icon { 214 | color: $fg; 215 | font-size: 3.2rem; 216 | } 217 | 218 | &:hover {opacity: 0.5;} 219 | } 220 | 221 | .gamepad_reset_btn { 222 | background-color: $fg; 223 | border-radius: 2rem; 224 | transition: 200ms ease; 225 | 226 | .label { 227 | color: $fg-alt; 228 | font-weight: bold; 229 | } 230 | 231 | &:hover {opacity: 0.5;} 232 | } 233 | 234 | .gamepad_show_wall_btn { 235 | background-color: $fg; 236 | border-radius: 2rem; 237 | transition: 200ms ease; 238 | 239 | .label { 240 | color: $fg-alt; 241 | font-weight: bold; 242 | } 243 | 244 | &:hover {opacity: 0.5;} 245 | } 246 | 247 | .gamepad_sound_hole { 248 | .icon { 249 | color: $fg-alt; 250 | font-size: 4rem; 251 | } 252 | } 253 | 254 | 255 | 256 | 257 | 258 | 259 | -------------------------------------------------------------------------------- /new_eww/scss/normal_css/_style_left_widget.scss: -------------------------------------------------------------------------------- 1 | /***** Window *******************************************************/ 2 | .window_left_widget { 3 | } 4 | 5 | /***** Widget *******************************************************/ 6 | .left_widget_root_box { 7 | background-color: $bg; 8 | border-radius: 2rem; 9 | box-shadow: 0rem 0rem 0.4rem $shadow; 10 | } 11 | 12 | // Clock 13 | .left_widget_clock_time { 14 | background-color: $primary; 15 | border-radius: 2rem; 16 | transition: 200ms ease; 17 | 18 | .label { 19 | color: $primary-alt; 20 | font-size: 5rem; 21 | // font-style: italic; 22 | font-weight: bold; 23 | } 24 | 25 | &:hover { 26 | opacity: 0.5; 27 | } 28 | } 29 | 30 | .left_widget_clock_tray { 31 | border: 0.25rem solid $primary; 32 | border-radius: 2rem; 33 | padding: 1rem 1rem 0.2rem 1rem; 34 | } 35 | 36 | .left_widget_clock_date { 37 | color: $primary-alt; 38 | font-size: 1.8rem; 39 | font-weight: bold; 40 | } 41 | 42 | .left_widget_clock_calendar { 43 | color: $fg; 44 | font-weight: bold; 45 | 46 | &:selected { 47 | color:$bg; 48 | background-color: $primary-alt; 49 | border-radius: 1rem; 50 | } 51 | } 52 | 53 | // Weather 54 | .left_widget_weather_con { 55 | background-color: $secondary; 56 | border-radius: 1rem; 57 | padding-left: 2rem; 58 | padding-right: 2rem; 59 | 60 | color: $fg; 61 | font-size: 1.8rem; 62 | font-weight: bold; 63 | 64 | } 65 | 66 | .left_widget_weather_locale { 67 | .label { 68 | color: $fg; 69 | font-size: 1.8rem; 70 | font-weight: bold; 71 | } 72 | } 73 | 74 | .left_widget_weather_temp { 75 | .label { 76 | color: $fg; 77 | font-size: 1.8rem; 78 | font-weight: bold; 79 | } 80 | 81 | .icon { 82 | color: $fg; 83 | font-size: 1.8rem; 84 | } 85 | } 86 | 87 | // Profile 88 | .left_widget_profile_bg { 89 | border: 0.25rem solid $fg-alt; 90 | border-radius: 2rem; 91 | } 92 | 93 | .left_widget_profile_name { 94 | color: $fg; 95 | font-size: 2rem; 96 | font-style: italic; 97 | font-weight: bold; 98 | } 99 | 100 | // Sysinfo 101 | .left_widget_sysinfo_micvol { 102 | .scale scale trough { 103 | background-color: $bg-alt; 104 | border-radius: 2rem; 105 | min-width: 2rem; 106 | min-height: 12rem; 107 | } 108 | 109 | .scale scale highlight { 110 | background-color: $secondary-alt; 111 | border-radius: 2rem; 112 | } 113 | 114 | .icon { 115 | color: $secondary-alt; 116 | font-size: 2rem; 117 | padding-right: 0.2rem; 118 | } 119 | } 120 | 121 | .left_widget_sysinfo_volume { 122 | .scale scale trough { 123 | background-color: $bg-alt; 124 | border-radius: 2rem; 125 | min-width: 2rem; 126 | min-height: 12rem; 127 | } 128 | 129 | .scale scale highlight { 130 | background-color: $primary; 131 | border-radius: 2rem; 132 | } 133 | 134 | .icon { 135 | color: $primary; 136 | font-size: 2rem; 137 | padding-right: 0.5rem; 138 | } 139 | } 140 | 141 | .left_widget_sysinfo_bright { 142 | .scale scale trough { 143 | background-color: $bg-alt; 144 | border-radius: 2rem; 145 | min-width: 2rem; 146 | min-height: 12rem; 147 | } 148 | 149 | .scale scale highlight { 150 | background-color: $primary-alt; 151 | border-radius: 2rem; 152 | } 153 | 154 | .icon { 155 | color: $primary-alt; 156 | font-size: 1.8rem; 157 | padding-right: 0.5rem; 158 | } 159 | } 160 | 161 | .left_widget_sysinfo_battery { 162 | .scale scale trough { 163 | background-color: $bg-alt; 164 | border-radius: 2rem; 165 | min-width: 2rem; 166 | min-height: 12rem; 167 | } 168 | 169 | .scale scale highlight { 170 | background-color: $secondary; 171 | border-radius: 2rem; 172 | } 173 | 174 | .icon { 175 | color: $secondary; 176 | font-size: 1.8rem; 177 | padding-right: 0.8rem; 178 | } 179 | } 180 | 181 | // Lan 182 | .left_widget_lan_status { 183 | background-color: $bg-alt; 184 | border-radius: 1rem; 185 | 186 | .icon { 187 | color: $secondary-alt; 188 | font-size: 1.8rem; 189 | padding-right: 0.7rem; 190 | } 191 | } 192 | 193 | .left_widget_lan_button_rect { 194 | background-color: $bg-alt; 195 | border-radius: 1rem; 196 | transition: 200ms ease; 197 | 198 | .label { 199 | color: $secondary-alt; 200 | font-size: 1.4rem; 201 | font-weight: bold; 202 | } 203 | 204 | &:hover { 205 | opacity: 0.5 206 | } 207 | } 208 | 209 | .left_widget_lan_button_square { 210 | background-color: $bg-alt; 211 | border-radius: 1rem; 212 | transition: 200ms ease; 213 | 214 | .icon { 215 | color: $secondary-alt; 216 | font-size: 2rem; 217 | } 218 | 219 | &:hover { 220 | opacity: 0.5 221 | } 222 | } 223 | 224 | .left_widget_lan_ssid_entry { 225 | // background-color: $bg-alt; 226 | border: 0.25rem solid $secondary-alt; 227 | border-radius: 1rem; 228 | transition: 200ms ease; 229 | } 230 | 231 | .left_widget_lan_ssid_button { 232 | border-radius: 1rem; 233 | 234 | .label { 235 | color: $fg; 236 | font-size: 1.2rem; 237 | font-weight: bold; 238 | } 239 | 240 | &:hover { 241 | background-color: $fg-alt; 242 | } 243 | } 244 | 245 | // Bluetooth 246 | .left_widget_bt_status { 247 | background-color: $bg-alt; 248 | border-radius: 1rem; 249 | 250 | .icon { 251 | color: $primary; 252 | font-size: 1.8rem; 253 | padding-right: 0.5rem; 254 | } 255 | } 256 | 257 | .left_widget_bt_button_rect { 258 | background-color: $bg-alt; 259 | border-radius: 1rem; 260 | transition: 200ms ease; 261 | 262 | .label { 263 | color: $primary; 264 | font-size: 1.4rem; 265 | font-weight: bold; 266 | } 267 | 268 | &:hover { 269 | opacity: 0.5 270 | } 271 | } 272 | 273 | .left_widget_bt_button_square { 274 | background-color: $bg-alt; 275 | border-radius: 1rem; 276 | transition: 200ms ease; 277 | 278 | .icon { 279 | color: $primary; 280 | font-size: 2rem; 281 | } 282 | 283 | &:hover { 284 | opacity: 0.5 285 | } 286 | } 287 | 288 | .left_widget_bt_devname_entry { 289 | // background-color: $bg-alt; 290 | border: 0.25rem solid $primary; 291 | border-radius: 1rem; 292 | transition: 200ms ease; 293 | } 294 | 295 | .left_widget_bt_devname_button { 296 | border-radius: 1rem; 297 | 298 | .label { 299 | color: $fg; 300 | font-size: 1.2rem; 301 | font-weight: bold; 302 | } 303 | 304 | &:hover { 305 | background-color: $fg-alt; 306 | } 307 | } 308 | 309 | 310 | 311 | -------------------------------------------------------------------------------- /new_eww/scss/normal_css/_style_right_mplayer.scss: -------------------------------------------------------------------------------- 1 | /***** Window *******************************************************/ 2 | .window_right_mplayer { 3 | // background-color: rgba($primary, 0.5); 4 | } 5 | 6 | /***** Widget *******************************************************/ 7 | 8 | /***** uwustagram ***************************************************/ 9 | .right_mplayer_uwustagram_root_box { 10 | background-color: $fg; 11 | box-shadow: 0rem 0rem 0.4rem $shadow; 12 | } 13 | 14 | // ***** Bumper top ***** 15 | .right_mplayer_bumper_top { 16 | background-color: $primary; 17 | 18 | .label { 19 | color: $primary-alt; 20 | font-size: 1.6rem; 21 | font-style: italic; 22 | font-weight: bold; 23 | } 24 | } 25 | 26 | // ***** Box top ***** 27 | .right_mplayer_box_top { 28 | } 29 | 30 | .right_mplayer_decoration_artist_face { 31 | border: 0.2rem solid $fg-alt; 32 | border-radius: 2rem; 33 | 34 | .icon { 35 | color: $fg-alt; 36 | font-size: 1.5rem; 37 | padding-right: 0.2rem; 38 | } 39 | } 40 | 41 | .right_mplayer_artist_name { 42 | .label { 43 | color: $fg-alt; 44 | font-size: 1.2rem; 45 | font-weight: bold; 46 | } 47 | } 48 | 49 | .right_mplayer_decoration_dots { 50 | .icon { 51 | color: $fg-alt; 52 | font-size: 2rem; 53 | } 54 | } 55 | 56 | // ***** Box center ***** 57 | .right_mplayer_box_center { 58 | background-color: $bg; 59 | } 60 | 61 | .right_mplayer_music_cover_fg { 62 | box-shadow: 0rem 0rem 0.4rem $fg; 63 | } 64 | 65 | .right_mplayer_player_status { 66 | background-color: $primary; 67 | border-radius: 1rem; 68 | 69 | .label { 70 | color: $primary-alt; 71 | font-size: 1.2rem; 72 | font-weight: bold; 73 | } 74 | 75 | .icon { 76 | color: $secondary-alt; 77 | font-size: 1.6rem; 78 | padding-right: 0.25rem; 79 | } 80 | } 81 | 82 | // ***** Box bottom ***** 83 | .right_mplayer_box_bottom { 84 | 85 | } 86 | 87 | .right_mplayer_decoration_icons { 88 | .heart { 89 | color: $secondary; 90 | font-size: 2.2rem; 91 | } 92 | 93 | .comment { 94 | color: $primary; 95 | font-size: 2rem; 96 | } 97 | 98 | .share { 99 | color: $secondary-alt; 100 | font-size: 2rem; 101 | padding-right: 0.4rem; 102 | } 103 | } 104 | 105 | // Title 106 | .right_mplayer_music_title { 107 | .label { 108 | color: $fg-alt; 109 | font-size: 1.4rem; 110 | font-style: italic; 111 | font-weight: bold; 112 | } 113 | } 114 | 115 | // Volume bar 116 | .right_mplayer_volume scale trough { 117 | background-color: $fg-alt; 118 | min-width: 20rem; 119 | min-height: 0.5rem; 120 | border-radius: 2rem; 121 | } 122 | 123 | .right_mplayer_volume scale highlight { 124 | background-color: $primary; 125 | border-radius: 2rem; 126 | } 127 | 128 | // Controll buttons 129 | .right_mplayer_controll_buttons { 130 | } 131 | 132 | .right_mplayer_prev { 133 | // background-color: $fg-alt; 134 | // border-radius: 4rem; 135 | transition: 200ms ease; 136 | 137 | .icon { 138 | color: $fg-alt; 139 | font-size: 3.2rem; 140 | } 141 | 142 | &:hover { 143 | opacity: 0.5; 144 | } 145 | } 146 | 147 | .right_mplayer_toggle { 148 | // background-color: $fg-alt; 149 | border: solid 0.25rem $fg-alt; 150 | border-radius: 2rem; 151 | transition: 200ms ease; 152 | 153 | .icon { 154 | color: $fg-alt; 155 | font-size: 3.2rem; 156 | } 157 | 158 | &:hover { 159 | opacity: 0.5; 160 | } 161 | } 162 | 163 | .right_mplayer_next { 164 | // background-color: $fg-alt; 165 | // border-radius: 4rem; 166 | transition: 200ms ease; 167 | 168 | .icon { 169 | color: $fg-alt; 170 | font-size: 3.2rem; 171 | } 172 | 173 | &:hover { 174 | opacity: 0.5; 175 | } 176 | } 177 | 178 | // ***** Bumper bottom ***** 179 | .right_mplayer_bumper_bottom { 180 | background-color: $primary; 181 | 182 | .label { 183 | color: $primary-alt; 184 | font-size: 1.6rem; 185 | font-style: italic; 186 | font-weight: bold; 187 | } 188 | } 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | -------------------------------------------------------------------------------- /new_eww/scss/normal_css/_style_right_notifpop.scss: -------------------------------------------------------------------------------- 1 | /***** Windows ******************************************************/ 2 | .window_right_notifpop { 3 | background-color: rgba($bg, 0.5); 4 | } 5 | 6 | /***** Widgets ******************************************************/ 7 | .right_notifpop_root_box { 8 | background-color: $bg; 9 | } 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /new_eww/scss/normal_css/_style_top_bar.scss: -------------------------------------------------------------------------------- 1 | /***** Window *******************************************************/ 2 | .window_top_bar { 3 | background-color: rgba($primary, 0.5); 4 | } 5 | 6 | /***** Widget *******************************************************/ 7 | .top_bar_root_box { 8 | transition: 300ms ease; 9 | } 10 | 11 | .top_bar_root_box_div { 12 | background-color: $bg; 13 | transition: 300ms ease; 14 | } 15 | 16 | .top_bar_left { 17 | background-color: $bg; 18 | border-radius: 1rem 0rem 0rem 1rem; 19 | box-shadow: 0rem 0rem 0.4rem $bg; 20 | transition: 300ms ease; 21 | } 22 | 23 | .top_bar_left_div { 24 | background-color: $bg; 25 | border-radius: 1rem; 26 | box-shadow: 0rem 0rem 0.4rem $bg; 27 | transition: 300ms ease; 28 | } 29 | 30 | .top_bar_center { 31 | background-color: $bg; 32 | border-radius: 1rem; 33 | box-shadow: 0rem 0rem 0.4rem $bg; 34 | // transition: 300ms ease; 35 | } 36 | 37 | .top_bar_right { 38 | background-color: $bg; 39 | border-radius: 0rem 1rem 1rem 0rem; 40 | box-shadow: 0rem 0rem 0.4rem $bg; 41 | transition: 300ms ease; 42 | } 43 | 44 | .top_bar_right_div { 45 | background-color: $bg; 46 | border-radius: 1rem; 47 | box-shadow: 0rem 0rem 0.4rem $bg; 48 | transition: 300ms ease; 49 | } 50 | 51 | // Bar left 52 | .bar_left_uptime { 53 | background-color: $primary; 54 | border-radius: 1rem; 55 | 56 | .label { 57 | color: $primary-alt; 58 | font-size: 1.2rem; 59 | // font-style: italic; 60 | font-weight: bold; 61 | } 62 | } 63 | 64 | .bar_left_workspaces { 65 | background-color: $bg-alt; 66 | border-radius: 1rem; 67 | } 68 | 69 | .ws_active { 70 | color: $primary-alt; 71 | font-size: 1.2rem; 72 | font-weight: bold; 73 | } 74 | 75 | .ws_inactive { 76 | color: $primary; 77 | font-size: 1.2rem; 78 | font-weight: bold; 79 | } 80 | 81 | .ws_occupied { 82 | color: $secondary-alt; 83 | font-size: 1.2rem; 84 | font-weight: bold; 85 | } 86 | 87 | .bar_left_divide { 88 | background-color: $bg-alt; 89 | border-radius: 1rem; 90 | transition: 200ms ease; 91 | 92 | .icon { 93 | color: $primary-alt; 94 | font-size: 2rem; 95 | padding-right: 0.5rem; 96 | } 97 | 98 | &:hover { 99 | opacity: 0.5; 100 | } 101 | } 102 | 103 | .bar_left_conquer { 104 | background-color: $bg-alt; 105 | border-radius: 1rem; 106 | transition: 200ms ease; 107 | 108 | .icon { 109 | color: $primary-alt; 110 | font-size: 2rem; 111 | // padding-right: 0.5rem; 112 | } 113 | 114 | &:hover { 115 | opacity: 0.5; 116 | } 117 | } 118 | 119 | // Bar center 120 | 121 | // Page rev sw 122 | .bar_center_rev_sw { 123 | } 124 | 125 | .bar_center_rev_sw_page0 { 126 | border-radius: 2rem; 127 | transition: 200ms ease; 128 | 129 | .icon { 130 | color: $secondary; 131 | font-size: 1.6rem; 132 | } 133 | 134 | .label { 135 | color: $fg; 136 | font-size: 1.2rem; 137 | font-weight: bold; 138 | } 139 | 140 | &:hover { 141 | background-color: $fg-alt; 142 | } 143 | } 144 | 145 | .bar_center_rev_sw_page1 { 146 | border-radius: 2rem; 147 | transition: 200ms ease; 148 | 149 | .icon { 150 | color: $primary-alt; 151 | font-size: 1.2rem; 152 | } 153 | 154 | .label { 155 | color: $fg; 156 | font-size: 1.2rem; 157 | font-weight: bold; 158 | } 159 | 160 | &:hover { 161 | background-color: $fg-alt; 162 | } 163 | } 164 | 165 | .bar_center_rev_sw_page2 { 166 | border-radius: 2rem; 167 | transition: 200ms ease; 168 | 169 | .icon { 170 | color: $secondary-alt; 171 | font-size: 1.2rem; 172 | } 173 | 174 | .label { 175 | color: $fg; 176 | font-size: 1.2rem; 177 | font-weight: bold; 178 | } 179 | 180 | &:hover { 181 | background-color: $fg-alt; 182 | } 183 | } 184 | 185 | // Page 0 186 | .bar_center_mpris_label { 187 | .title { 188 | color: $fg; 189 | font-size: 1.12rem; 190 | font-weight: bold; 191 | } 192 | 193 | .artist { 194 | color: $fg; 195 | font-size: 1rem; 196 | font-weight: bold; 197 | } 198 | } 199 | 200 | // Page 1 201 | .bar_center_networks { 202 | background-color: $bg-alt; 203 | border-radius: 1rem; 204 | } 205 | 206 | .bar_center_lan { 207 | .icon { 208 | color: $secondary-alt; 209 | font-size: 1.2rem; 210 | } 211 | 212 | .label { 213 | color: $fg; 214 | font-size: 1.12rem; 215 | font-weight: bold; 216 | } 217 | } 218 | 219 | .bar_center_bluetooth { 220 | .icon { 221 | color: $primary; 222 | font-size: 1.2rem; 223 | } 224 | 225 | .label { 226 | color: $fg; 227 | font-size: 1.12rem; 228 | font-weight: bold; 229 | } 230 | } 231 | 232 | .bar_center_sysinfo_levels { 233 | background-color: $primary; 234 | border-radius: 1rem; 235 | } 236 | 237 | .bar_center_volume { 238 | .icon { 239 | color: $primary-alt; 240 | font-size: 1.2rem; 241 | } 242 | 243 | .label { 244 | color: $primary-alt; 245 | font-size: 1.2rem; 246 | font-weight: bold; 247 | } 248 | } 249 | 250 | .bar_center_brightness { 251 | .icon { 252 | color: $primary-alt; 253 | font-size: 1.2rem; 254 | } 255 | 256 | .label { 257 | color: $primary-alt; 258 | font-size: 1.2rem; 259 | font-weight: bold; 260 | } 261 | } 262 | 263 | // Page 2 264 | .center_bar_shutdown { 265 | background-color: $bg-alt; 266 | border-radius: 1rem; 267 | transition: 200ms; 268 | 269 | .icon { 270 | color: $secondary-alt; 271 | font-size: 1.8rem; 272 | } 273 | 274 | &:hover { 275 | opacity: 0.5; 276 | } 277 | } 278 | 279 | .center_bar_suspend { 280 | background-color: $bg-alt; 281 | border-radius: 1rem; 282 | transition: 200ms; 283 | 284 | .icon { 285 | color: $primary-alt; 286 | font-size: 1.8rem; 287 | } 288 | 289 | &:hover { 290 | opacity: 0.5; 291 | } 292 | } 293 | 294 | .center_bar_logout { 295 | background-color: $bg-alt; 296 | border-radius: 1rem; 297 | transition: 200ms; 298 | 299 | .icon { 300 | color: $primary; 301 | font-size: 1.8rem; 302 | } 303 | 304 | &:hover { 305 | opacity: 0.5; 306 | } 307 | } 308 | 309 | .center_bar_reboot { 310 | background-color: $bg-alt; 311 | border-radius: 1rem; 312 | transition: 200ms; 313 | 314 | .icon { 315 | color: $secondary; 316 | font-size: 1.8rem; 317 | } 318 | 319 | &:hover { 320 | opacity: 0.5; 321 | } 322 | } 323 | 324 | // Bar right 325 | .bar_right_battery { 326 | background-color: $bg-alt; 327 | border-radius: 1rem; 328 | 329 | .icon { 330 | color: $secondary; 331 | font-size: 1.2rem; 332 | } 333 | } 334 | 335 | .bar_right_date { 336 | background-color: $primary; 337 | border-radius: 1rem; 338 | padding-right: 1rem; 339 | padding-left: 1rem; 340 | 341 | .label { 342 | color: $primary-alt; 343 | font-size: 1.2rem; 344 | font-style: italic; 345 | font-weight: bold; 346 | } 347 | } 348 | 349 | .bar_right_time { 350 | background-color: $primary; 351 | border-radius: 1rem; 352 | 353 | .time_icon { 354 | color: $primary-alt; 355 | font-size: 1.2rem; 356 | } 357 | 358 | .time_label { 359 | color: $primary-alt; 360 | font-size: 1.2rem; 361 | font-weight: bold; 362 | } 363 | } 364 | 365 | 366 | 367 | 368 | 369 | -------------------------------------------------------------------------------- /new_eww/variables.yuck: -------------------------------------------------------------------------------- 1 | ;; ***** Variables *************************************************** 2 | 3 | ;; ***** General ***************************************************** 4 | ;; Workspaces 5 | ; (deflisten WORKSPACES :initial "[]" 6 | ; `scripts/./workspaces.py`) 7 | 8 | (deflisten WS :initial "(box (label :text 'init'))" 9 | `scripts/./workspaces.sh`) 10 | 11 | ;; Activewindow name 12 | (defpoll ACTIVE_WINNAME :interval "1s" 13 | "scripts/ws_old.sh --active_winname") 14 | 15 | ;; Time and Date 16 | ; (deflisten TIME :initial "init" `scripts/./time.py`) 17 | (defpoll TIME_HOUR :interval "30s" "date +'%H'") 18 | (defpoll TIME_MIN :interval "30s" "date +'%M'") 19 | (defpoll TIME_MER :interval "1m" "date +'%p'") 20 | (defpoll DATE_DOW :interval "1m" "date +'%a'") 21 | (defpoll DATE_DOW_FULL :interval "1m" "date +'%A'") 22 | (defpoll DATE_MON :interval "1m" "date +'%b'") 23 | (defpoll DATE_MON_FULL :interval "1m" "date +'%B'") 24 | (defpoll DATE_DAY :interval "1m" "date +'%d'") 25 | (defpoll UPTIME :interval "1m" 26 | "uptime -p | awk '{print $1 \" \" $2 \" \" $3}' | sed -e s/,//g") 27 | 28 | ;; Weather 29 | (defpoll WEATHER_CON :interval "1h" 30 | "scripts/weather.sh --conditions") 31 | 32 | (defpoll WEATHER_TEMP :interval "1h" 33 | "scripts/weather.sh --temperature") 34 | 35 | (defpoll WEATHER_LOCALE :interval "1h" 36 | "scripts/weather.sh --locale") 37 | 38 | ;; Battery 39 | (defpoll BATTERY_ICONS :interval "1m" 40 | "scripts/battery.sh --icons") 41 | 42 | (defpoll BATTERY_LEVEL :interval "2s" 43 | "scripts/battery.sh --level") 44 | 45 | ;; Brightmess 46 | (defpoll BRIGHTNESS :interval "2s" 47 | "scripts/display.sh --get_brightness") 48 | 49 | ;; Volume 50 | (defpoll VOLUME_LEVEL :interval "2s" 51 | "scripts/audio.sh --get_volume") 52 | 53 | (defpoll MICVOL_LEVEL :interval "2s" 54 | "scripts/audio.sh --get_micvol") 55 | 56 | ;; LAN 57 | (defpoll LAN_CON_STATUS :interval "2s" 58 | "scripts/network.sh --con_status") 59 | 60 | (defpoll LAN_SSID :interval "2s" 61 | "scripts/network.sh --ssid") 62 | 63 | ;; Bluetooth 64 | (defpoll BT_CON_STATUS :interval "2s" 65 | "scripts/bluetooth.sh --con_status") 66 | 67 | (defpoll BT_DEVNAME :interval "2s" 68 | "scripts/bluetooth.sh --devname") 69 | 70 | ;; Music status from mpris 71 | (defpoll MPRIS_STATUS :interval "2s" 72 | "scripts/mpris.sh --status") 73 | 74 | (defpoll MPRIS_TITLE :interval "2s" 75 | "scripts/mpris.sh --title") 76 | 77 | (defpoll MPRIS_ARTIST :interval "2s" 78 | "scripts/mpris.sh --artist") 79 | 80 | (defvar MPRIS_COVER_DEFAULT "images/music.png") 81 | 82 | (deflisten MPRIS_COVER :initial "" `scripts/./mpris.sh --cover`) 83 | 84 | (deflisten MPRIS_COVER_BLUR :initial "" 85 | `scripts/convert_images/./mpris_blur.sh`) 86 | 87 | (defpoll MPRIS_PLAYER_NAME :interval "2s" 88 | "scripts/mpris.sh --player_name") 89 | 90 | (defpoll MPRIS_PLAYER_ICON :interval "2s" 91 | "scripts/mpris.sh --player_icon") 92 | 93 | (defvar CURRENTWALL "images/currentwall/currentwall") 94 | (defvar CURRENTWALL_BLUR "scripts/convert_images/images/currentwall/res.png") 95 | 96 | ; (defpoll CURRENTWALL :interval "2s" 97 | ; "readlink images/currentwall/currentwall") 98 | 99 | (defvar INPUT_DESKTOP_APPS "") 100 | 101 | ;; System fet 102 | (defpoll HOSTNAME :interval "1h" "scripts/fet.sh --hostname") 103 | (defpoll DISTRO :interval "1h" "scripts/fet.sh --distro") 104 | (defpoll MODEL :interval "1h" "scripts/fet.sh --model") 105 | (defpoll WMNAME :interval "1h" "scripts/fet.sh --wmname") 106 | 107 | ;; ***** Inline css ************************************************** 108 | (deflisten MPRIS_COVER_COLOR :initial "ffffff" 109 | `scripts/convert_images/./mpris_mean_col.sh`) 110 | 111 | (deflisten COLOR_RICESET_CURR_FG :initial "ffffff" 112 | `scripts/rice_changer/manage_eww_colors.sh --get_fg`) 113 | 114 | (deflisten COLOR_RICESET_CURR_PR :initial "ffffff" 115 | `scripts/rice_changer/manage_eww_colors.sh --get_primary`) 116 | 117 | ;; ***** Json ******************************************************** 118 | ;; Json array of the LAN AP's SSID 119 | (defvar JSON_SSID `["there are no AP..."]`) 120 | 121 | ;; Json array of the know Bluetooth devices name 122 | (defvar JSON_BT_DEVNAME `["there are no BT dev..."]`) 123 | 124 | ;; Json array of the desktop applications 125 | (defvar JSON_DESKTOP_APPS `[]`) 126 | 127 | ;; Json array of the currient apps 128 | (deflisten JSON_DOCK_CLIENT_LIST :initial "[]" 129 | `scripts/client_list/./manage_eww_json.sh`) 130 | 131 | ;; Json array of the todo list 132 | (defvar JSON_TODO `["there are no Todo..."]`) 133 | 134 | ;; Json array of the cava output 135 | (deflisten JSON_CAVA_OUTPUT :initial "[]" 136 | `scripts/cava/./cava_pipe.sh`) 137 | 138 | ;; Json array of the available rices 139 | (defpoll JSON_RICESET :interval "10s" 140 | `cat scripts/rice_changer/json/riceset.json`) 141 | 142 | (defvar INDEX_RICESET_CURR 0) 143 | (defpoll INDEX_RICESET_NEXT :interval "69h" 144 | "scripts/rice_changer/./manage_eww_index.sh --get_next") 145 | 146 | (defpoll INDEX_RICESET_PREV :interval "69h" 147 | "scripts/rice_changer/./manage_eww_index.sh --get_prev") 148 | 149 | ;; Json array of the quotes 150 | (defvar JSON_QUOTE 151 | ` 152 | [ 153 | {"ricer": "ElKowar", "quote": [ "Tell the computer", "what you want,", "not what to do" ]}, 154 | {"ricer": "end_4", "quote": [ "IT'S PERFECTLY LEAVE", "1 PIXEL", "ON THE RIGHT EDGE", "AWAAHAHAHAHAH" ]}, 155 | {"ricer": "Linus Torvalds", "quote": [ "So NVIDIA... F*ck you!" ]}, 156 | {"ricer": "elenapan", "quote": [ "There is no place like ~/" ]} 157 | ] 158 | ` 159 | ) 160 | 161 | (defvar INDEX_QUOTE 0) 162 | 163 | ;; ***** Box size **************************************************** 164 | ;; Top bar 165 | (defvar BOX_SIZE_TOP_BAR_P_H "3.6") 166 | (defvar BOX_SIZE_TOP_BAR_P_V "18") 167 | (defvar BOX_SIZE_TOP_BAR_C_H "3.8") 168 | (defvar BOX_SIZE_TOP_BAR_C_V "26") 169 | 170 | ;; Bottom bar 171 | (defvar BOX_SIZE_BOTTOM_BAR_P_H "2.8") 172 | (defvar BOX_SIZE_BOTTOM_BAR_P_V "14") 173 | (defvar BOX_SIZE_BOTTOM_BAR_C_H "3.6") 174 | (defvar BOX_SIZE_BOTTOM_BAR_C_V "20") 175 | 176 | ;; Left widget 177 | (defvar BOX_SIZE_LEFT_WIDGET_ROOT_BOX_P_H "4") 178 | (defvar BOX_SIZE_LEFT_WIDGET_ROOT_BOX_P_V "1.08") 179 | (defvar BOX_SIZE_LEFT_WIDGET_ROOT_BOX_C_H "4.5") 180 | (defvar BOX_SIZE_LEFT_WIDGET_ROOT_BOX_C_V "1.2") 181 | (defvar BOX_SIZE_LEFT_WIDGET_P_H "5") 182 | (defvar BOX_SIZE_LEFT_WIDGET_P_V "5") 183 | (defvar BOX_SIZE_LEFT_WIDGET_C_H "5.5") 184 | (defvar BOX_SIZE_LEFT_WIDGET_C_V "5.5") 185 | 186 | ;; Left widget v2 187 | (defvar BOX_SIZE_LEFT_WIDGET_V2_ROOT_BOX_P_H "5") 188 | (defvar BOX_SIZE_LEFT_WIDGET_V2_ROOT_BOX_P_V "1.2") 189 | (defvar BOX_SIZE_LEFT_WIDGET_V2_ROOT_BOX_C_H "5.25") 190 | (defvar BOX_SIZE_LEFT_WIDGET_V2_ROOT_BOX_C_V "1.25") 191 | (defvar BOX_SIZE_LEFT_WIDGET_V2_P_H "5.5") 192 | (defvar BOX_SIZE_LEFT_WIDGET_V2_P_V "3.2") 193 | (defvar BOX_SIZE_LEFT_WIDGET_V2_C_H "5.5") 194 | (defvar BOX_SIZE_LEFT_WIDGET_V2_C_V "5.5") 195 | 196 | ;; Right mplayer 197 | (defvar BOX_SIZE_RIGHT_MPLAYER_P_H "5") 198 | (defvar BOX_SIZE_RIGHT_MPLAYER_P_V "1.5") 199 | (defvar BOX_SIZE_RIGHT_MPLAYER_C_H "5.5") 200 | (defvar BOX_SIZE_RIGHT_MPLAYER_C_V "1.55") 201 | 202 | ;; Right notifpop 203 | (defvar BOX_SIZE_RIGHT_NOTIFPOP_ROOT_BOX_P_H "4.2") 204 | (defvar BOX_SIZE_RIGHT_NOTIFPOP_ROOT_BOX_P_V "1.6") 205 | (defvar BOX_SIZE_RIGHT_NOTIFPOP_P_H "5") 206 | (defvar BOX_SIZE_RIGHT_NOTIFPOP_P_V "1.8") 207 | (defvar BOX_SIZE_RIGHT_NOTIFPOP_C_H "5.5") 208 | (defvar BOX_SIZE_RIGHT_NOTIFPOP_C_V "2") 209 | 210 | ;; Center dmenu 211 | (defvar BOX_SIZE_CENTER_DMENU_P_H "4") 212 | (defvar BOX_SIZE_CENTER_DMENU_P_V "2.6") 213 | (defvar BOX_SIZE_CENTER_DMENU_C_H "5.6") 214 | (defvar BOX_SIZE_CENTER_DMENU_C_V "4.6") 215 | 216 | ;; Center dashboard 217 | (defvar BOX_SIZE_CENTER_DASHBOARD_P_H "1.4") 218 | (defvar BOX_SIZE_CENTER_DASHBOARD_P_V "1.4") 219 | (defvar BOX_SIZE_CENTER_DASHBOARD_C_H "1.5") 220 | (defvar BOX_SIZE_CENTER_DASHBOARD_C_V "1.5") 221 | 222 | 223 | ;; ***** Reveal ****************************************************** 224 | ;; Top bar 225 | (defvar SHOW_BAR_CENTER false) 226 | (defvar SHOW_BAR_CENTER_REV_SW false) 227 | (defvar SHOW_BAR_CENTER_PAGE0 true) 228 | (defvar SHOW_BAR_CENTER_PAGE1 false) 229 | (defvar SHOW_BAR_CENTER_PAGE2 false) 230 | 231 | (defvar SHOW_BAR_CENTER_CAVA true) 232 | 233 | ;; Bottom bar 234 | 235 | ;; Left widget 236 | (defvar SHOW_LEFT_WIDGET false) 237 | (defvar SHOW_CALENDAR false) 238 | (defvar HOVER_BLUETOOTH false) 239 | (defvar SHOW_BLUETOOTH false) 240 | (defvar HOVER_LAN false) 241 | (defvar SHOW_LAN false) 242 | 243 | ;; Left widget v2 244 | (defvar SHOW_LEFT_WIDGET_V2 false) 245 | (defvar HOVER_LEFT_WIDGET_V2_BLUETOOTH false) 246 | (defvar SHOW_LEFT_WIDGET_V2_BLUETOOTH false) 247 | (defvar HOVER_LEFT_WIDGET_V2_LAN false) 248 | (defvar SHOW_LEFT_WIDGET_V2_LAN false) 249 | 250 | ;; Right mplayer 251 | ; (defvar SHOW_RIGHT_MPLAYER false) 252 | (defvar SHOW_UWUSTAGRAM_CAVA true) 253 | 254 | ;; Right notifpop 255 | (defvar SHOW_RIGHT_NOTIFPOP false) 256 | 257 | ;; Center dmenu 258 | ; (defvar SHOW_CENTER_DMENU false) 259 | (defvar SHOW_CENTER_DMENU_PAGE0 true) 260 | (defvar SHOW_CENTER_DMENU_PAGE1 false) 261 | 262 | ;; Center dashboard 263 | (defvar SHOW_CENTER_DASHBOARD false) 264 | 265 | 266 | (defvar GAMEPAD_SHOW_WALL false) 267 | (defvar SHOW_RIGHT_MPLAYER true) 268 | 269 | 270 | 271 | -------------------------------------------------------------------------------- /new_eww/windows.yuck: -------------------------------------------------------------------------------- 1 | ;; ***** Windows ***************************************************** 2 | (defwindow window_top_bar 3 | :monitor 0 4 | :stacking "fg" 5 | :geometry (geometry :width "100%" 6 | :height "8%" 7 | :anchor "top center" 8 | ) 9 | (widget_top_bar) 10 | ) 11 | 12 | (defwindow window_bottom_bar 13 | :monitor 0 14 | :stacking "fg" 15 | :geometry (geometry :width "100%" 16 | :height "9.5%" 17 | :anchor "bottom center" 18 | ) 19 | (widget_bottom_bar) 20 | ) 21 | 22 | (defwindow window_left_widget 23 | :monitor 0 24 | :stacking "fg" 25 | :geometry (geometry :width "30%" 26 | :height "100%" 27 | :anchor "center left" 28 | ) 29 | (widget_left_widget) 30 | ) 31 | 32 | (defwindow window_right_mplayer 33 | :monitor 0 34 | :stacking "fg" 35 | :geometry (geometry :width "30%" 36 | :height "70%" 37 | :anchor "center right" 38 | ) 39 | (widget_right_mplayer) 40 | ) 41 | 42 | (defwindow window_right_notifpop 43 | :monitor 0 44 | :stacking "fg" 45 | :geometry (geometry :width "28%" 46 | :height "85%" 47 | :anchor "top right" 48 | ) 49 | (widget_right_notifpop) 50 | ) 51 | 52 | (defwindow window_center_dmenu 53 | :monitor 0 54 | :stacking "fg" 55 | :wm-ignore false 56 | :geometry (geometry :width "40%" 57 | :height "80%" 58 | :anchor "center center" 59 | ) 60 | (widget_center_dmenu) 61 | ) 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /new_eww/yuck/modules/bottom_bar/module_bottom_bar_dock_center.yuck: -------------------------------------------------------------------------------- 1 | (defwidget module_bottom_bar_dock_center [] 2 | (box 3 | (box 4 | (box 5 | :halign "center" 6 | :valign "center" 7 | :space-evenly false 8 | :spacing 15 9 | 10 | ;; Left widget launcher 11 | (eventbox 12 | :class "dock_center_launch_left_widget" 13 | :width {round(DP_HEIGHT / BOX_SIZE_BOTTOM_BAR_C_V, 0)} 14 | :height {round(DP_HEIGHT / BOX_SIZE_BOTTOM_BAR_C_V, 0)} 15 | :onclick "scripts/launcher/launch_left_widget.sh --toggle &" 16 | 17 | (box 18 | (label :class "icon" :text "󱂪") 19 | ) 20 | ) 21 | 22 | (eventbox 23 | :class "dock_center_launch_center_dashboard" 24 | :width {round(DP_HEIGHT / BOX_SIZE_BOTTOM_BAR_C_V, 0)} 25 | :height {round(DP_HEIGHT / BOX_SIZE_BOTTOM_BAR_C_V, 0)} 26 | :onclick "scripts/launcher/launch_center_dmenu.sh --toggle &" 27 | 28 | (box 29 | (label :class "icon" :text "󱗼") 30 | ) 31 | ) 32 | 33 | (eventbox 34 | :class "dock_center_launch_terminal" 35 | :width {round(DP_HEIGHT / BOX_SIZE_BOTTOM_BAR_C_V, 0)} 36 | :height {round(DP_HEIGHT / BOX_SIZE_BOTTOM_BAR_C_V, 0)} 37 | :onclick "${_TERMINAL} &" 38 | 39 | (box 40 | (label :class "icon" :text "") 41 | ) 42 | ) 43 | 44 | (eventbox 45 | :class "dock_center_launch_browser" 46 | :width {round(DP_HEIGHT / BOX_SIZE_BOTTOM_BAR_C_V, 0)} 47 | :height {round(DP_HEIGHT / BOX_SIZE_BOTTOM_BAR_C_V, 0)} 48 | :onclick "${_BROWSER} &" 49 | 50 | (box 51 | (label :class "icon" :text "󰈹") 52 | ) 53 | ) 54 | 55 | (eventbox 56 | :class "dock_center_launch_ss_full" 57 | :width {round(DP_HEIGHT / BOX_SIZE_BOTTOM_BAR_C_V, 0)} 58 | :height {round(DP_HEIGHT / BOX_SIZE_BOTTOM_BAR_C_V, 0)} 59 | :onclick "scripts/screenshot.sh --full" 60 | 61 | (box 62 | (label :class "icon" :text "󰄀") 63 | ) 64 | ) 65 | 66 | (eventbox 67 | :class "dock_center_launch_ss_select" 68 | :width {round(DP_HEIGHT / BOX_SIZE_BOTTOM_BAR_C_V, 0)} 69 | :height {round(DP_HEIGHT / BOX_SIZE_BOTTOM_BAR_C_V, 0)} 70 | :onclick "scripts/screenshot.sh --select" 71 | 72 | (box 73 | (label :class "icon" :text "󰆐") 74 | ) 75 | ) 76 | 77 | (eventbox 78 | :class "dock_center_launch_right_mplayer" 79 | :width {round(DP_HEIGHT / BOX_SIZE_BOTTOM_BAR_C_V, 0)} 80 | :height {round(DP_HEIGHT / BOX_SIZE_BOTTOM_BAR_C_V, 0)} 81 | :onclick "scripts/launcher/launch_right_mplayer.sh --toggle &" 82 | 83 | (box 84 | (label :class "icon" :text "󰝚") 85 | ) 86 | ) 87 | ) 88 | ) 89 | ) 90 | ) 91 | -------------------------------------------------------------------------------- /new_eww/yuck/modules/center_dashboard/module_center_dashboard_rice_changer.yuck: -------------------------------------------------------------------------------- 1 | (defwidget module_center_dashboard_rice_changer [] 2 | (box 3 | :class "rice_changer_root_box" 4 | :halign "center" 5 | :valign "center" 6 | :width {round(DP_WIDTH / BOX_SIZE_CENTER_DASHBOARD_P_H, 0)} 7 | :height {round(DP_HEIGHT / BOX_SIZE_CENTER_DASHBOARD_P_V, 0)} 8 | 9 | (overlay 10 | 11 | ;; Background 12 | (box 13 | :halign "center" 14 | :valign "center" 15 | :width {round(DP_WIDTH / BOX_SIZE_CENTER_DASHBOARD_P_H, 0)} 16 | :height {round(DP_HEIGHT / BOX_SIZE_CENTER_DASHBOARD_P_V, 0)} 17 | :style 18 | " 19 | background-image: url('scripts/convert_images/images/wall_blur/${JSON_RICESET[INDEX_RICESET_CURR].wall_path}'); 20 | background-repeat: no-repeat; 21 | background-size: cover; 22 | background-position: center center; 23 | border-radius: 2rem; 24 | opacity: 0.5; 25 | " 26 | ) 27 | 28 | ;; Foreground 29 | (box 30 | :orientation "v" 31 | :halign "center" 32 | :valign "center" 33 | :space-evenly false 34 | 35 | (box 36 | :halign "center" 37 | :valign "center" 38 | :width {round(DP_WIDTH / 1.6, 0)} 39 | :height {round(DP_HEIGHT / 3.6, 0)} 40 | 41 | (box 42 | :halign "center" 43 | :valign "end" 44 | :space-evenly false 45 | :spacing 25 46 | 47 | (rice_changer_audio_visualizer :index 0 :flipped true) 48 | (rice_changer_audio_visualizer :index 1 :flipped true) 49 | (rice_changer_audio_visualizer :index 2 :flipped true) 50 | (rice_changer_audio_visualizer :index 3 :flipped true) 51 | (rice_changer_audio_visualizer :index 4 :flipped true) 52 | (rice_changer_audio_visualizer :index 5 :flipped true) 53 | (rice_changer_audio_visualizer :index 6 :flipped true) 54 | (rice_changer_audio_visualizer :index 7 :flipped true) 55 | (rice_changer_audio_visualizer :index 8 :flipped true) 56 | (rice_changer_audio_visualizer :index 9 :flipped true) 57 | (rice_changer_audio_visualizer :index 10 :flipped true) 58 | (rice_changer_audio_visualizer :index 11 :flipped true) 59 | (rice_changer_audio_visualizer :index 12 :flipped true) 60 | (rice_changer_audio_visualizer :index 13 :flipped true) 61 | (rice_changer_audio_visualizer :index 14 :flipped true) 62 | (rice_changer_audio_visualizer :index 15 :flipped true) 63 | (rice_changer_audio_visualizer :index 16 :flipped true) 64 | (rice_changer_audio_visualizer :index 17 :flipped true) 65 | (rice_changer_audio_visualizer :index 18 :flipped true) 66 | (rice_changer_audio_visualizer :index 19 :flipped true) 67 | (rice_changer_audio_visualizer :index 20 :flipped true) 68 | (rice_changer_audio_visualizer :index 21 :flipped true) 69 | (rice_changer_audio_visualizer :index 22 :flipped true) 70 | (rice_changer_audio_visualizer :index 23 :flipped true) 71 | (rice_changer_audio_visualizer :index 24 :flipped true) 72 | (rice_changer_audio_visualizer :index 25 :flipped true) 73 | (rice_changer_audio_visualizer :index 26 :flipped true) 74 | (rice_changer_audio_visualizer :index 27 :flipped true) 75 | (rice_changer_audio_visualizer :index 28 :flipped true) 76 | (rice_changer_audio_visualizer :index 29 :flipped true) 77 | ) 78 | ) 79 | 80 | (box 81 | :halign "center" 82 | :valign "center" 83 | :width {round(DP_WIDTH / 1.6, 0)} 84 | :height {round(DP_HEIGHT / 3, 0)} 85 | 86 | (box 87 | (box 88 | :halign "center" 89 | :valign "center" 90 | :space-evenly false 91 | :spacing 20 92 | 93 | ;; Sauare image 94 | (box 95 | :width {round(DP_WIDTH / 6, 0)} 96 | :height {round(DP_HEIGHT / 3.2, 0)} 97 | 98 | (box 99 | :class "rice_changer_monstercat_cover" 100 | :halign "center" 101 | :valign "center" 102 | :width {round(DP_WIDTH / 7, 0)} 103 | :height {round(DP_WIDTH / 7, 0)} 104 | :style 105 | " 106 | background-image: url('scripts/convert_images/images/zip_imgs/${JSON_RICESET[INDEX_RICESET_CURR].wall_path}'); 107 | background-repeat: no-repeat; 108 | background-size: cover; 109 | background-position: center center; 110 | " 111 | ) 112 | ) 113 | 114 | (box 115 | :class "rice_changer_monstercat_general_box" 116 | :orientation "v" 117 | :width {round(DP_WIDTH / 2.4, 0)} 118 | :height {round(DP_HEIGHT / 3.2, 0)} 119 | 120 | ;; Title 121 | (box 122 | :class "rice_changer_monstercat_title" 123 | :halign "start" 124 | :valign "center" 125 | 126 | (label 127 | :class "title" 128 | :limit-width 12 129 | :text "${JSON_RICESET[INDEX_RICESET_CURR].rice_name}" 130 | ) 131 | ) 132 | 133 | ;; Buttons 134 | (box 135 | :class "rice_changer_monstercat_btns_bg" 136 | :halign "start" 137 | :valign "start" 138 | :width {round(DP_WIDTH / 6, 0)} 139 | :height {round(DP_HEIGHT / 10, 0)} 140 | 141 | 142 | (box 143 | :halign "center" 144 | :valign "center" 145 | :space-evenly false 146 | :spacing 20 147 | 148 | (eventbox 149 | :class "rice_changer_monstercat_btn_prev" 150 | :width {round(DP_WIDTH / 30, 0)} 151 | :height {round(DP_WIDTH / 30, 0)} 152 | :onclick "scripts/rice_changer/manage_eww_index.sh --decr && scripts/rice_changer/manage_eww_colors.sh --update_all &" 153 | 154 | (label 155 | :class "icon" 156 | :text "󰒮" 157 | ) 158 | ) 159 | 160 | (eventbox 161 | :class "rice_changer_monstercat_btn_play" 162 | :width {round(DP_WIDTH / 30, 0)} 163 | :height {round(DP_WIDTH / 30, 0)} 164 | :onclick "scripts/rice_changer/rice_changer.py --sort_by ${JSON_RICESET[INDEX_RICESET_CURR].rice_name} && scripts/rice_changer/rice_changer.py --set ${JSON_RICESET[INDEX_RICESET_CURR].rice_name} &" 165 | 166 | (label 167 | :class "icon" 168 | :text "󰐊" 169 | ) 170 | ) 171 | 172 | (eventbox 173 | :class "rice_changer_monstercat_btn_next" 174 | :width {round(DP_WIDTH / 30, 0)} 175 | :height {round(DP_WIDTH / 30, 0)} 176 | :onclick "scripts/rice_changer/manage_eww_index.sh --incr && scripts/rice_changer/manage_eww_colors.sh --update_all &" 177 | 178 | (label 179 | :class "icon" 180 | :text "󰒭" 181 | ) 182 | ) 183 | ) 184 | ) 185 | ) 186 | ) 187 | ) 188 | ) 189 | ) 190 | ) 191 | ) 192 | ) 193 | 194 | ;; Submodules 195 | (defwidget rice_changer_audio_visualizer [index flipped] 196 | (box 197 | :class {flipped ? 198 | "rice_changer_audio_bar_flipped" 199 | : 200 | "rice_changer_audio_bar" 201 | } 202 | 203 | (scale 204 | :orientation "v" 205 | :flipped "${flipped}" 206 | :value {JSON_CAVA_OUTPUT[index]} 207 | :min 0 208 | :max 100 209 | :active false 210 | ) 211 | ) 212 | ) 213 | 214 | 215 | 216 | 217 | 218 | 219 | -------------------------------------------------------------------------------- /new_eww/yuck/modules/left_widget/module_left_widget_bluetooth.yuck: -------------------------------------------------------------------------------- 1 | (defwidget module_left_widget_bluetooth [] 2 | (eventbox 3 | :halign "center" 4 | :valign "center" 5 | :width {round(DP_WIDTH / BOX_SIZE_LEFT_WIDGET_P_H, 0)} 6 | :height {round(DP_HEIGHT / 20, 0)} 7 | :onhover "${EWW_CMD} update HOVER_BLUETOOTH=true &" 8 | :onhoverlost "${EWW_CMD} update HOVER_BLUETOOTH=false SHOW_BLUETOOTH=false &" 9 | 10 | (box 11 | :orientation "v" 12 | :halign "start" 13 | :valign "center" 14 | :space-evenly false 15 | :spacing 10 16 | 17 | ;; Top Box 18 | (box 19 | :halign "center" 20 | :valign "center" 21 | :space-evenly false 22 | :spacing 15 23 | 24 | ;; Left 25 | (revealer 26 | :transition "slideright" 27 | :reveal {HOVER_BLUETOOTH == false} 28 | :duration "200ms" 29 | 30 | (box 31 | :class "left_widget_bt_status" 32 | :width {round(DP_WIDTH / 30, 0)} 33 | :height {round(DP_HEIGHT / 20, 0)} 34 | 35 | (box 36 | (label 37 | :class "icon" 38 | :text {BT_CON_STATUS == "connected" ? 39 | "󰋋" 40 | : 41 | "󰟎" 42 | } 43 | ) 44 | ) 45 | ) 46 | ) 47 | 48 | ;; Center 49 | (eventbox 50 | :class "left_widget_bt_button_rect" 51 | :onclick "scripts/bluetooth.sh --toggle" 52 | 53 | (box 54 | :width {round(DP_WIDTH / 6.4, 0)} 55 | :height {round(DP_HEIGHT / 20, 0)} 56 | 57 | (box 58 | (label 59 | :class "label" 60 | :limit-width 20 61 | :text {BT_CON_STATUS == "connected" ? 62 | "${BT_DEVNAME}" 63 | : 64 | "offline" 65 | } 66 | ) 67 | ) 68 | ) 69 | ) 70 | 71 | ;; Right 72 | (revealer 73 | :transition "slideright" 74 | :reveal HOVER_BLUETOOTH 75 | :duration "200ms" 76 | 77 | (eventbox 78 | :class "left_widget_bt_button_square" 79 | :width {round(DP_WIDTH / 30, 0)} 80 | :height {round(DP_HEIGHT / 20, 0)} 81 | :onclick "${EWW_CMD} update SHOW_BLUETOOTH=true" 82 | 83 | (box 84 | (label :class "icon" :text "󰅂") 85 | ) 86 | ) 87 | ) 88 | ) 89 | 90 | ;; Bottom box 91 | (revealer 92 | :transition "slidedown" 93 | :reveal SHOW_BLUETOOTH 94 | :duration "200ms" 95 | 96 | (box 97 | :halign "center" 98 | :valign "center" 99 | :width {round(DP_WIDTH / BOX_SIZE_LEFT_WIDGET_P_H, 0)} 100 | :height {round(DP_HEIGHT / BOX_SIZE_LEFT_WIDGET_P_V, 0)} 101 | 102 | (box 103 | :class "left_widget_bt_devname_entry" 104 | :halign "center" 105 | :valign "center" 106 | :width {round(DP_WIDTH / BOX_SIZE_LEFT_WIDGET_P_H, 0)} 107 | :height {round(DP_HEIGHT / BOX_SIZE_LEFT_WIDGET_P_V, 0)} 108 | 109 | (scroll 110 | :hscroll false 111 | :vscroll true 112 | :vexpand true 113 | 114 | (box 115 | :orientation "v" 116 | :halign "center" 117 | :valign "center" 118 | :space-evenly false 119 | :spacnig 10 120 | 121 | (for entry in JSON_BT_DEVNAME 122 | (eventbox 123 | :class "left_widget_bt_devname_button" 124 | :halign "center" 125 | :valign "center" 126 | :width {round(DP_WIDTH / BOX_SIZE_LEFT_WIDGET_C_H, 0)} 127 | :height {round(DP_HEIGHT / 20, 0)} 128 | 129 | (box 130 | (button 131 | :onclick "bluetoothctl connect '${entry}'" 132 | 133 | (label 134 | :class "label" 135 | :limit-width 20 136 | :text "${entry}" 137 | ) 138 | ) 139 | ) 140 | ) 141 | ) 142 | ) 143 | ) 144 | ) 145 | ) 146 | ) 147 | ) 148 | ) 149 | ) 150 | 151 | 152 | 153 | -------------------------------------------------------------------------------- /new_eww/yuck/modules/left_widget/module_left_widget_clock.yuck: -------------------------------------------------------------------------------- 1 | (defwidget module_left_widget_clock [] 2 | (eventbox 3 | :onclick "${EWW_CMD} update SHOW_CALENDAR=true &" 4 | :onhoverlost "${EWW_CMD} update SHOW_CALENDAR=false &" 5 | 6 | (box 7 | :orientation "v" 8 | :halign "center" 9 | :space-evenly false 10 | :spacing 20 11 | 12 | ;; Current time 13 | (eventbox 14 | :class "left_widget_clock_time" 15 | :width {round(DP_WIDTH / BOX_SIZE_LEFT_WIDGET_P_H, 0)} 16 | :height {round(DP_HEIGHT / 10, 0)} 17 | 18 | (label :class "label" :text "${TIME_HOUR} : ${TIME_MIN}") 19 | ) 20 | 21 | ;; Calendar 22 | (revealer 23 | :transition "slidedown" 24 | :reveal "${SHOW_CALENDAR}" 25 | :duration "200ms" 26 | 27 | (box 28 | :class "left_widget_clock_tray" 29 | :orientation "v" 30 | :valign "center" 31 | :space-evenly false 32 | :height {round(DP_HEIGHT / BOX_SIZE_LEFT_WIDGET_P_V, 0)} 33 | :spacing 10 34 | 35 | (box 36 | :class "left_widget_clock_date" 37 | :halign "center" 38 | :space-evenly false 39 | :spacing 20 40 | 41 | (label :text "${DATE_DOW}") 42 | (label :text "${DATE_DAY}") 43 | ) 44 | 45 | (calendar 46 | :class "left_widget_clock_calendar" 47 | :show-heading false 48 | :active false 49 | ) 50 | ) 51 | ) 52 | ) 53 | ) 54 | ) 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /new_eww/yuck/modules/left_widget/module_left_widget_lan.yuck: -------------------------------------------------------------------------------- 1 | (defwidget module_left_widget_lan [] 2 | (eventbox 3 | :halign "center" 4 | :valign "center" 5 | :width {round(DP_WIDTH / BOX_SIZE_LEFT_WIDGET_P_H, 0)} 6 | :height {round(DP_HEIGHT / 20, 0)} 7 | :onhover "${EWW_CMD} update HOVER_LAN=true &" 8 | :onhoverlost "${EWW_CMD} update HOVER_LAN=false SHOW_LAN=false &" 9 | 10 | (box 11 | :orientation "v" 12 | :halign "start" 13 | :valign "center" 14 | :space-evenly false 15 | :spacing 10 16 | 17 | ;; Top Box 18 | (box 19 | :halign "center" 20 | :valign "center" 21 | :space-evenly false 22 | :spacing 15 23 | 24 | ;; Left 25 | (revealer 26 | :transition "slideright" 27 | :reveal {HOVER_LAN == false} 28 | :duration "200ms" 29 | 30 | (box 31 | :class "left_widget_lan_status" 32 | :width {round(DP_WIDTH / 30, 0)} 33 | :height {round(DP_HEIGHT / 20, 0)} 34 | 35 | (box 36 | (label 37 | :class "icon" 38 | :text {LAN_CON_STATUS == "connected" ? 39 | "󰤨" 40 | : 41 | "󰤭" 42 | } 43 | ) 44 | ) 45 | ) 46 | ) 47 | 48 | ;; Center 49 | (eventbox 50 | :class "left_widget_lan_button_rect" 51 | :onclick "scripts/network.sh --toggle" 52 | 53 | (box 54 | :width {round(DP_WIDTH / 6.4, 0)} 55 | :height {round(DP_HEIGHT / 20, 0)} 56 | 57 | (box 58 | (label 59 | :class "label" 60 | :limit-width 20 61 | :text {LAN_CON_STATUS == "connected" ? 62 | "${LAN_SSID}" 63 | : 64 | "offline" 65 | } 66 | ) 67 | ) 68 | ) 69 | ) 70 | 71 | ;; Right 72 | (revealer 73 | :transition "slideright" 74 | :reveal HOVER_LAN 75 | :duration "200ms" 76 | 77 | (eventbox 78 | :class "left_widget_lan_button_square" 79 | :width {round(DP_WIDTH / 30, 0)} 80 | :height {round(DP_HEIGHT / 20, 0)} 81 | :onclick "${EWW_CMD} update SHOW_LAN=true" 82 | 83 | (box 84 | (label :class "icon" :text "󰅂") 85 | ) 86 | ) 87 | ) 88 | ) 89 | 90 | ;; Bottom box 91 | (revealer 92 | :transition "slidedown" 93 | :reveal SHOW_LAN 94 | :duration "200ms" 95 | 96 | (box 97 | :halign "center" 98 | :valign "center" 99 | :width {round(DP_WIDTH / BOX_SIZE_LEFT_WIDGET_P_H, 0)} 100 | :height {round(DP_HEIGHT / BOX_SIZE_LEFT_WIDGET_P_V, 0)} 101 | 102 | (box 103 | :class "left_widget_lan_ssid_entry" 104 | :halign "center" 105 | :valign "center" 106 | :width {round(DP_WIDTH / BOX_SIZE_LEFT_WIDGET_P_H, 0)} 107 | :height {round(DP_HEIGHT / BOX_SIZE_LEFT_WIDGET_P_V, 0)} 108 | 109 | (scroll 110 | :hscroll false 111 | :vscroll true 112 | :vexpand true 113 | 114 | (box 115 | :orientation "v" 116 | :halign "center" 117 | :valign "center" 118 | :space-evenly false 119 | :spacing 10 120 | 121 | (for entry in JSON_SSID 122 | (eventbox 123 | :class "left_widget_lan_ssid_button" 124 | :halign "center" 125 | :valign "center" 126 | :width {round(DP_WIDTH / BOX_SIZE_LEFT_WIDGET_C_H, 0)} 127 | :height {round(DP_HEIGHT / 20, 0)} 128 | 129 | (box 130 | (button 131 | :onclick "nmcli con up '${entry}'" 132 | 133 | (label 134 | :class "label" 135 | :limit-width 20 136 | :text "${entry}" 137 | ) 138 | ) 139 | ) 140 | ) 141 | ) 142 | ) 143 | ) 144 | ) 145 | ) 146 | ) 147 | ) 148 | ) 149 | ) 150 | 151 | 152 | 153 | -------------------------------------------------------------------------------- /new_eww/yuck/modules/left_widget/module_left_widget_profile.yuck: -------------------------------------------------------------------------------- 1 | (defwidget module_left_widget_profile [] 2 | (box 3 | (revealer 4 | :transition "slideup" 5 | :reveal {SHOW_CALENDAR == SHOW_LAN == SHOW_BLUETOOTH == false} 6 | :duration "200ms" 7 | 8 | (box 9 | :class "left_widget_profile_bg" 10 | :halign "center" 11 | :valign "center" 12 | :width {round(DP_WIDTH / BOX_SIZE_LEFT_WIDGET_P_H, 0)} 13 | :height {round(DP_HEIGHT / BOX_SIZE_LEFT_WIDGET_P_V, 0)} 14 | 15 | (box 16 | :orientation "v" 17 | :halign "center" 18 | :valign "center" 19 | :space-evenly false 20 | :spacing 20 21 | 22 | (box 23 | :halign "center" 24 | :valign "center" 25 | :style 26 | " 27 | background-image: url('${PF_FACE}'); 28 | background-repeat: no-repeat; 29 | background-size: cover; 30 | background-position: center center; 31 | min-width: 8rem; 32 | min-height: 8rem; 33 | border-radius: 4rem; 34 | " 35 | ) 36 | 37 | (label 38 | :class "left_widget_profile_name" 39 | :text "${PF_NAME}" 40 | ) 41 | ) 42 | ) 43 | ) 44 | ) 45 | ) 46 | -------------------------------------------------------------------------------- /new_eww/yuck/modules/left_widget/module_left_widget_sysinfo.yuck: -------------------------------------------------------------------------------- 1 | (defwidget module_left_widget_sysinfo [] 2 | (box 3 | :halign "center" 4 | :valign "center" 5 | :width {round(DP_WIDTH / BOX_SIZE_LEFT_WIDGET_P_H, 0)} 6 | :height {round(DP_HEIGHT / 4, 0)} 7 | 8 | (box 9 | :halign "center" 10 | :valign "center" 11 | :space-evenly false 12 | :spacing 20 13 | 14 | (box 15 | :class "left_widget_sysinfo_micvol" 16 | :orientation "v" 17 | :halign "center" 18 | :valign "center" 19 | :space-evenly false 20 | :spacing 20 21 | 22 | (box 23 | :class "scale" 24 | 25 | (scale 26 | :orientation "v" 27 | :flipped true 28 | :value MICVOL_LEVEL 29 | :min 0 30 | :max 100 31 | :active false 32 | ) 33 | ) 34 | 35 | (label :class "icon" :text "") 36 | ) 37 | 38 | (box 39 | :class "left_widget_sysinfo_volume" 40 | :orientation "v" 41 | :halign "center" 42 | :valign "center" 43 | :space-evenly false 44 | :spacing 20 45 | 46 | (box 47 | :class "scale" 48 | 49 | (scale 50 | :orientation "v" 51 | :flipped true 52 | :value VOLUME_LEVEL 53 | :min 0 54 | :max 100 55 | :active false 56 | ) 57 | ) 58 | 59 | (label :class "icon" :text "") 60 | ) 61 | 62 | (box 63 | :class "left_widget_sysinfo_bright" 64 | :orientation "v" 65 | :halign "center" 66 | :valign "center" 67 | :space-evenly false 68 | :spacing 20 69 | 70 | (box 71 | :class "scale" 72 | 73 | (scale 74 | :orientation "v" 75 | :flipped true 76 | :value BRIGHTNESS 77 | :min 0 78 | :max 100 79 | :active false 80 | ) 81 | ) 82 | 83 | (label :class "icon" :text "") 84 | ) 85 | 86 | (box 87 | :class "left_widget_sysinfo_battery" 88 | :orientation "v" 89 | :halign "center" 90 | :valign "center" 91 | :space-evenly false 92 | :spacing 20 93 | 94 | (box 95 | :class "scale" 96 | 97 | (scale 98 | :orientation "v" 99 | :flipped true 100 | :value BATTERY_LEVEL 101 | :min 0 102 | :max 100 103 | :active false 104 | ) 105 | ) 106 | 107 | (label :class "icon" :text "") 108 | ) 109 | ) 110 | ) 111 | ) 112 | -------------------------------------------------------------------------------- /new_eww/yuck/modules/left_widget/module_left_widget_weather.yuck: -------------------------------------------------------------------------------- 1 | (defwidget module_left_widget_weather [] 2 | (box 3 | :halign "center" 4 | :valign "center" 5 | :width {round(DP_WIDTH / BOX_SIZE_LEFT_WIDGET_P_H, 0)} 6 | :height {round(DP_HEIGHT / 9, 0)} 7 | 8 | (box 9 | :orientation "v" 10 | :halign "center" 11 | :valign "center" 12 | :space-evenly false 13 | 14 | ;; Conditions 15 | (box 16 | :class "left_widget_weather_con" 17 | :halign "center" 18 | :valign "center" 19 | :height {round(DP_HEIGHT / 22, 0)} 20 | 21 | {"${WEATHER_CON}" == "" ? 22 | "offline" 23 | : 24 | "${WEATHER_CON}" 25 | } 26 | ) 27 | 28 | ;; Locale and temperature 29 | (box 30 | :halign "center" 31 | :space-evenly false 32 | :height {round(DP_HEIGHT / 22, 0)} 33 | :spacing 20 34 | 35 | (box 36 | :class "left_widget_weather_locale" 37 | 38 | (label :class "label" :text "${WEATHER_LOCALE}") 39 | ) 40 | 41 | (box 42 | :class "left_widget_weather_temp" 43 | :halign "center" 44 | :valign "center" 45 | :space-evenly false 46 | :spacing 5 47 | 48 | (label 49 | :class "label" 50 | :text "${WEATHER_TEMP}" 51 | ) 52 | 53 | (label 54 | :class "icon" 55 | :text "󰔄" 56 | ) 57 | ) 58 | ) 59 | ) 60 | ) 61 | ) 62 | -------------------------------------------------------------------------------- /new_eww/yuck/modules/right_notifpop/module_right_notifpop_bg.yuck: -------------------------------------------------------------------------------- 1 | (defwidget module_right_notifpop_bg [] 2 | (box) 3 | ) 4 | -------------------------------------------------------------------------------- /new_eww/yuck/modules/right_notifpop/module_right_notifpop_fg.yuck: -------------------------------------------------------------------------------- 1 | (defwidget module_right_notifpop_fg [] 2 | (box 3 | ) 4 | ) 5 | -------------------------------------------------------------------------------- /new_eww/yuck/modules/top_bar/module_top_bar_bar_left.yuck: -------------------------------------------------------------------------------- 1 | (defwidget module_top_bar_bar_left [] 2 | (box 3 | :halign "start" 4 | :valign "center" 5 | :space-evenly false 6 | :spacing 10 7 | 8 | (eventbox 9 | :class "bar_left_uptime" 10 | :width {round(DP_WIDTH / 10, 0)} 11 | :height {round(DP_HEIGHT / BOX_SIZE_TOP_BAR_C_V, 0)} 12 | 13 | (box 14 | (label :class "label" :limit-width 15 :text "${UPTIME}") 15 | ) 16 | ) 17 | 18 | (box 19 | :class "bar_left_workspaces" 20 | :width {round(DP_WIDTH / 8.7, 0)} 21 | :height {round(DP_HEIGHT / BOX_SIZE_TOP_BAR_C_V, 0)} 22 | 23 | (box 24 | :halign "center" 25 | :valign "center" 26 | 27 | (literal :content WS) 28 | ) 29 | ) 30 | 31 | (eventbox 32 | :onclick {SHOW_BAR_CENTER ? 33 | " 34 | ${EWW_CMD} update SHOW_BAR_CENTER=false & 35 | " 36 | : 37 | " 38 | scripts/launcher/launch_left_widget.sh --close && 39 | ${EWW_CMD} update SHOW_BAR_CENTER=true & 40 | " 41 | } 42 | 43 | (box 44 | :orientation "v" 45 | :space-evenly false 46 | 47 | (revealer 48 | :transition "slidedown" 49 | :reveal {SHOW_BAR_CENTER == false} 50 | 51 | (eventbox 52 | :class "bar_left_divide" 53 | :width {round(DP_WIDTH / 28, 0)} 54 | :height {round(DP_HEIGHT / BOX_SIZE_TOP_BAR_C_V, 0)} 55 | 56 | (box 57 | (label 58 | :class "icon" 59 | :text "󱢡" 60 | ; :text "" 61 | ) 62 | ) 63 | ) 64 | ) 65 | 66 | (revealer 67 | :reveal SHOW_BAR_CENTER 68 | :transition "slidedown" 69 | 70 | (eventbox 71 | :class "bar_left_conquer" 72 | :width {round(DP_WIDTH / 28, 0)} 73 | :height {round(DP_HEIGHT / BOX_SIZE_TOP_BAR_C_V, 0)} 74 | 75 | (box 76 | (label 77 | :class "icon" 78 | :text "󱢮" 79 | ; :text "" 80 | ) 81 | ) 82 | ) 83 | ) 84 | ) 85 | ) 86 | ) 87 | ) 88 | 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /new_eww/yuck/modules/top_bar/module_top_bar_bar_right.yuck: -------------------------------------------------------------------------------- 1 | (defwidget module_top_bar_bar_right [] 2 | (box 3 | :halign "end" 4 | :valign "center" 5 | :space-evenly false 6 | :spacing 10 7 | 8 | (box 9 | :class "bar_right_battery" 10 | :width {round(DP_WIDTH / 7.5, 0)} 11 | :height {round(DP_HEIGHT / BOX_SIZE_TOP_BAR_C_V, 0)} 12 | 13 | (label 14 | :class "icon" 15 | :text "${BATTERY_ICONS}" 16 | ) 17 | ) 18 | 19 | (box 20 | :class "bar_right_date" 21 | :width {round(DP_WIDTH / 18, 0)} 22 | :height {round(DP_HEIGHT / BOX_SIZE_TOP_BAR_C_V, 0)} 23 | 24 | (box 25 | (label :class "label" :text "${DATE_DOW} / ${DATE_DAY}") 26 | ) 27 | ) 28 | 29 | (box 30 | :class "bar_right_time" 31 | :width {round(DP_WIDTH / 16, 0)} 32 | :height {round(DP_HEIGHT / BOX_SIZE_TOP_BAR_C_V, 0)} 33 | 34 | (box 35 | :halign "center" 36 | :valign "center" 37 | :space-evenly false 38 | :spacing 15 39 | 40 | (label :class "time_icon" :text "") 41 | (label :class "time_label" :text "${TIME_HOUR} : ${TIME_MIN}") 42 | ) 43 | ) 44 | ) 45 | ) 46 | -------------------------------------------------------------------------------- /new_eww/yuck/widgets/widget_bottom_bar.yuck: -------------------------------------------------------------------------------- 1 | (defwidget widget_bottom_bar [] 2 | (box 3 | :style {SHOW_LEFT_WIDGET ? 4 | " 5 | margin-left: 20rem; 6 | transition: 200ms ease; 7 | " 8 | : 9 | " 10 | transition: 200ms ease; 11 | " 12 | } 13 | 14 | (box 15 | :class "bottom_bar_root_box" 16 | 17 | (box 18 | :class "bottom_bar_dock_center" 19 | :halign "center" 20 | :valign "center" 21 | :width {round(DP_WIDTH / BOX_SIZE_BOTTOM_BAR_P_H, 0)} 22 | :height {round(DP_HEIGHT / BOX_SIZE_BOTTOM_BAR_P_V, 0)} 23 | 24 | (centerbox 25 | (box 26 | :class "dock_center_bumper_left" 27 | :halign "start" 28 | :valign "center" 29 | :width {round(DP_WIDTH / 60, 0)} 30 | :height {round(DP_HEIGHT / BOX_SIZE_BOTTOM_BAR_P_V, 0)} 31 | ) 32 | 33 | (box 34 | :halign "center" 35 | :valign "center" 36 | :width {round(DP_WIDTH / BOX_SIZE_BOTTOM_BAR_C_H, 0)} 37 | :height {round(DP_HEIGHT / BOX_SIZE_BOTTOM_BAR_C_V, 0)} 38 | ; :style "background-color: #ffffff;" 39 | 40 | (module_bottom_bar_dock_center) 41 | ) 42 | 43 | (box 44 | :class "dock_center_bumper_right" 45 | :halign "end" 46 | :valign "center" 47 | :width {round(DP_WIDTH / 60, 0)} 48 | :height {round(DP_HEIGHT / BOX_SIZE_BOTTOM_BAR_P_V, 0)} 49 | ) 50 | ) 51 | ) 52 | ) 53 | ) 54 | ) 55 | 56 | -------------------------------------------------------------------------------- /new_eww/yuck/widgets/widget_center_dashboard.yuck: -------------------------------------------------------------------------------- 1 | (defwidget widget_center_dashboard [] 2 | (box 3 | :class "center_dashboard_root_box" 4 | 5 | (module_center_dashboard_rice_changer) 6 | ) 7 | ) 8 | -------------------------------------------------------------------------------- /new_eww/yuck/widgets/widget_center_dmenu.yuck: -------------------------------------------------------------------------------- 1 | (defwidget widget_center_dmenu [] 2 | (box 3 | :style {SHOW_LEFT_WIDGET ? 4 | " 5 | margin-left: 10rem; 6 | transition: 300ms ease; 7 | " 8 | : 9 | " 10 | transition: 300ms ease; 11 | " 12 | } 13 | 14 | (box 15 | ; :style {SHOW_CENTER_DMENU ? 16 | ; " 17 | ; transition: 400ms ease; 18 | ; " 19 | ; : 20 | ; " 21 | ; margin-top: -10rem; 22 | ; " 23 | ; } 24 | 25 | (module_center_dmenu_gamepad) 26 | ) 27 | ) 28 | ) 29 | -------------------------------------------------------------------------------- /new_eww/yuck/widgets/widget_left_widget.yuck: -------------------------------------------------------------------------------- 1 | (defwidget widget_left_widget [] 2 | (box 3 | (box 4 | (box 5 | :class "left_widget_root_box" 6 | :halign "center" 7 | :valign "center" 8 | :width {round(DP_WIDTH / BOX_SIZE_LEFT_WIDGET_ROOT_BOX_P_H, 0)} 9 | :height {round(DP_HEIGHT / BOX_SIZE_LEFT_WIDGET_ROOT_BOX_P_V, 0)} 10 | 11 | (box 12 | :halign "center" 13 | :valign "center" 14 | :width {round(DP_WIDTH / BOX_SIZE_LEFT_WIDGET_ROOT_BOX_C_H, 0)} 15 | :height {round(DP_HEIGHT / BOX_SIZE_LEFT_WIDGET_ROOT_BOX_C_V, 0)} 16 | 17 | (box 18 | :orientation "v" 19 | :halign "center" 20 | :valign "start" 21 | :space-evenly false 22 | :spacing 10 23 | 24 | ;; Clock 25 | (module_left_widget_clock) 26 | 27 | ;; Weather 28 | (module_left_widget_weather) 29 | 30 | ;; Profile 31 | (module_left_widget_profile) 32 | 33 | ;; Sysinfo 34 | (module_left_widget_sysinfo) 35 | 36 | ;; Lan 37 | (module_left_widget_lan) 38 | 39 | ;; Bluetooth 40 | (module_left_widget_bluetooth) 41 | ) 42 | ) 43 | ) 44 | ) 45 | ) 46 | ) 47 | -------------------------------------------------------------------------------- /new_eww/yuck/widgets/widget_right_mplayer.yuck: -------------------------------------------------------------------------------- 1 | (defwidget widget_right_mplayer [] 2 | (box 3 | :halign "center" 4 | :valign "center" 5 | :space-evenly false 6 | 7 | ;; uwustagram 8 | (box 9 | :style {SHOW_RIGHT_MPLAYER ? 10 | " 11 | transition: 400ms ease; 12 | " 13 | : 14 | " 15 | margin-right: -20rem; 16 | " 17 | } 18 | 19 | (box 20 | :class "right_mplayer_uwustagram_root_box" 21 | :halign "center" 22 | :valign "center" 23 | :width {round(DP_WIDTH / BOX_SIZE_RIGHT_MPLAYER_P_H, 0)} 24 | :height {round(DP_HEIGHT / BOX_SIZE_RIGHT_MPLAYER_P_V, 0)} 25 | 26 | (box 27 | (module_right_mplayer_uwustagram) 28 | ) 29 | ) 30 | ) 31 | ) 32 | ) 33 | 34 | -------------------------------------------------------------------------------- /new_eww/yuck/widgets/widget_right_notifpop.yuck: -------------------------------------------------------------------------------- 1 | (defwidget widget_right_notifpop [] 2 | (box 3 | :class "right_notifpop_root_box" 4 | :halign "center" 5 | :valign "center" 6 | :width {round(DP_WIDTH / BOX_SIZE_RIGHT_NOTIFPOP_ROOT_BOX_P_H, 0)} 7 | :height {round(DP_HEIGHT / BOX_SIZE_RIGHT_NOTIFPOP_ROOT_BOX_P_V, 0)} 8 | 9 | (box 10 | (overlay 11 | (module_right_notifpop_bg) 12 | (module_right_notifpop_fg) 13 | ) 14 | ) 15 | ) 16 | ) 17 | 18 | -------------------------------------------------------------------------------- /new_eww/yuck/widgets/widget_top_bar.yuck: -------------------------------------------------------------------------------- 1 | (defwidget widget_top_bar [] 2 | (box 3 | :style {SHOW_LEFT_WIDGET ? 4 | " 5 | margin-left: 40rem; 6 | transition: 400ms ease; 7 | " 8 | : 9 | " 10 | transition: 400ms ease; 11 | " 12 | } 13 | 14 | (box 15 | :class {SHOW_BAR_CENTER == true && SHOW_BAR_CENTER_REV_SW == true ? 16 | "top_bar_root_box_div" 17 | : 18 | "top_bar_root_box" 19 | } 20 | 21 | (box 22 | :halign "center" 23 | :space-evenly false 24 | 25 | ;; Bar left 26 | (box 27 | :class {SHOW_BAR_CENTER ? 28 | "top_bar_left_div" 29 | : 30 | "top_bar_left" 31 | } 32 | 33 | :halign "center" 34 | :valign "center" 35 | :width {round(DP_WIDTH / BOX_SIZE_TOP_BAR_P_H, 0)} 36 | :height {round(DP_HEIGHT / BOX_SIZE_TOP_BAR_P_V, 0)} 37 | 38 | ;; Dummy for the margin 39 | (box 40 | :halign "center" 41 | :valign "center" 42 | :width {round(DP_WIDTH / BOX_SIZE_TOP_BAR_C_H, 0)} 43 | :height {round(DP_HEIGHT / BOX_SIZE_TOP_BAR_C_V, 0)} 44 | 45 | (module_top_bar_bar_left) 46 | ) 47 | ) 48 | 49 | 50 | ;; Bar center 51 | (revealer 52 | :transition "slideleft" 53 | :reveal SHOW_BAR_CENTER 54 | :duration "300ms" 55 | 56 | ;; Dummy space for the box shadow 57 | (box 58 | :halign "center" 59 | :width {round(DP_WIDTH / 3.2, 0)} 60 | 61 | (box 62 | :class "top_bar_center" 63 | :halign "center" 64 | :valign "center" 65 | 66 | (module_top_bar_bar_center) 67 | ) 68 | ) 69 | ) 70 | 71 | ;; Bar right 72 | (box 73 | :class {SHOW_BAR_CENTER ? 74 | "top_bar_right_div" 75 | : 76 | "top_bar_right" 77 | } 78 | 79 | :halign "center" 80 | :valign "center" 81 | :width {round(DP_WIDTH / BOX_SIZE_TOP_BAR_P_H, 0)} 82 | :height {round(DP_HEIGHT / BOX_SIZE_TOP_BAR_P_V, 0)} 83 | 84 | ;; Dummy for the margin 85 | (box 86 | :halign "center" 87 | :valign "center" 88 | :width {round(DP_WIDTH / BOX_SIZE_TOP_BAR_C_H, 0)} 89 | :height {round(DP_HEIGHT / BOX_SIZE_TOP_BAR_C_V, 0)} 90 | 91 | (module_top_bar_bar_right) 92 | ) 93 | ) 94 | ) 95 | ) 96 | ) 97 | ) 98 | -------------------------------------------------------------------------------- /old_eww/bar/eww.scss: -------------------------------------------------------------------------------- 1 | /** Variables *******************************************************/ 2 | 3 | // Colors 4 | $fg: #c6c8d1; 5 | $bg: #161821; 6 | $bg-alt: #545454; 7 | $primary: #fea4b0; 8 | $secondary: #fff1bb; 9 | 10 | /** Global **********************************************************/ 11 | * { 12 | all: unset; 13 | font-family: "JetBrainsMono"; 14 | } 15 | /** Windows *********************************************************/ 16 | .window_bg { 17 | background: $fg; 18 | opacity: 0.5; 19 | } 20 | 21 | .window_start, 22 | .window_workspace, 23 | .window_activewindow, 24 | .window_sysinfo, 25 | .window_battery, 26 | .window_clock, 27 | .window_menu, 28 | { 29 | background-color: $bg; 30 | border: 0.15rem solid $primary; 31 | } 32 | 33 | .window_music { 34 | background-color: $bg; 35 | border: 0.15rem solid $bg-alt; 36 | } 37 | 38 | /** Widgets *********************************************************/ 39 | 40 | // Start 41 | .start { 42 | } 43 | 44 | // Workspace 45 | .workspace_active { 46 | color: $primary; 47 | } 48 | .workspace_inactive { 49 | color: $fg; 50 | } 51 | .workspace_occupied { 52 | color: $secondary; 53 | } 54 | 55 | // Activewindow 56 | .activewindow_icon { 57 | color: $secondary; 58 | } 59 | .activewindow_name { 60 | color: $fg; 61 | font-size: 0.95rem; 62 | font-weight: bold; 63 | } 64 | 65 | // Music 66 | .music_title, 67 | .music_artist 68 | { 69 | color: $fg; 70 | font-size: 0.95rem; 71 | font-weight: bold; 72 | } 73 | 74 | // Systeminfo 75 | .bluetooth_icon, 76 | .lan_icon 77 | { 78 | color: $secondary; 79 | font-size: 0.95rem; 80 | } 81 | .bluetooth_devicename, 82 | .lan_ssid 83 | { 84 | color: $fg; 85 | font-size: 0.95rem; 86 | font-weight: bold; 87 | } 88 | 89 | .volume_icon, 90 | .bright_icon 91 | { 92 | color: $secondary; 93 | } 94 | .volume_level, 95 | .bright_level 96 | { 97 | color: $fg; 98 | font-size: 0.95rem; 99 | font-weight: bold; 100 | } 101 | 102 | // Battery 103 | .battery_icons { 104 | color: $primary; 105 | } 106 | 107 | // Clock 108 | .clock_icon { 109 | color: $secondary; 110 | } 111 | .clock_time { 112 | color: $fg; 113 | font-weight: bold; 114 | } 115 | 116 | // Menu 117 | .menu { 118 | color: $secondary; 119 | font-size: 1.25rem; 120 | } 121 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /old_eww/bar/eww.yuck: -------------------------------------------------------------------------------- 1 | ;; Include 2 | (include "eww_variables.yuck") 3 | (include "eww_windows.yuck") 4 | (include "eww_widgets.yuck") 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /old_eww/bar/eww_variables.yuck: -------------------------------------------------------------------------------- 1 | ;; Variables ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2 | 3 | ;; Inline CSS 4 | (defvar COLOR_FG "#c6c8d1") 5 | (defvar COLOR_BG "#2a2a2a") 6 | (defvar COLOR_BG_ALT "#545454") 7 | 8 | ;; Workspaces 9 | (defpoll WORKSPACES_YUCK :interval "0.5s" 10 | "scripts/workspaces.sh --workspaces_yuck") 11 | 12 | (defpoll ACTIVEWINDOW :interval "1s" 13 | "scripts/workspaces.sh --activewindow") 14 | 15 | ;; Date 16 | (defpoll TIME :interval "30s" "date +'%H:%M'") 17 | (defpoll MER :interval "1m" "date +'%p'") ;; AM or PM 18 | (defpoll DOW :interval "1m" "date +'%A'") ;; Day of week 19 | ; (defpoll MONTH :interval "1m" "date +'%m'") ;; Like a 03 08 20 | (defpoll MONTH :interval "1m" "date +'%B'") ;; Lhike a MAR, Aug,,, 21 | (defpoll DAY :interval "1m" "date +'%d'") 22 | 23 | 24 | ; Battery 25 | (defpoll BATTERY_ICONS :interval "30s" 26 | "scripts/battery.sh --icons") 27 | 28 | (defpoll BATTERY_LEVEL :interval "30s" 29 | "scripts/battery.sh --level") 30 | 31 | ;; Profile 32 | (defvar FACE "images/gab.png") 33 | (defpoll NAME :interval "2s" "whoami") 34 | 35 | ;; Brightness 36 | (defpoll BRIGHT_LEVEL :interval "2s" 37 | "scripts/brightness.sh --level") 38 | 39 | ;; Volume 40 | (defpoll VOLUME_LEVEL :interval "2s" 41 | "scripts/volume.sh --level") 42 | 43 | ;; LAN 44 | (defpoll LAN_CON_STATUS :interval "2s" 45 | "scripts/network.sh --con_status") 46 | 47 | (defpoll LAN_SSID :interval "2s" 48 | "scripts/network.sh --ssid") 49 | 50 | ;; Bluetooth 51 | (defpoll BLUETOOTH_CON_STATUS :interval "2s" 52 | "scripts/bluetooth.sh --con_status") 53 | 54 | (defpoll BLUETOOTH_DEVICENAME :interval "2s" 55 | "scripts/bluetooth.sh --device") 56 | 57 | ;; Music 58 | (defpoll MUSIC_PLAYING :interval "2s" 59 | "scripts/music.sh --status") 60 | 61 | (defpoll MUSIC_TITLE :interval "2s" 62 | "scripts/music.sh --title") 63 | 64 | (defpoll MUSIC_ARTIST :interval "2s" 65 | "scripts/music.sh --artist") 66 | 67 | (defvar MUSIC_ART_DEFAULT "images/musical-note.png") 68 | 69 | (defpoll MUSIC_ART :interval "1s" 70 | "scripts/music.sh --art") 71 | 72 | (defpoll MUSIC_POSITION :interval "2s" 73 | "scripts/music.sh --position") 74 | 75 | (defpoll MUSIC_LOOP_STATUS :interval "2s" 76 | "scripts/music.sh --loop_status") 77 | 78 | 79 | -------------------------------------------------------------------------------- /old_eww/bar/eww_widgets.yuck: -------------------------------------------------------------------------------- 1 | ;; Widgets ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2 | 3 | ;; Background 4 | (defwidget widget_bg [] 5 | (box ) 6 | ) 7 | 8 | ;; Start 9 | (defwidget widget_start [] 10 | (eventbox :class "start" 11 | :onclick "$HOME/.config/eww/popup/launch.sh --toggle_gnome_widget" 12 | :style "background-image: url('${FACE}'); 13 | background-repeat: no-repeat; 14 | background-size: cover; 15 | opacity: 0.75; 16 | " 17 | ) 18 | ) 19 | 20 | ;; Workspace 21 | (defwidget widget_workspace [] 22 | (box :halign "center" :valign "center" 23 | (literal :content WORKSPACES_YUCK) 24 | ) 25 | ) 26 | 27 | ;; Activewindow 28 | (defwidget widget_activewindow [] 29 | (box :halign "center" :valign "center" :space-evenly false :spacing 10 30 | (label :class "activewindow_icon" :text "󰖲") 31 | (label :class "activewindow_name" :limit-width 15 :text "${ACTIVEWINDOW}") 32 | ) 33 | ) 34 | 35 | ;; Music 36 | (defwidget widget_music [] 37 | (eventbox :onclick "$HOME/.config/eww/popup/launch.sh --toggle_music" 38 | 39 | (overlay 40 | (revealer :reveal "${MUSIC_PLAYING}" :transition "crossfade" 41 | (box :class "music_background" 42 | :css " .music_background { 43 | background-image: url('${MUSIC_ART}'); 44 | background-repeat: no-repeat; 45 | background-size: cover; 46 | background-position: center center; 47 | 48 | opacity: 0.5; 49 | } 50 | " 51 | ) 52 | ) 53 | 54 | (box :orientation "v" :valign "center" 55 | (label :class "music_title" :halign "center" :limit-width 25 :text "${MUSIC_TITLE}") 56 | (label :class "music_artist" :halign "center" :limit-width 25 :text "${MUSIC_ARTIST}") 57 | ) 58 | ) 59 | ) 60 | ) 61 | 62 | ;; Systeminfo 63 | (defwidget widget_sysinfo [] 64 | (box :halign "center" :valign "center" :space-evenly false :spacing 30 65 | 66 | ;; Network connections 67 | (box :orientation "v" 68 | 69 | ;; Bluetooth 70 | (box :halign "center" :valign "center" :space-evenly false :spacing 15 71 | (label :class "bluetooth_icon" :text {BLUETOOTH_CON_STATUS == "connected" ? "󰂯" : "󰂲"}) 72 | (label :class "bluetooth_devicename" :limit-width 20 :text "${BLUETOOTH_DEVICENAME}") 73 | ) 74 | 75 | ;; Wifi 76 | (box :halign "center" :valign "center" :space-evenly false :spacing 15 77 | (label :class "lan_icon" :text {LAN_CON_STATUS == "connected" ? "󰤨" : "󰤭"}) 78 | (label :class "lan_ssid" :limit-width 20 :text {LAN_CON_STATUS == "connected" ? "${LAN_SSID}" : "offline"}) 79 | ) 80 | ) 81 | 82 | ;; Volume 83 | (box :halign "center" :valign "center" :space-evenly false :spacing 15 84 | (label :class "volume_icon" :text "") 85 | (label :class "volume_level" :text "${VOLUME_LEVEL}%") 86 | ) 87 | 88 | ;; Brightness 89 | (box :halign "center" :valign "center" :space-evenly false :spacing 15 90 | (label :class "bright_icon" :text "") 91 | (label :class "bright_level" :text "${BRIGHT_LEVEL}%") 92 | ) 93 | ) 94 | ) 95 | 96 | ;; Battery 97 | (defwidget widget_battery [] 98 | (box :halign "center" :valign "center" 99 | (label :class "battery_icons" :text "${BATTERY_ICONS}") 100 | ) 101 | ) 102 | 103 | ;; Clock 104 | (defwidget widget_clock [] 105 | (box :halign "center" :valign "center" :space-evenly false :spacing 20 106 | (label :class "clock_icon" :text "") 107 | (label :class "clock_time" :text "${TIME}") 108 | ) 109 | ) 110 | 111 | ;; Menu 112 | (defwidget widget_menu [] 113 | (box :class "menu" 114 | (label :text "󰥹") 115 | ) 116 | ) 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | -------------------------------------------------------------------------------- /old_eww/bar/eww_windows.yuck: -------------------------------------------------------------------------------- 1 | ;; Windows ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2 | 3 | ;; Background 4 | (defwindow window_bg 5 | :monitor 0 6 | :stacking "bg" 7 | :wm-ignore true 8 | :geometry (geometry :x 0 9 | :y 0 10 | :width "100%" 11 | :height "5.4%" 12 | :anchor "top left" 13 | ) 14 | (widget_bg) 15 | ) 16 | 17 | ;; Start 18 | (defwindow window_start 19 | :monitor 0 20 | :stacking "fg" 21 | :wm-ignore true 22 | :geometry (geometry :x "0.5%" 23 | :y "0.7%" 24 | :width "2.5%" 25 | :height "4%" 26 | :anchor "top left" 27 | ) 28 | (widget_start) 29 | ) 30 | 31 | ;; Workspace 32 | (defwindow window_workspace 33 | :monitor 0 34 | :stacking "fg" 35 | :wm-ignore true 36 | :geometry (geometry :x "3.5%" 37 | :y "0.7%" 38 | :width "13.5%" 39 | :height "4%" 40 | :anchor "top left" 41 | ) 42 | (widget_workspace) 43 | ) 44 | 45 | ;; Activewindow 46 | (defwindow window_activewindow 47 | :monitor 0 48 | :stacking "fg" 49 | :wm-ignore true 50 | :geometry (geometry :x "17.5%" 51 | :y "0.7%" 52 | :width "15%" 53 | :height "4%" 54 | :anchor "top left" 55 | ) 56 | (widget_activewindow) 57 | ) 58 | 59 | ;; Music 60 | (defwindow window_music 61 | :monitor 0 62 | :stacking "fg" 63 | :wm-ignore true 64 | :geometry (geometry :x "33%" 65 | :y "0.7%" 66 | :width "22%" 67 | :height "4%" 68 | :anchor "top left" 69 | ) 70 | (widget_music) 71 | ) 72 | 73 | ;; Systeminfo 74 | (defwindow window_sysinfo 75 | :monitor 0 76 | :stacking "fg" 77 | :wm-ignore true 78 | :geometry (geometry :x "-24.5%" 79 | :y "0.7%" 80 | :width "20%" 81 | :height "4%" 82 | :anchor "top right" 83 | ) 84 | (widget_sysinfo) 85 | ) 86 | 87 | ;; Battery 88 | (defwindow window_battery 89 | :monitor 0 90 | :stacking "fg" 91 | :wm-ignore true 92 | :geometry (geometry :x "-11.5%" 93 | :y "0.7%" 94 | :width "12.5%" 95 | :height "4%" 96 | :anchor "top right" 97 | ) 98 | (widget_battery) 99 | ) 100 | 101 | ;; Clock 102 | (defwindow window_clock 103 | :monitor 0 104 | :stacking "fg" 105 | :wm-ignore true 106 | :geometry (geometry :x "-3.5%" 107 | :y "0.7%" 108 | :width "7.5%" 109 | :height "4%" 110 | :anchor "top right" 111 | ) 112 | (widget_clock) 113 | ) 114 | 115 | ;; Menu 116 | (defwindow window_menu 117 | :monitor 0 118 | :stacking "fg" 119 | :wm-ignore true 120 | :geometry (geometry :x "-0.5%" 121 | :y "0.7%" 122 | :width "2.5%" 123 | :height "4%" 124 | :anchor "top right" 125 | ) 126 | (widget_menu) 127 | ) 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | -------------------------------------------------------------------------------- /old_eww/bar/images/gab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tail-R/xmonad_eww_dotfiles/6888e82c377fb16d67fa4741f5fabd6ffdf5225a/old_eww/bar/images/gab.png -------------------------------------------------------------------------------- /old_eww/bar/images/musical-note.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tail-R/xmonad_eww_dotfiles/6888e82c377fb16d67fa4741f5fabd6ffdf5225a/old_eww/bar/images/musical-note.png -------------------------------------------------------------------------------- /old_eww/bar/launch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ewwPath="$HOME/.config/eww/bar" 4 | tmpPath="$HOME/.cache/eww/bar" 5 | 6 | if [ ! -d $HOME/.cache/eww ]; then 7 | mkdir ~/.cache/eww 8 | fi 9 | 10 | windows=" 11 | window_bg 12 | window_start 13 | window_workspace 14 | window_activewindow 15 | window_music 16 | 17 | window_sysinfo 18 | window_battery 19 | window_clock 20 | window_menu 21 | " 22 | 23 | toggle() { 24 | if [ -f $tmpPath ]; then 25 | rm $tmpPath 26 | eww -c $ewwPath close-all 27 | else 28 | touch $tmpPath 29 | eww -c $ewwPath open-many $windows 30 | fi 31 | } 32 | 33 | # Main 34 | if [ "$1" == "--open-all" ]; then 35 | touch $tmpPath 36 | eww -c $ewwPath open-many $windows 37 | elif [ "$1" == "--toggle" ]; then 38 | toggle 39 | fi 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /old_eww/bar/scripts/battery.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | get_battery_level() { 4 | echo $(acpi -b | sed -e "s/[A-Za-z:,-.%]\+//g" | awk 'NR == 1 {print $2}') 5 | } 6 | 7 | get_adapter_status() { 8 | echo "$(acpi -b | awk 'NR == 1 {print $3}' | sed -e 's/,//g')" 9 | } 10 | 11 | get_battery_icons() { 12 | battery_level=$(get_battery_level) 13 | battery_level_trunc=$(($battery_level / 10 * 10)) 14 | 15 | if [ "$(get_adapter_status)" == "Charging" ]; then 16 | # Charging 17 | case "$battery_level_trunc" in 18 | "100" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐" 19 | return ;; 20 | "90" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰗶" 21 | return ;; 22 | "80" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰗶 󱢠" 23 | return ;; 24 | "70" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰗶 󱢠 󱢠" 25 | return ;; 26 | "60" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰗶 󱢠 󱢠 󱢠" 27 | return ;; 28 | "50" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰗶 󱢠 󱢠 󱢠 󱢠" 29 | return ;; 30 | "40" ) echo "󰣐 󰣐 󰣐 󰣐 󰗶 󱢠 󱢠 󱢠 󱢠 󱢠" 31 | return ;; 32 | "30" ) echo "󰣐 󰣐 󰣐 󰗶 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠" 33 | return ;; 34 | "20" ) echo "󰣐 󰣐 󰗶 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠" 35 | return ;; 36 | "10" ) echo "󰣐 󰗶 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠" 37 | return ;; 38 | "0" ) echo "󰗶 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠" 39 | return ;; 40 | esac 41 | else 42 | # Discharging 43 | case "$battery_level_trunc" in 44 | "100" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐" 45 | return ;; 46 | "90" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰛞" 47 | return ;; 48 | "80" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰛞 󱢠" 49 | return ;; 50 | "70" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰛞 󱢠 󱢠" 51 | return ;; 52 | "60" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰛞 󱢠 󱢠 󱢠" 53 | return ;; 54 | "50" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰛞 󱢠 󱢠 󱢠 󱢠" 55 | return ;; 56 | "40" ) echo "󰣐 󰣐 󰣐 󰣐 󰛞 󱢠 󱢠 󱢠 󱢠 󱢠" 57 | return ;; 58 | "30" ) echo "󰣐 󰣐 󰣐 󰛞 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠" 59 | return ;; 60 | "20" ) echo "󰣐 󰣐 󰛞 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠" 61 | return ;; 62 | "10" ) echo "󰣐 󰛞 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠" 63 | return ;; 64 | "0" ) echo "󰛞 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠" 65 | return ;; 66 | esac 67 | fi 68 | } 69 | 70 | # Main 71 | if [ "$1" == "--level" ]; then 72 | get_battery_level 73 | 74 | elif [ "$1" == "--icons" ]; then 75 | get_battery_icons 76 | fi 77 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /old_eww/bar/scripts/bluetooth.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | get_device_name() { 4 | if [ "$(get_con_status)" == "connected" ]; then 5 | echo $(bluetoothctl devices | awk 'NR == 1 {print $3}') 6 | else 7 | echo "No BT device founded" 8 | fi 9 | } 10 | 11 | get_con_status() { 12 | deviceNumber=$(bluetoothctl devices | awk 'NR == 1 {print $2}') 13 | conStatus=$(bluetoothctl info $deviceNumber | grep Connected: | awk '{print $2}') 14 | 15 | if [ "$conStatus" == "yes" ]; then 16 | echo "connected" 17 | else 18 | echo "disconnected" 19 | fi 20 | } 21 | 22 | toggle() { 23 | if [ "$(get_con_status)" == "connected" ]; then 24 | bluetoothctl disconnect 25 | else 26 | deviceNumber=$(bluetoothctl devices | awk 'NR == 1 {print $2}') 27 | bluetoothctl connect $deviceNumber 28 | fi 29 | } 30 | 31 | # Main 32 | if [ "$1" == "--con_status" ]; then 33 | get_con_status 34 | elif [ "$1" == "--device" ]; then 35 | get_device_name 36 | elif [ "$1" == "--toggle" ]; then 37 | toggle 38 | fi 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /old_eww/bar/scripts/brightness.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | get_bright_level() { 4 | max_level=$(brightnessctl m) 5 | current_level=$(brightnessctl g) 6 | 7 | echo $((current_level * 100 / max_level)) 8 | } 9 | 10 | # Main 11 | if [ "$1" == "--level" ]; then 12 | get_bright_level 13 | fi 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /old_eww/bar/scripts/music.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | get_music_title() { 3 | if [ "$(playerctl status)" == "Playing" ]; then 4 | echo $(playerctl metadata --format '{{title}}') 5 | else 6 | echo "offline" 7 | fi 8 | } 9 | 10 | get_music_artist() { 11 | if [ "$(playerctl status)" == "Playing" ]; then 12 | echo $(playerctl metadata --format '{{artist}}') 13 | else 14 | echo "unknown" 15 | fi 16 | } 17 | 18 | get_music_cover() { 19 | playerStatus=$(playerctl -l --no-messages) 20 | 21 | # Firefox founded 22 | if [ "${playerStatus:0:7}" == "firefox" ]; then 23 | path="$HOME/.mozilla/firefox/firefox-mpris/" 24 | image="$(ls $path)" 25 | 26 | echo "$path$image" 27 | return 28 | 29 | # Spotify founded 30 | elif [ "$playerStatus" == "spotify" ]; then 31 | echo $(playerctl metadata | grep artUrl | awk '{print $3}') 32 | return 33 | fi 34 | } 35 | 36 | get_music_status() { 37 | status=$(playerctl status --no-messages) 38 | 39 | if [ "$status" == "Playing" ]; then 40 | echo "true" 41 | else 42 | echo "false" 43 | fi 44 | } 45 | 46 | music_toggle() { 47 | playerctl play-pause 48 | } 49 | 50 | music_next() { 51 | playerctl next --no-messages 52 | } 53 | 54 | music_prev() { 55 | playerctl previous --no-messages 56 | } 57 | 58 | get_music_position() { 59 | if [ "$(playerctl status --no-messages)" == "Playing" ]; then 60 | length=$((`playerctl metadata | grep length | awk '{print $3}'` / 1000000)) 61 | position=$(playerctl position | awk '{printf("%d\n", $1)}') 62 | echo $((100 * $position / $length )) 63 | return 64 | fi 65 | 66 | echo 0 67 | } 68 | 69 | loop_toggle() { 70 | if [ "$(playerctl loop)" == "Playlist" ]; then 71 | playerctl loop track 72 | else 73 | playerctl loop playlist 74 | fi 75 | } 76 | 77 | get_loop_status() { 78 | if [ "$(playerctl loop)" == "Playlist" ]; then 79 | echo "false" 80 | else 81 | echo "true" 82 | fi 83 | } 84 | 85 | # Main 86 | case "$1" in 87 | "--title" ) get_music_title ;; 88 | "--artist" ) get_music_artist ;; 89 | "--art" ) get_music_cover ;; 90 | "--status" ) get_music_status ;; 91 | "--toggle" ) music_toggle ;; 92 | "--next" ) music_next ;; 93 | "--prev" ) music_prev ;; 94 | "--position" ) get_music_position ;; 95 | "--loop" ) loop_toggle ;; 96 | "--loop_status" ) get_loop_status ;; 97 | esac 98 | 99 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /old_eww/bar/scripts/network.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | get_con_status() { 4 | if [ "$(nmcli g | awk '{print $1}' | grep connected)" == "connected" ]; then 5 | echo "connected" 6 | else 7 | echo "disconnected" 8 | fi 9 | } 10 | 11 | get_ssid() { 12 | ssid=$(nmcli device show | grep GENERAL.CONNECTION | grep -v -E "\slo$") 13 | echo $(echo $ssid | awk 'NR == 1 {print $2}') 14 | } 15 | 16 | toggle() { 17 | conName=$(nmcli con show | grep -v -E "^lo\s" | awk 'NR == 2 {print $1}') 18 | 19 | if [ "$(get_con_status)" == "connected" ]; then 20 | nmcli con down $conName 21 | else 22 | nmcli con up $conName 23 | fi 24 | } 25 | 26 | # Main 27 | if [ "$1" == "--con_status" ]; then 28 | get_con_status 29 | elif [ "$1" == "--ssid" ]; then 30 | get_ssid 31 | elif [ "$1" == "--toggle" ]; then 32 | toggle 33 | fi 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /old_eww/bar/scripts/screenshot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | path="$HOME/Pictures/screenshots" 4 | name=$(date '+screenShot%Y%m%d_%H%M%S.jpg') 5 | 6 | # Take screenshot 7 | case "$1" in 8 | "--select" ) maim -m 10 -s $path/$name ; feh $path/$name ;; 9 | "--full" ) maim -m 10 $path/$name ;; 10 | esac 11 | 12 | 13 | -------------------------------------------------------------------------------- /old_eww/bar/scripts/volume.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ###################################################################### 4 | ## You need to install pamixer 5 | ###################################################################### 6 | 7 | # Main 8 | if [ "$1" == "--level" ]; then 9 | echo "$(pamixer --get-volume)" 10 | fi 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /old_eww/bar/scripts/workspaces.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ###################################################################### 4 | # You need to install wmctrl, xdotool and nerd-font 5 | ###################################################################### 6 | 7 | # Return "occupied" only if currently workspaces was occupied 8 | check_occupied() { 9 | wmctrl -l | awk '{print $2}' | while read -r occupied; do 10 | if [ "$occupied" == "$1" ]; then 11 | echo "occupied" 12 | return 13 | fi 14 | done 15 | } 16 | 17 | # Create yuck code of the currently workspaces status 18 | get_workspaces_yuck() { 19 | buffered="" 20 | status_class="" 21 | 22 | # Before read this section you better execute 'wmctrl -d / -l' 23 | wmctrl -d | awk '{print $1 " " $2 " " $9}' | while read -r number status name; do 24 | 25 | occupied=$(check_occupied $number) 26 | 27 | if [ "$status" == "-" ]; then # "-" mean inactive 28 | status_class="workspace_inactive" 29 | # icon="󰧞" 30 | icon="" 31 | fi 32 | 33 | if [ "$occupied" == "occupied" ]; then 34 | status_class="workspace_occupied" 35 | icon="" 36 | fi 37 | 38 | 39 | if [ "$status" == "*" ]; then # "*" mean active 40 | status_class="workspace_active" 41 | icon="" 42 | fi 43 | 44 | buffered+=$'\n' 45 | # buffered+="(button :class '$status_class' 46 | # :onclick 'wmctrl -s $number' 47 | # '$icon')" 48 | 49 | buffered+="(label :class '$status_class' :text '$icon')" 50 | 51 | if [ "$number" == "$1" ]; then 52 | echo "$buffered" 53 | fi 54 | done 55 | } 56 | 57 | get_activewindow() { 58 | windowName=$(xdotool getwindowfocus getwindowname) 59 | 60 | if [ "$windowName" == "" ]; then 61 | echo "inactive" 62 | else 63 | echo "$windowName" 64 | fi 65 | } 66 | 67 | # Main 68 | if [ "$1" == "--workspaces_yuck" ]; then 69 | ewwStructure="box :spacing 20" 70 | 71 | workspacesNumber=$(wmctrl -d | awk '{print $1}' | tail -c 2) 72 | workspacesStatus=$(get_workspaces_yuck $workspacesNumber) 73 | 74 | echo "($ewwStructure $workspacesStatus)" 75 | 76 | elif [ "$1" == "--activewindow" ]; then 77 | get_activewindow 78 | fi 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /old_eww/minimal-bar/eww.scss: -------------------------------------------------------------------------------- 1 | /** Variables *******************************************************/ 2 | 3 | // // Iceberg 4 | // $fg: #c6c8d1; 5 | // $bg: #161821; 6 | 7 | // $primary: #84a0c6; 8 | // $secondary: #b4be82; 9 | 10 | // // Bubblegum 11 | // $fg: #fadee1; 12 | // $bg: #2a2a2a; 13 | // 14 | // $primary: #fea4b0; 15 | // $secondary: #f282a7; 16 | 17 | // Custom theme 18 | $fg: #c6c8d1; 19 | $bg: #161821; 20 | 21 | $primary: #fea4b0; 22 | // $secondary: #b4be82; 23 | $secondary: #89b8c2; 24 | 25 | /** Global **********************************************************/ 26 | * { 27 | all: unset; 28 | font-family: "Hack"; 29 | } 30 | 31 | /** Windows *********************************************************/ 32 | .window_workspace, 33 | .window_music, 34 | .window_clock, 35 | .window_battery 36 | { 37 | background-color: $bg; 38 | border: 0.15rem solid $secondary; 39 | } 40 | 41 | /** Widgets *********************************************************/ 42 | 43 | // Workspace 44 | .workspace_active { 45 | color: $primary; 46 | font-size: 1.15rem; 47 | font-weight: bold; 48 | } 49 | .workspace_inactive { 50 | color: $fg; 51 | font-size: 1.15rem; 52 | font-weight: bold; 53 | } 54 | .workspace_occupied { 55 | color: $secondary; 56 | font-size: 1.15rem; 57 | font-weight: bold; 58 | } 59 | 60 | // Music 61 | .music_title, 62 | .music_artist 63 | { 64 | color: $fg; 65 | font-size: 0.9rem; 66 | font-weight: bold; 67 | } 68 | 69 | // Battery 70 | .battery_icons { 71 | color: $primary; 72 | font-size: 1.15rem; 73 | } 74 | 75 | // Clock 76 | .clock_time { 77 | color: $fg; 78 | font-size: 1.1rem; 79 | font-weight: bold; 80 | } 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /old_eww/minimal-bar/eww.yuck: -------------------------------------------------------------------------------- 1 | ;; Include 2 | (include "eww_variables.yuck") 3 | (include "eww_windows.yuck") 4 | (include "eww_widgets.yuck") 5 | 6 | 7 | -------------------------------------------------------------------------------- /old_eww/minimal-bar/eww_variables.yuck: -------------------------------------------------------------------------------- 1 | ;; Variables ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2 | 3 | ;; Date 4 | (defpoll TIME :interval "30s" "date +'%H : %M'") 5 | (defpoll DOW :interval "1m" "date +'%a'") ;; Day fo week 6 | (defpoll DAY :interval "1m" "date +'%d'") 7 | 8 | ;; Workspaces 9 | (defpoll WORKSPACES_YUCK :interval "0.5s" 10 | "scripts/workspaces.sh --workspaces_yuck") 11 | 12 | ;; Music 13 | (defpoll MUSIC_TITLE :interval "2s" 14 | "scripts/music.sh --title") 15 | 16 | (defpoll MUSIC_ARTIST :interval "2s" 17 | "scripts/music.sh --artist") 18 | 19 | (defpoll MUSIC_ART :interval "2s" 20 | "scripts/music.sh --art") 21 | 22 | ;; Battery 23 | (defpoll BATTERY_ICONS :interval "30s" 24 | "scripts/battery.sh --icons") 25 | 26 | ;; Volume 27 | (defpoll VOLUME_LEVEL :interval "2s" 28 | "pamixer --get-volume") 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /old_eww/minimal-bar/eww_widgets.yuck: -------------------------------------------------------------------------------- 1 | ;; Widgets ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2 | 3 | ;; Workspace 4 | (defwidget widget_workspace [] 5 | (box :halign "center" :valign "center" 6 | (literal :content WORKSPACES_YUCK) 7 | ) 8 | ) 9 | 10 | ;; Music 11 | (defwidget widget_music [] 12 | (overlay 13 | 14 | ;; Background 15 | (revealer :reveal true :transition "crossfade" 16 | (box :class "music_background-art" 17 | :css " .music_background-art { 18 | background-image: url('${MUSIC_ART}'); 19 | background-repeat: no-repeat; 20 | background-size: cover; 21 | background-position: center; 22 | min-width: 2.5rem; 23 | min-height: 2.5rem; 24 | opacity: 0.5; 25 | transition: 1s ease-in; 26 | } 27 | " 28 | ) 29 | ) 30 | 31 | ;; Foreground 32 | (box :orientation "v" :halign "center" :valign "center" 33 | (label :class "music_title" :limit-width 26 :text "${MUSIC_TITLE}") 34 | (label :class "music_artist" :limit-width 26 :text "${MUSIC_ARTIST}") 35 | ) 36 | ) 37 | ) 38 | 39 | ;; Battery 40 | (defwidget widget_battery [] 41 | (box :halign "center" :valign "center" 42 | (label :class "battery_icons" :text "${BATTERY_ICONS}") 43 | ) 44 | ) 45 | 46 | ;; Clock 47 | (defwidget widget_clock [] 48 | (box :halign "center" :valign "center" 49 | (label :class "clock_time" :halign "start" :text "${TIME}") 50 | ) 51 | ) 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /old_eww/minimal-bar/eww_windows.yuck: -------------------------------------------------------------------------------- 1 | ;; Windows ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2 | 3 | ;; Workspace 4 | (defwindow window_workspace 5 | :monitor 1 6 | :stacking "fg" 7 | :wm-ignore true 8 | :geometry (geometry :x "0%" 9 | :y "0.7%" 10 | :width "19%" 11 | :height "4.5%" 12 | :anchor "top center" 13 | ) 14 | (widget_workspace) 15 | ) 16 | 17 | ;; Music 18 | (defwindow window_music 19 | :monitor 1 20 | :stacking "fg" 21 | :wm-ignore true 22 | :geometry (geometry :x "0.5%" 23 | :y "0.7%" 24 | :width "20%" 25 | :height "4.5%" 26 | :anchor "top left" 27 | ) 28 | (widget_music) 29 | ) 30 | 31 | ;; Battery 32 | (defwindow window_battery 33 | :monitor 1 34 | :stacking "fg" 35 | :wm-ignore true 36 | :geometry (geometry :x "-9%" 37 | :y "0.7%" 38 | :width "15%" 39 | :height "4.5%" 40 | :anchor "top right" 41 | ) 42 | (widget_battery) 43 | ) 44 | 45 | ;; Clock 46 | (defwindow window_clock 47 | :monitor 1 48 | :stacking "fg" 49 | :wm-ignore true 50 | :geometry (geometry :x "-0.5%" 51 | :y "0.7%" 52 | :width "8%" 53 | :height "4.5%" 54 | :anchor "top right" 55 | ) 56 | (widget_clock) 57 | ) 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /old_eww/minimal-bar/launch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ ! -d $HOME/.cache/eww ]; then 4 | mkdir ~/.cache/eww 5 | fi 6 | 7 | ewwPath="$HOME/.config/eww/minimal-bar" 8 | tmpPath="$HOME/.cache/eww/minimal-bar" 9 | 10 | windows=" 11 | window_workspace 12 | window_music 13 | window_battery 14 | window_clock 15 | " 16 | 17 | toggle() { 18 | if [ -f $tmpPath ]; then 19 | rm $tmpPath 20 | eww -c $ewwPath close-all 21 | else 22 | touch $tmpPath 23 | eww -c $ewwPath open-many $windows 24 | fi 25 | } 26 | 27 | # Main 28 | if [ "$1" == "--open-all" ]; then 29 | touch $tmpPath 30 | eww -c $ewwPath open-many $windows 31 | elif [ "$1" == "--toggle" ]; then 32 | toggle 33 | fi 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /old_eww/minimal-bar/scripts/battery.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | get_battery_level() { 4 | echo $(acpi -b | sed -e "s/[A-Za-z:,-.%]\+//g" | awk 'NR == 1 {print $2}') 5 | } 6 | 7 | get_adapter_status() { 8 | echo "$(acpi -b | awk 'NR == 1 {print $3}' | sed -e 's/,//g')" 9 | } 10 | 11 | get_battery_icons() { 12 | battery_level=$(get_battery_level) 13 | battery_level_trunc=$(($battery_level / 10 * 10)) 14 | 15 | if [ "$(get_adapter_status)" == "Charging" ]; then 16 | # Charging 17 | case "$battery_level_trunc" in 18 | "100" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐" 19 | return ;; 20 | "90" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰗶" 21 | return ;; 22 | "80" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰗶 󱢠" 23 | return ;; 24 | "70" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰗶 󱢠 󱢠" 25 | return ;; 26 | "60" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰗶 󱢠 󱢠 󱢠" 27 | return ;; 28 | "50" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰗶 󱢠 󱢠 󱢠 󱢠" 29 | return ;; 30 | "40" ) echo "󰣐 󰣐 󰣐 󰣐 󰗶 󱢠 󱢠 󱢠 󱢠 󱢠" 31 | return ;; 32 | "30" ) echo "󰣐 󰣐 󰣐 󰗶 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠" 33 | return ;; 34 | "20" ) echo "󰣐 󰣐 󰗶 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠" 35 | return ;; 36 | "10" ) echo "󰣐 󰗶 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠" 37 | return ;; 38 | "0" ) echo "󰗶 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠" 39 | return ;; 40 | esac 41 | else 42 | # Discharging 43 | case "$battery_level_trunc" in 44 | "100" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐" 45 | return ;; 46 | "90" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰛞" 47 | return ;; 48 | "80" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰛞 󱢠" 49 | return ;; 50 | "70" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰛞 󱢠 󱢠" 51 | return ;; 52 | "60" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰣐 󰛞 󱢠 󱢠 󱢠" 53 | return ;; 54 | "50" ) echo "󰣐 󰣐 󰣐 󰣐 󰣐 󰛞 󱢠 󱢠 󱢠 󱢠" 55 | return ;; 56 | "40" ) echo "󰣐 󰣐 󰣐 󰣐 󰛞 󱢠 󱢠 󱢠 󱢠 󱢠" 57 | return ;; 58 | "30" ) echo "󰣐 󰣐 󰣐 󰛞 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠" 59 | return ;; 60 | "20" ) echo "󰣐 󰣐 󰛞 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠" 61 | return ;; 62 | "10" ) echo "󰣐 󰛞 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠" 63 | return ;; 64 | "0" ) echo "󰛞 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠 󱢠" 65 | return ;; 66 | esac 67 | fi 68 | } 69 | 70 | # Main 71 | if [ "$1" == "--level" ]; then 72 | get_battery_level 73 | 74 | elif [ "$1" == "--icons" ]; then 75 | get_battery_icons 76 | fi 77 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /old_eww/minimal-bar/scripts/music.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | get_music_title() { 3 | if [ "$(playerctl status)" == "Playing" ]; then 4 | echo $(playerctl metadata --format '{{title}}') 5 | else 6 | echo "offline" 7 | fi 8 | } 9 | 10 | get_music_artist() { 11 | if [ "$(playerctl status)" == "Playing" ]; then 12 | echo $(playerctl metadata --format '{{artist}}') 13 | else 14 | echo "unknown" 15 | fi 16 | } 17 | 18 | get_music_art() { 19 | playerStatus=$(playerctl -l) 20 | 21 | # Spotify founded 22 | if [ "$playerStatus" == "spotify" ]; then 23 | echo $(playerctl metadata | grep artUrl | awk '{print $3}') 24 | return 25 | 26 | # Firefox founded 27 | elif [ "${playerStatus:0:7}" == "firefox" ]; then 28 | path="$HOME/.mozilla/firefox/firefox-mpris/" 29 | image="$(ls $path)" 30 | 31 | echo "$path$image" 32 | return 33 | fi 34 | } 35 | 36 | # Main 37 | case "$1" in 38 | "--title" ) get_music_title ;; 39 | "--artist" ) get_music_artist ;; 40 | "--art" ) get_music_art ;; 41 | esac 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /old_eww/minimal-bar/scripts/workspaces.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ###################################################################### 4 | # You need to install wmctrl xdotool and nerd-font 5 | ###################################################################### 6 | 7 | # Return "occupied" only if currently workspaces was occupied 8 | check_occupied() { 9 | wmctrl -l | awk '{print $2}' | while read -r occupied; do 10 | if [ "$occupied" == "$1" ]; then 11 | echo "occupied" 12 | return 13 | fi 14 | done 15 | } 16 | 17 | # Create yuck code of the currently workspaces status 18 | get_workspaces_yuck() { 19 | buffered="" 20 | status_class="" 21 | 22 | # Before read this section you better execute 'wmctrl -d / -l' 23 | wmctrl -d | awk '{print $1 " " $2 " " $9}' | while read -r number status name; do 24 | 25 | occupied=$(check_occupied $number) 26 | 27 | if [ "$status" == "-" ]; then # "-" mean inactive 28 | status_class="workspace_inactive" 29 | icon="" 30 | fi 31 | 32 | if [ "$occupied" == "occupied" ]; then 33 | status_class="workspace_occupied" 34 | icon="" 35 | fi 36 | 37 | 38 | if [ "$status" == "*" ]; then # "*" mean active 39 | status_class="workspace_active" 40 | icon="" 41 | fi 42 | 43 | buffered+=$'\n' 44 | # buffered+="(button :class '$status_class' 45 | # :onclick 'wmctrl -s $number' 46 | # '$icon')" 47 | 48 | buffered+="(label :class '$status_class' 49 | :text '$name')" 50 | 51 | if [ "$number" == "$1" ]; then 52 | echo "$buffered" 53 | fi 54 | done 55 | } 56 | 57 | get_activewindow() { 58 | windowName=$(xdotool getwindowfocus getwindowname) 59 | 60 | if [ "$windowName" == "" ]; then 61 | echo "inactive" 62 | else 63 | echo "$windowName" 64 | fi 65 | } 66 | 67 | # Main 68 | if [ "$1" == "--workspaces_yuck" ]; then 69 | ewwStructure="box :spacing 20" 70 | 71 | workspacesNumber=$(wmctrl -d | awk '{print $1}' | tail -c 2) 72 | workspacesStatus=$(get_workspaces_yuck $workspacesNumber) 73 | 74 | echo "($ewwStructure $workspacesStatus)" 75 | 76 | elif [ "$1" == "--activewindow" ]; then 77 | get_activewindow 78 | fi 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /old_eww/popup/eww.scss: -------------------------------------------------------------------------------- 1 | /** Variables *******************************************************/ 2 | 3 | // Colors 4 | $fg: #c6c8d1; 5 | $bg: #161821; 6 | $bg-alt: #545454; 7 | 8 | $primary: $fg; 9 | $secondary: $fg; 10 | 11 | /** Global **********************************************************/ 12 | * { 13 | all: unset; 14 | font-family: "JetBrainsMono"; 15 | } 16 | 17 | /** Windows *********************************************************/ 18 | .window_gnome_widget, 19 | .window_music, 20 | .window_powermenu, 21 | .window_ssmenu 22 | { 23 | background-color: $bg; 24 | border: 0.15rem solid $secondary; 25 | } 26 | 27 | /** Widgets *********************************************************/ 28 | // Clock 29 | .clock_time { 30 | color: $fg; 31 | font-size: 3.5rem; 32 | font-weight: bold; 33 | } 34 | .clock_dow, 35 | .clock_date 36 | { 37 | color: $bg-alt; 38 | font-size: 0.95rem; 39 | font-weight: bold; 40 | } 41 | 42 | // Profile 43 | .profile { 44 | border: 0.15rem solid $bg-alt; 45 | border-radius: 1rem; 46 | padding: 0.5rem; 47 | } 48 | .profile_name { 49 | color: $fg; 50 | font-size: 1.37rem; 51 | font-weight: bold; 52 | } 53 | 54 | // Systeminfo 55 | .battery_label, 56 | .battery_level, 57 | .bright_label, 58 | .bright_level, 59 | .volume_label, 60 | .volume_level, 61 | .lan_label, 62 | .bluetooth_label 63 | { 64 | color: $bg-alt; 65 | font-size: 0.95rem; 66 | font-weight: bold; 67 | } 68 | 69 | .battery_icon, 70 | .bright_icon, 71 | .volume_icon 72 | { 73 | color: $fg; 74 | } 75 | 76 | .lan_ssid, 77 | .bluetooth_devicename 78 | { 79 | color: $fg; 80 | font-size: 1.1rem; 81 | font-weight: bold; 82 | } 83 | 84 | // Buttons 85 | .sys_button_square { 86 | background-color: $bg-alt; 87 | border-radius: 0.5rem; 88 | } 89 | 90 | .sys_button_rect { 91 | border: 0.15rem solid $bg-alt; 92 | border-radius: 0.5rem; 93 | } 94 | 95 | // Bar 96 | .sys_bar scale trough { 97 | all: unset; 98 | background-color: $bg-alt; 99 | min-width: 16rem; 100 | min-height: 0.5rem; 101 | } 102 | .sys_bar scale trough highlight { 103 | all: unset; 104 | background-color: $primary; 105 | } 106 | 107 | // Music 108 | .music_prev_icon, 109 | .music_toggle_icon, 110 | .music_next_icon, 111 | .shutdown_icon, 112 | .suspend_icon, 113 | .logout_icon, 114 | .reboot_icon, 115 | .ss_full_icon, 116 | .ss_select_icon 117 | { 118 | color: $fg; 119 | font-size: 1.5rem; 120 | } 121 | .music_title, 122 | .music_artist 123 | { 124 | color: $fg; 125 | font-weight: bold; 126 | } 127 | 128 | -------------------------------------------------------------------------------- /old_eww/popup/eww.yuck: -------------------------------------------------------------------------------- 1 | ;; Include 2 | (include "eww_variables.yuck") 3 | (include "eww_windows.yuck") 4 | (include "modules/gnome_widget.yuck") 5 | (include "modules/music.yuck") 6 | (include "modules/powermenu.yuck") 7 | (include "modules/ssmenu.yuck") 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /old_eww/popup/eww_windows.yuck: -------------------------------------------------------------------------------- 1 | ;; Windows ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2 | 3 | ;; Gnome widget 4 | (defwindow window_gnome_widget 5 | :monitor 0 6 | :stacking "bg" 7 | :wm-ignore true 8 | :geometry (geometry :x "2%" 9 | :y "7%" 10 | :width "17%" 11 | :height "60%" 12 | :anchor "top left" 13 | ) 14 | (widget_gnome_widget) 15 | ) 16 | 17 | ;; Music 18 | (defwindow window_music 19 | :monitor 0 20 | :stacking "bg" 21 | :wm-ignore true 22 | :geometry (geometry :x "34.5%" 23 | :y "7%" 24 | :width "19.5%" 25 | :height "35%" 26 | :anchor "top left" 27 | ) 28 | (widget_music) 29 | ) 30 | 31 | ;; Power menu 32 | (defwindow window_powermenu 33 | :monitor 0 34 | :stacking "bg" 35 | :wm-ignore true 36 | :geometry (geometry :x "-0.5%" 37 | :y "-1%" 38 | :width "11.5%" 39 | :height "5.5%" 40 | :anchor "bottom right" 41 | ) 42 | (widget_powermenu) 43 | ) 44 | 45 | ;; Screenshot menu 46 | (defwindow window_ssmenu 47 | :monitor 0 48 | :stacking "bg" 49 | :wm-ignore true 50 | :geometry (geometry :x "0.5%" 51 | :y "-1%" 52 | :width "6.5%" 53 | :height "5.5%" 54 | :anchor "bottom left" 55 | ) 56 | (widget_ssmenu) 57 | ) 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /old_eww/popup/launch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ewwPath="$HOME/.config/eww/popup" 4 | tmpPath="$HOME/.cache/eww/popup" 5 | 6 | if [ ! -d $HOME/.cache/eww ]; then 7 | mkdir ~/.cache/eww 8 | fi 9 | 10 | if [ ! -d $tmpPath ]; then 11 | mkdir $tmpPath; 12 | fi 13 | 14 | toggle() { 15 | if [ -f $tmpPath/"$1" ]; then 16 | rm $tmpPath/"$1" 17 | eww -c $ewwPath close $1 18 | else 19 | touch $tmpPath/"$1" 20 | eww -c $ewwPath open $1 21 | fi 22 | } 23 | 24 | # Main 25 | if [ "$1" == "--toggle_gnome_widget" ]; then 26 | toggle window_gnome_widget 27 | elif [ "$1" == "--toggle_music" ]; then 28 | toggle window_music 29 | elif [ "$1" == "--toggle_powermenu" ]; then 30 | toggle window_powermenu 31 | elif [ "$1" == "--toggle_ssmenu" ]; then 32 | toggle window_ssmenu 33 | fi 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /old_eww/popup/modules/gnome_widget.yuck: -------------------------------------------------------------------------------- 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2 | ;; Q. How to adding a hover animation ? 3 | ;; A. EVENTBOX -> OVERLAY -> REVEALER + MODULE 4 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 5 | 6 | ;; Widgets ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 7 | (defwidget widget_gnome_widget [] 8 | (box :orientation "v" :valign "center" :halign "center" :space-evenly false :spacing 15 9 | 10 | ;; Clock 11 | (box :orientation "v" :halign "center" :valign "center" :space-evenly false 12 | :width 280 :height 80 :spacing 20 13 | 14 | (label :class "clock_time" :text "${TIME}") 15 | 16 | (box :orientation "v" :halign "left" :space-evenly false 17 | (box 18 | (box :class "clock_dow" :halign "start" (label :text "${DOW}")) 19 | (box :class "clock_date" :halign "end" (label :text "${DAY}, ${MONTH}")) 20 | ) 21 | ) 22 | ) 23 | 24 | ;; Profile 25 | (box :class "profile" :orientation "v" :halign "center" :valign "center" 26 | :space-evenly false :width 280 :height 165 :spacing 20 27 | 28 | ;; Face 29 | (box :halign "center" :valign "center" 30 | :style " background-image: url('${FACE}'); 31 | background-repeat: no-repeat; 32 | background-size: cover; 33 | background-position: center center; 34 | min-width: 7.4rem; 35 | min-height: 7.4rem; 36 | 37 | border-radius: 7.4rem; 38 | " 39 | ) 40 | 41 | ;; Name 42 | (label :class "profile_name" :text "${NAME}") 43 | ) 44 | 45 | ;; Battery 46 | (box :orientation "v" :halign "left" :space-evenly false 47 | 48 | ;; Top stuff 49 | (box 50 | (box :class "battery_label" :halign "start" (label :text "battery")) 51 | (box :class "battery_level" :halign "end" (label :text "${BATTERY_LEVEL}%")) 52 | ) 53 | 54 | ;; Bottom stuff 55 | (box :halign "center" :space-evenly false :spacing 30 56 | (label :class "battery_icon" :text "") 57 | (box :class "sys_bar" 58 | (scale :value BATTERY_LEVEL :min 0 :max 100 :active false) 59 | ) 60 | ) 61 | ) 62 | 63 | ;; Brightness 64 | (box :orientation "v" :halign "left" :space-evenly false 65 | 66 | ;; Top stuff 67 | (box 68 | (box :class "bright_label" :halign "start" (label :text "brightness")) 69 | (box :class "bright_level" :halign "end" (label :text "${BRIGHT_LEVEL}%")) 70 | ) 71 | 72 | ;; Bottom stuff 73 | (box :halign "center" :space-evenly false :spacing 30 74 | (label :class "bright_icon":text "") 75 | (box :class "sys_bar" 76 | (scale :value BRIGHT_LEVEL :min 0 :max 100 :active false) 77 | ) 78 | ) 79 | ) 80 | 81 | ;; Volume 82 | (box :orientation "v" :halign "left" :space-evenly false 83 | 84 | ;; Top stuff 85 | (box 86 | (box :class "volume_label" :halign "start" (label :text "volume")) 87 | (box :class "volume_level" :halign "end" (label :text "${VOLUME_LEVEL}%")) 88 | ) 89 | 90 | ;; Bottom stuff 91 | (box :halign "center" :space-evenly false :spacing 30 92 | (label :class "volume_icon" :text "") 93 | (box :class "sys_bar" 94 | (scale :value VOLUME_LEVEL :min 0 :max 100 :active false) 95 | ) 96 | ) 97 | ) 98 | 99 | ;; Lan 100 | (box :orientation "v" :space-evenly false 101 | 102 | ;; Top stuff 103 | (box :class "lan_label" :halign "start" :space-evenly false 104 | (label :text "Network") 105 | ) 106 | 107 | ;; Lan button 108 | (eventbox :class "sys_button_rect" :width 280 :height 40 109 | :onclick "scripts/network.sh --toggle &" 110 | 111 | (overlay 112 | (revealer :reveal {"${LAN_CON_STATUS}" == "connected" ? true : false} 113 | :transition "crossfade" 114 | (box :style " background-color: ${COLOR_BG_ALT}; 115 | border-radius: 0.5rem; 116 | " 117 | ) 118 | ) 119 | 120 | (label :class "lan_ssid" :text "${LAN_SSID}") 121 | ) 122 | ) 123 | ) 124 | 125 | ;; Bluetooth 126 | (box :orientation "v" :space-evenly false 127 | 128 | ;; Top stuff 129 | (box :class "bluetooth_label" :halign "start" :space-evenly false 130 | (label :text "Bluetooth") 131 | ) 132 | 133 | ;; Bluetooth button 134 | (eventbox :class "sys_button_rect" :width 280 :height 40 135 | :onclick "scripts/bluetooth.sh --toggle" 136 | 137 | (overlay 138 | (revealer :reveal {"${BLUETOOTH_CON_STATUS}" == "connected" ? true : false} 139 | :transition "crossfade" 140 | (box :style " background-color: ${COLOR_BG_ALT}; 141 | border-radius: 0.5rem; 142 | " 143 | ) 144 | ) 145 | 146 | (label :class "bluetooth_devicename" :text "${BLUETOOTH_DEVICENAME}") 147 | ) 148 | ) 149 | ) 150 | ) 151 | ) 152 | 153 | 154 | 155 | 156 | 157 | -------------------------------------------------------------------------------- /old_eww/popup/modules/music.yuck: -------------------------------------------------------------------------------- 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2 | ;; Q. How to adding a hover animation ? 3 | ;; A. EVENTBOX -> OVERLAY -> REVEALER + MODULE 4 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 5 | 6 | ;; Widget ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 7 | (defwidget widget_music [] 8 | (eventbox ; :onhoverlost "$HOME/.config/eww/popup/launch.sh --toggle_music" 9 | (box :orientation "v" :halign "center" :valign "center" :space-evenly false :spacing 20 10 | 11 | ;; Top box 12 | (overlay :width 330 :height 220 13 | 14 | ;; Background 15 | (revealer :reveal "${MUSIC_PLAYING}" 16 | (box :class "music_reveal_cover" 17 | :css " .music_reveal_cover { 18 | background-image: url('${MUSIC_ART}'); 19 | background-repeat: no-repeat; 20 | background-size: cover; 21 | background-position: center center; 22 | 23 | border-radius: 1rem; 24 | opacity: 0.25; 25 | } 26 | " 27 | ) 28 | ) 29 | 30 | ;; Foreground 31 | (box :orientation "v" :halign "center" :valign "center" :space-evenly false :spacing 10 32 | (overlay 33 | 34 | ;; Default music Cover 35 | (box :class "music_art_default" 36 | :halign "center" :valign "center" :space-evenly false 37 | :css " .music_art_default { 38 | background-image: url('${MUSIC_ART_DEFAULT}'); 39 | background-repeat: no-repeat; 40 | background-size: cover; 41 | background-position: center center; 42 | min-width: 12rem; 43 | min-height: 12rem; 44 | 45 | border-radius: 1rem; 46 | } 47 | " 48 | ) 49 | 50 | ;; Music Cover 51 | (revealer :reveal "${MUSIC_PLAYING}" :transition "crossfade" 52 | (box :class "music_art" 53 | :halign "center" :valign "center" :space-evenly false 54 | :css " .music_art { 55 | background-image: url('${MUSIC_ART}'); 56 | background-repeat: no-repeat; 57 | background-size: cover; 58 | background-position: center center; 59 | min-width: 12rem; 60 | min-height: 12rem; 61 | 62 | border-radius: 1rem; 63 | box-shadow: 0rem 0rem 0.37rem 0.13rem ${COLOR_FG}; 64 | } 65 | " 66 | ) 67 | ) 68 | ) 69 | ) 70 | 71 | ;; Dummy box 72 | (box :style " border: 0.15rem solid ${COLOR_BG_ALT}; 73 | border-radius: 1rem; 74 | " 75 | ) 76 | ) 77 | 78 | ;; control buttons 79 | (box :orientation "h" :halign "center" :valign "center" :space-venly false :spacing 10 80 | 81 | ;; Previous button 82 | (eventbox :class "sys_button_square" :width 40 :height 40 83 | :onclick "scripts/music.sh --prev" 84 | (label :class "music_prev_icon" :text "󰒮") 85 | ) 86 | 87 | ;; Button that toggle play and pause 88 | (eventbox :class "sys_button_square" :width 40 :height 40 89 | :onclick "scripts/music.sh --toggle" 90 | (box :class "music_toggle_icon" {MUSIC_PLAYING == "true" ? "󰏤" : "󰐊"}) 91 | ) 92 | 93 | ;; Next button 94 | (eventbox :class "sys_button_square" :width 40 :height 40 95 | :onclick "scripts/music.sh --next" 96 | (label :class "music_next_icon" :text "󰒭") 97 | ) 98 | ) 99 | 100 | ;; Bottom box 101 | (box :orientation "v" :halign "center" :valign "center" :space-evenly false 102 | :width 330 :height 55 103 | 104 | ;; Title and artist 105 | (box :orientation "v" :valign "start" :height 40 106 | (label :class "music_title" :limit-width 22 :text "${MUSIC_TITLE}") 107 | (label :class "music_artist" :limit-width 22 :text "${MUSIC_ARTIST}") 108 | ) 109 | ) 110 | ) 111 | ) 112 | ) 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | -------------------------------------------------------------------------------- /old_eww/popup/modules/powermenu.yuck: -------------------------------------------------------------------------------- 1 | ;; Widget ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2 | (defwidget widget_powermenu [] 3 | (box :orientation "h" :halign "center" :valign "center" :space-evenly false 4 | :spacing 10 5 | 6 | ;; Shutdown button 7 | (eventbox :class "sys_button_square" 8 | :width 40 :height 40 9 | :onclick "$(systemctl poweroff)" 10 | (label :class "shutdown_icon" :text "󰐥") 11 | ) 12 | 13 | ;; Suspend button 14 | (eventbox :class "sys_button_square" 15 | :width 40 :height 40 16 | :onclick "systemctl suspend" 17 | (label :class "suspend_icon" :text "󰤄") 18 | ) 19 | 20 | ;; Logout button 21 | (eventbox :class "sys_button_square" 22 | :width 40 :height 40 23 | :onclick "$(sleep 1s; kill -9 -1)" 24 | (label :class "logout_icon" :text "󰗼") 25 | ) 26 | 27 | ;; Reboot button 28 | (eventbox :class "sys_button_square" 29 | :width 40 :height 40 30 | :onclick "$(systemctl reboot)" 31 | (label :class "reboot_icon" :text "󰑙") 32 | ) 33 | ) 34 | ) 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /old_eww/popup/modules/ssmenu.yuck: -------------------------------------------------------------------------------- 1 | ;; Widget ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2 | (defwidget widget_ssmenu [] 3 | (box :halign "center" :valign "center" :space-evenly false :spacing 10 4 | 5 | ;; Screenshot full 6 | (eventbox :class "sys_button_square" 7 | :width 40 :height 40 8 | :onclick "scripts/screenshot.sh --full" 9 | (label :class "ss_full_icon" :text "󰘖") 10 | ) 11 | 12 | ;; Screenshot select 13 | (eventbox :class "sys_button_square" 14 | :width 40 :height 40 15 | :onclick "scripts/screenshot.sh --select" 16 | (label :class "ss_select_icon" :text "󰘕") 17 | ) 18 | ) 19 | ) 20 | -------------------------------------------------------------------------------- /scripts/rand_wall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ###################################################################### 4 | ## You need to install feh 5 | ###################################################################### 6 | 7 | mkdir -p $HOME/Pictures 8 | mkdir -p $HOME/Pictures/wallpapers 9 | 10 | walls_array=$(ls -1 $HOME/Pictures/wallpapers/*) 11 | 12 | if [ "$walls_array" != "" ]; then 13 | index=$(( (`echo $RANDOM`) % (`echo $walls_array | tr -dc ' ' | wc -c` + 1) + 1 )) 14 | path=$(echo $walls_array | cut -d " " -f $index) 15 | 16 | feh --bg-fill $path 17 | fi 18 | 19 | -------------------------------------------------------------------------------- /scripts/ss.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ###################################################################### 4 | ## You need to install maim 5 | ###################################################################### 6 | 7 | path="$HOME/Pictures/screenshots" 8 | 9 | mkdir -p $HOME/Pictures 10 | mkdir -p $path 11 | 12 | name=$(date "+%Y%m%d_%H%M%S.png") 13 | 14 | case "$1" in 15 | "-s" ) maim -m 10 -s $path/$name; feh $path/$name ;; 16 | "-f" ) maim -m 10 $path/$name ;; 17 | esac 18 | 19 | 20 | -------------------------------------------------------------------------------- /vimrc: -------------------------------------------------------------------------------- 1 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 2 | "" vim plug install command 3 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 4 | 5 | " -------------------------------------------------------------------- 6 | " curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ 7 | " https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim 8 | " -------------------------------------------------------------------- 9 | 10 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 11 | "" plugins 12 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 13 | call plug#begin() 14 | 15 | "" directory tree 16 | Plug 'scrooloose/nerdtree' 17 | 18 | "" eww extensions 19 | " Plug 'elkowar/yuck.vim' 20 | 21 | "" color schemes 22 | Plug 'cocopon/iceberg.vim' 23 | 24 | call plug#end() 25 | 26 | set background=dark 27 | colorscheme iceberg 28 | 29 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 30 | "" variables 31 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 32 | let g:NERDTreeShowHidden = 1 33 | let g:NERDTreeMinimalUI = 0 34 | let g:NERDTreeIgnore = [] 35 | let g:NERDTreeStatusline = '' 36 | 37 | 38 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 39 | "" options 40 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 41 | set encoding=UTF-8 42 | 43 | "" settings 44 | set nobackup 45 | set noswapfile 46 | set autoread 47 | set hidden 48 | 49 | "" appearance 50 | set number "" show number of the line 51 | set cursorline "" show horizontal highlighting 52 | set cursorcolumn "" show vertical highlighting 53 | set nowrap 54 | set virtualedit=onemore 55 | set smartindent 56 | set smarttab 57 | set expandtab "" use spaces as a tab 58 | set shiftwidth=4 "" 4 tab 59 | set tabstop=4 60 | set laststatus=2 61 | set wrapscan 62 | set clipboard=unnamed 63 | 64 | syntax on 65 | 66 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 67 | "" autosatrt commands 68 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 69 | 70 | "" exec a nerdtree only if enterd without filepath 71 | autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif 72 | 73 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 74 | "" keybinds 75 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 76 | 77 | "" disble arrow keys 78 | noremap 79 | noremap 80 | noremap 81 | noremap 82 | 83 | "" auto input the matched brackets 84 | imap [ [] 85 | imap ( () 86 | imap { {} 87 | 88 | --------------------------------------------------------------------------------