From 63a6e45a41032d1a25ca6638f393d838dccb9448 Mon Sep 17 00:00:00 2001 From: speediegq Date: Sat, 22 Oct 2022 18:50:08 +0200 Subject: [PATCH] new defaults, signal change, add toggleicon func --- docs/example.Xresources | 8 ++++---- docs/example.signal | 3 ++- keybinds.h | 1 + options.h | 9 ++++----- signal.h | 3 ++- speedwm.c | 8 ++++++++ 6 files changed, 21 insertions(+), 11 deletions(-) diff --git a/docs/example.Xresources b/docs/example.Xresources index fb1879d..33cd83f 100644 --- a/docs/example.Xresources +++ b/docs/example.Xresources @@ -20,14 +20,14 @@ - speedwm.bar.hide: 0 !! Hide the bar by default (0/1) - speedwm.bar.hide.tags: 0 !! Hide the tags (0/1) - speedwm.bar.hide.emptytags: 1 !! Hide the tags that have no windows open (0/1) - - speedwm.bar.hide.powerline: 1 !! Hide the powerline drawn over the tags (0/1) + - speedwm.bar.hide.powerline: 0 !! Hide the powerline drawn over the tags (0/1) - speedwm.bar.hide.floating: 0 !! Hide the floating window indicator (0/1) - speedwm.bar.hide.layout: 0 !! Hide the layout indicator (0/1) - speedwm.bar.hide.sticky: 0 !! Hide the sticky indicator (0/1) - speedwm.bar.hide.status: 0 !! Hide the status bar (0/1) - speedwm.bar.hide.systray: 1 !! Hide the systray (0/1) - speedwm.bar.hide.title: 0 !! Hide the window title (0/1) - - speedwm.bar.hide.unseltitle: 0 !! Hide the unselected window title (0/1) + - speedwm.bar.hide.unseltitle: 1 !! Hide the unselected window title (0/1) - speedwm.bar.hide.icon: 0 !! Hide the window icon (0/1) !! Layout indicator options @@ -112,8 +112,8 @@ !! Color toggles - speedwm.color.hiddentitle: 1 !! Color the hidden title (0/1) - - speedwm.color.layout: 1 !! Color the layout indicator (0/1) - - speedwm.color.selectedtitle: 1 !! Color the selected title (0/1) + - speedwm.color.layout: 0 !! Color the layout indicator (0/1) + - speedwm.color.selectedtitle: 0 !! Color the selected title (0/1) !! Cursor options diff --git a/docs/example.signal b/docs/example.signal index 98098ed..3d04aaa 100644 --- a/docs/example.signal +++ b/docs/example.signal @@ -74,5 +74,6 @@ - 74 | Toggle the status area in the bar - 75 | Toggle the floating indicator area in the bar - 76 | Toggle the sticky indicator area in the bar - - 77 | Show all bar modules + - 77 | Toggle the icon in the window title + - 78 | Show all bar modules diff --git a/keybinds.h b/keybinds.h index c8cb83c..0f8a9b0 100644 --- a/keybinds.h +++ b/keybinds.h @@ -178,6 +178,7 @@ static Key keys[] = { { MODIFIER1, XK_t, XK_p, togglebarpowerline, {0} }, { MODIFIER1, XK_t, XK_y, togglebaremptytags, {0} }, { MODIFIER1, XK_t, XK_l, togglebarlt, {0} }, + { MODIFIER1, XK_t, XK_i, togglebaricon, {0} }, { MODIFIER1, XK_t, XK_o, toggleopacity, {0} }, { MODIFIER1, XK_t, XK_b, resetbar, {0} }, diff --git a/options.h b/options.h index bb5ab31..c46619a 100644 --- a/options.h +++ b/options.h @@ -218,13 +218,13 @@ static int underlinevoffset = 0; /* How far above the bottom o static int hidebar = 0; /* Hide the bar (1) or show (0) */ static int hidelayout = 0; /* Hide layout indicator (1) or show (0) */ static int hidetitle = 0; /* Hide the title part of the bar (1) or show (0) */ -static int hideunselectedtitle = 0; /* Hide unselected title (1) or show (0) */ +static int hideunselectedtitle = 1; /* Hide unselected title (1) or show (0) */ static int hidestatus = 0; /* Hide status bar (1) or show (0) */ static int hideicon = 0; /* Hide icon (1) or show (0) */ static int hidetags = 0; /* Hide status bar (1) or show (0) */ static int hidesystray = 1; /* Show systray by default (1) or hide (1) */ static int hideemptytags = 1; /* Hide empty tags (1) or show (0) */ -static int hidepowerline = 1; /* Hide tag powerline (1) or show (0) */ +static int hidepowerline = 0; /* Hide tag powerline (1) or show (0) */ static int hidefloating = 0; /* Hide floating indicator (1) or show (0) */ static int hidesticky = 0; /* Hide sticky indicator (1) or show (0) */ @@ -317,12 +317,11 @@ static char col_status15[] = "#ffffff"; /* Status color 15 */ * * Title */ -static int colortitle = 1; /* Color the unselected title. */ static int colorselectedtitle = 1; /* Color the selected title. If you're going to be using Powerlines, the title looks better with this set to 0. */ -static int colorhiddentitle = 1; /* Color the hidden title. */ +static int colorhiddentitle = 0; /* Color the hidden title. */ /* Layout */ -static int colorlayout = 1; /* Color the layout indicator. If you're going to be using Powerlines, the tags look better with this set to 0. */ +static int colorlayout = 0; /* Color the layout indicator. If you're going to be using Powerlines, the tags look better with this set to 0. */ /* Text options * diff --git a/signal.h b/signal.h index 50eb5f7..758798a 100644 --- a/signal.h +++ b/signal.h @@ -73,7 +73,8 @@ static Signal signals[] = { { 74, togglebarstatus, {0} }, { 75, togglebarfloat, {0} }, { 76, togglebarsticky, {0} }, - { 77, resetbar, {0} }, + { 77, togglebaricon, {0} }, + { 78, resetbar, {0} }, #if LAYOUT_TILE { 1, setlayout, {.v = &layouts[0]} }, /* Tiling layout */ #endif diff --git a/speedwm.c b/speedwm.c index b793838..2bebc92 100644 --- a/speedwm.c +++ b/speedwm.c @@ -606,6 +606,7 @@ static void togglebarpowerline(const Arg *arg); static void togglebarlt(const Arg *arg); static void togglebarstatus(const Arg *arg); static void togglebarfloat(const Arg *arg); +static void togglebaricon(const Arg *arg); static void togglebarsticky(const Arg *arg); static void resetbar(const Arg *arg); @@ -5596,6 +5597,13 @@ togglebarfloat(const Arg *arg) arrange(selmon); } +void +togglebaricon(const Arg *arg) +{ + selmon->hideicon = !selmon->hideicon; + arrange(selmon); +} + void togglebarsticky(const Arg *arg) {