From c2497f81529ac3fbed69bf2425468ffe135b947c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?tr=C3=A9meur?= Date: Sat, 7 Dec 2019 16:09:00 +0000 Subject: [PATCH] Add tint2rc + script for basing border colours on pywal --- dots/{.conkyrc => conkytemplate} | 20 ++-- dots/tint2rctemplate | 196 +++++++++++++++++++++++++++++++ scripts/bordergen.sh | 18 +++ scripts/dotset.sh | 3 +- 4 files changed, 224 insertions(+), 13 deletions(-) rename dots/{.conkyrc => conkytemplate} (86%) create mode 100644 dots/tint2rctemplate create mode 100755 scripts/bordergen.sh diff --git a/dots/.conkyrc b/dots/conkytemplate similarity index 86% rename from dots/.conkyrc rename to dots/conkytemplate index 5e2b069..fb9db0a 100644 --- a/dots/.conkyrc +++ b/dots/conkytemplate @@ -28,12 +28,10 @@ along with this program. If not, see . conky.config = { alignment = 'top_left', background = false, - border_width = 1, + border_width = 7, cpu_avg_samples = 2, - default_color = 'black', - default_outline_color = 'grey', - default_shade_color = 'grey', - draw_borders = false, + default_color = 'COLOURTEMPLATE', + draw_borders = true, draw_graph_borders = true, draw_outline = false, draw_shades = false, @@ -52,20 +50,20 @@ conky.config = { own_window_class = 'Conky', own_window_type = 'desktop', own_window_transparent = false, - own_window_argb_visual = true, - own_window_argb_value = 100, - own_window_colour = '87875f', + own_window_argb_visual = false, + own_window_colour = 'white', stippled_borders = 0, update_interval = 1.0, uppercase = false, use_spacer = 'none', show_graph_scale = false, show_graph_range = false, - use_xft = true + use_xft = true, + color1 = 'black', } conky.text = [[ -Sync +${color1}Sync ${exec command insync get_sync_progress} $hr Calendar @@ -76,5 +74,5 @@ ${exec command ~/go/bin/todoist sync && ~/go/bin/todoist list --filter '(overdue $hr Music ${exec command ~/.linux/scripts/nowplaying.sh} -${execbar command ~/.linux/scripts/cmus-conky/cmus-conky-timebar.sh} +${execbar command ~/.linux/scripts/cmus-conky-timebar.sh} ]] diff --git a/dots/tint2rctemplate b/dots/tint2rctemplate new file mode 100644 index 0000000..05ff17c --- /dev/null +++ b/dots/tint2rctemplate @@ -0,0 +1,196 @@ +#---- Generated by tint2conf c6cf ---- +# See https://gitlab.com/o9000/tint2/wikis/Configure for +# full documentation of the configuration options. +#------------------------------------- +# Gradients +#------------------------------------- +# Backgrounds +# Background 1: Systray +rounded = 5 +border_width = 3 +border_sides = TBLR +border_content_tint_weight = 0 +background_content_tint_weight = 0 +background_color = #000000 100 +border_color = #000000 100 +background_color_hover = #000000 100 +border_color_hover = #000000 100 +background_color_pressed = #000000 100 +border_color_pressed = #000000 100 + +# Background 2: Clock +rounded = 0 +border_width = 3 +border_sides = TBLR +border_content_tint_weight = 0 +background_content_tint_weight = 0 +background_color = #ffffff 100 +border_color = #ffffff 100 +background_color_hover = #ffffff 100 +border_color_hover = #ffffff 100 +background_color_pressed = #ffffff 100 +border_color_pressed = #ffffff 100 + +# Background 3: Panel, Tooltip +rounded = 0 +border_width = 5 +border_sides = TBLR +border_content_tint_weight = 0 +background_content_tint_weight = 0 +background_color = #ffffff 100 +border_color = TEMPLATE 100 +background_color_hover = #ffffff 100 +border_color_hover = TEMPLATE 100 +background_color_pressed = #ffffff 100 +border_color_pressed = TEMPLATE 100 + +#------------------------------------- +# Panel +panel_items = FSC +panel_size = 100% 50 +panel_margin = 5 5 +panel_padding = 4 2 2 +panel_background_id = 3 +wm_menu = 1 +panel_dock = 0 +panel_position = bottom right horizontal +panel_layer = bottom +panel_monitor = all +panel_shrink = 1 +autohide = 0 +autohide_show_timeout = 0 +autohide_hide_timeout = 0.5 +autohide_height = 2 +strut_policy = follow_size +panel_window_name = tint2 +disable_transparency = 0 +mouse_effects = 1 +font_shadow = 0 +mouse_hover_icon_asb = 100 0 10 +mouse_pressed_icon_asb = 100 0 0 +scale_relative_to_dpi = 0 +scale_relative_to_screen_height = 0 + +#------------------------------------- +# Taskbar +taskbar_mode = single_desktop +taskbar_hide_if_empty = 0 +taskbar_padding = 0 0 2 +taskbar_background_id = 0 +taskbar_active_background_id = 0 +taskbar_name = 1 +taskbar_hide_inactive_tasks = 0 +taskbar_hide_different_monitor = 0 +taskbar_hide_different_desktop = 0 +taskbar_always_show_all_desktop_tasks = 0 +taskbar_name_padding = 6 3 +taskbar_name_background_id = 0 +taskbar_name_active_background_id = 0 +taskbar_name_font = sans bold 9 +taskbar_name_font_color = #dddddd 100 +taskbar_name_active_font_color = #dddddd 100 +taskbar_distribute_size = 1 +taskbar_sort_order = none +task_align = left + +#------------------------------------- +# Task +task_text = 1 +task_icon = 1 +task_centered = 1 +urgent_nb_of_blink = 100000 +task_maximum_size = 140 35 +task_padding = 4 3 4 +task_font = sans 8 +task_tooltip = 1 +task_thumbnail = 0 +task_thumbnail_size = 210 +task_font_color = #eeeeee 100 +task_icon_asb = 100 0 0 +task_background_id = 0 +task_active_background_id = 0 +task_urgent_background_id = 0 +task_iconified_background_id = 0 +mouse_left = toggle_iconify +mouse_middle = none +mouse_right = close +mouse_scroll_up = prev_task +mouse_scroll_down = next_task + +#------------------------------------- +# System tray (notification area) +systray_padding = 0 0 5 +systray_background_id = 1 +systray_sort = ascending +systray_icon_size = 25 +systray_icon_asb = 100 0 0 +systray_monitor = 1 +systray_name_filter = + +#------------------------------------- +# Launcher +launcher_padding = 0 0 2 +launcher_background_id = 0 +launcher_icon_background_id = 0 +launcher_icon_size = 22 +launcher_icon_asb = 100 0 0 +launcher_icon_theme_override = 0 +startup_notifications = 1 +launcher_tooltip = 1 +launcher_item_app = tint2conf.desktop +launcher_item_app = firefox.desktop +launcher_item_app = iceweasel.desktop +launcher_item_app = chromium-browser.desktop +launcher_item_app = google-chrome.desktop +launcher_item_app = x-terminal-emulator.desktop + +#------------------------------------- +# Clock +time1_format = %H:%M +time2_format = %-d/%-m/%y +time1_font = InconsolataLGC Nerd Font Mono Bold 10 +time1_timezone = +time2_timezone = +time2_font = InconsolataLGC Nerd Font Mono Medium 8 +clock_font_color = #000000 100 +clock_padding = 3 3 +clock_background_id = 2 +clock_tooltip = %H:%M:%S, %-d %B %Y +clock_tooltip_timezone = +clock_lclick_command = +clock_rclick_command = +clock_mclick_command = +clock_uwheel_command = +clock_dwheel_command = + +#------------------------------------- +# Battery +battery_tooltip = 1 +battery_low_status = 10 +battery_low_cmd = notify-send "battery low" +battery_full_cmd = +bat1_font = sans 8 +bat2_font = sans 6 +battery_font_color = #eeeeee 100 +bat1_format = +bat2_format = +battery_padding = 1 0 +battery_background_id = 0 +battery_hide = 101 +battery_lclick_command = +battery_rclick_command = +battery_mclick_command = +battery_uwheel_command = +battery_dwheel_command = +ac_connected_cmd = +ac_disconnected_cmd = + +#------------------------------------- +# Tooltip +tooltip_show_timeout = 0.5 +tooltip_hide_timeout = 0.1 +tooltip_padding = 2 2 +tooltip_background_id = 3 +tooltip_font_color = #000000 100 +tooltip_font = InconsolataLGC Nerd Font Mono Medium 8 + diff --git a/scripts/bordergen.sh b/scripts/bordergen.sh new file mode 100755 index 0000000..1c64f8b --- /dev/null +++ b/scripts/bordergen.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# Get the variable +csub=$(sed '2!d' ~/.cache/wal/colors) + +# Create new tint2rc +mkdir -p ~/.config/tint2 +cp ~/.linux/dots/tint2rctemplate ~/.config/tint2/plac +sed -i "s/TEMPLATE/${csub}/g" ~/.config/tint2/plac +rm ~/.config/tint2/tint2rc +mv ~/.config/tint2/plac ~/.config/tint2/tint2rc +killall -SIGUSR1 tint2 + +# Create new .conkyrc +cp ~/.linux/dots/conkytemplate ~/conkyplac +sed -i "s/COLOURTEMPLATE/${csub}/g" ~/conkyplac +rm ~/.conkyrc +mv ~/conkyplac ~/.conkyrc diff --git a/scripts/dotset.sh b/scripts/dotset.sh index 9e22b81..6206b68 100755 --- a/scripts/dotset.sh +++ b/scripts/dotset.sh @@ -6,7 +6,7 @@ mv ~/mdddots ~/.linux # Get rid of existing files -rm ~/.zshrc ~/.gitconfig ~/.XCompose ~/.conkyrc +rm ~/.zshrc ~/.gitconfig ~/.XCompose rm ~/.config/cmus/rc rm ~/.oh-my-zsh/custom/aliases @@ -15,5 +15,4 @@ ln -s ~/.linux/dots/.zshrc ~ ln -s ~/.linux/dots/aliases ~/.oh-my-zsh/custom ln -s ~/.linux/dots/.gitconfig ~ ln -s ~/.linux/dots/.XCompose ~ -ln -s ~/.linux/dots/.conkyrc ~ ln -s ~/.linux/dots/cmus/rc ~/.config/cmus