Change leftlayout variable name, bump version to 0.4, add status options

This commit is contained in:
speediegq 2022-10-01 22:24:19 +02:00
parent 3e71338771
commit af335a5f7e
8 changed files with 60 additions and 60 deletions

View file

@ -305,7 +305,7 @@
!!
!! Layout indicator position. If set to 1, the layout indicator will be printed before the tags. Otherwise, the layout indicator will be printed after the tags (1/0)
!!
- speedwm.leftlayout: 1
- speedwm.layoutposition: 1
!!
!! Fade inactive windows. If set to 1, inactive windows (the unfocused windows) will fade into the background. This is both an easy way to tell if a window is focused or not and looks good. (1/0)
!!

View file

@ -101,7 +101,7 @@
- Super+Control+Shift+s | Set a wallpaper
- Super+Control+Shift+n | Connect to WLAN
- Super+Control+Shift+b | Connect to a Bluetooth device
- Super+Control+Shift+d | Open up a list of dotfiles in dmenu that you can edit.
- Super+Control+Shift+f | Open up a list of dotfiles in dmenu that you can edit.
- Super+Control+Shift+q | Pauses your music
- Super+Control+Shift+w | Decreases your music volume
- Super+Control+Shift+e | Increase your music volume

View file

@ -62,7 +62,7 @@ static const Key keys[] = {
{ MODIFIER1|CONTROL|SHIFT, -1, XK_n, spawn, RCMD(NETWORK) },
{ MODIFIER1|CONTROL|SHIFT, -1, XK_b, spawn, RCMD(BLUETOOTH) },
{ MODIFIER1|CONTROL|SHIFT, -1, XK_m, spawn, RCMD(TERMINAL EMAIL) },
{ MODIFIER1|CONTROL|SHIFT, -1, XK_d, spawn, RCMD("speedwm_run -configure") },
{ MODIFIER1|CONTROL|SHIFT, -1, XK_f, spawn, RCMD("speedwm_run -configure") },
{ MODIFIER1|CONTROL|SHIFT, -1, XK_r, spawn, RCMD("speedwm_run -r") },
{ MODIFIER1, -1, XK_s, spawn, RCMD("speedwm-core -toggle") },

View file

@ -214,7 +214,7 @@ static int barposition = 1; /* Bar position. Top: 0, Bott
static int barpaddingv = 10; /* How much padding to have vertically in pixels */
static int barpaddingh = 10; /* How much padding to have horizontally in pixels */
static int barpaddinggaps = 1; /* Set barpadding to the gaps */
static int leftlayout = 1; /* Layout indicator on the left (1) or on the right (0) */
static int layoutposition = 1; /* Layout indicator on the left (1) or on the right (0) */
/* Tag text options */
static int underline = 0; /* Underline tags (1) or not (0) */

View file

@ -32,7 +32,7 @@ HTMLDIR = "/home/anon/Projects/spdgmr.github.io/"
###################################################################################
# speedwm version
VERSION = 0.3
VERSION = 0.4
X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib

View file

@ -1022,9 +1022,9 @@ buttonpress(XEvent *e)
for (c = m->clients; c; c = c->next)
occ |= c->tags;
if (leftlayout) {
if (layoutposition) {
x += TEXTW(m->ltsymbol);
} if (ev->x < x && leftlayout && !selmon->isreset) {
} if (ev->x < x && layoutposition && !selmon->isreset) {
click = ClkLtSymbol; // left layout
} else {
do {
@ -1042,7 +1042,7 @@ buttonpress(XEvent *e)
#endif
click = ClkTagBar;
arg.ui = 1 << i;
} else if (ev->x < x + TEXTW(selmon->ltsymbol) && !leftlayout && !selmon->isreset) // right layout
} else if (ev->x < x + TEXTW(selmon->ltsymbol) && !layoutposition && !selmon->isreset) // right layout
click = ClkLtSymbol; // right layout
else if (ev->x > selmon->ww - statusw + lrpad - 2 && !hidestatus) {
x = selmon->ww - statusw + lrpad - 2;
@ -1066,7 +1066,7 @@ buttonpress(XEvent *e)
}
}
} else {
if (!leftlayout) {
if (!layoutposition) {
x += TEXTW(m->ltsymbol);; // Left layout does not need this
}
@ -1801,9 +1801,9 @@ drawbar(Monitor *m)
urg |= c->tags;
}
/* Draw the layout bar on the left if leftlayout = 1 */
/* Draw the layout bar on the left if layoutposition = 1 */
/* If colorlayoutnorm = 0, draw using SchemeLayout */
if (leftlayout && !hidelayout) {
if (layoutposition && !hidelayout) {
w = TEXTW(m->ltsymbol);
drw_setscheme(drw, scheme[SchemeLayout]);
x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0);
@ -1842,9 +1842,9 @@ drawbar(Monitor *m)
}
#endif
/* Draw the layout bar on the right if leftlayout is not 0 */
/* Draw the layout bar on the right if layoutposition is not 0 */
/* If colorlayoutnorm = 0, draw using SchemeLayout */
if (!leftlayout && !hidelayout) {
if (!layoutposition && !hidelayout) {
w = TEXTW(m->ltsymbol);
drw_setscheme(drw, scheme[SchemeLayout]);
x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0);
@ -2868,7 +2868,7 @@ motionnotify(XEvent *e)
occ |= c->tags == 255 ? 0 : c->tags;
else
occ |= c->tags;
if (leftlayout)
if (layoutposition)
x += TEXTW(m->ltsymbol);
do {
if (!(occ & 1 << i || selmon->tagset[selmon->seltags] & 1 << i) && hideemptytags)

16
status
View file

@ -52,7 +52,7 @@ ITEM9_ICON=" " # Icon for ITEM9
ITEM10_ICON=" " # Icon for ITEM10
ITEM11_ICON=" " # Icon for ITEM11
# Format
# RAM format
# Format to display the RAM status in
#
# @u - Used RAM
@ -61,7 +61,7 @@ ITEM11_ICON=" " # Icon for ITEM11
# Example: @u/@t
ITEM1_FORMAT="@u/@t"
# Format
# Time format
# Format to display the time in
#
# @h - Hour
@ -71,7 +71,7 @@ ITEM1_FORMAT="@u/@t"
# Example: @h:@m
ITEM2_FORMAT="@h:@m"
# Format
# Date format
# Format to display the date in
#
# @d - Day
@ -97,7 +97,7 @@ ITEM9_DISPLAY_TIMEELAPSED="true" # Display time elapsed or not. If you use this,
ITEM9_DISPLAY_TIMETOTAL="true" # Display total time or not (true/false_
ITEM9_DISPLAY_FILE="false" # Display filename or not. This option will disable everything else. Path and file extension will be cut. (true/false)
# Format
# Music format
# Format to display the music status in
#
# @a - Artist
@ -213,9 +213,9 @@ else
printf "\nITEM9_ICON='$ITEM9_ICON' # Icon for ITEM9" >> $HOME/.config/speedwm-de/status/config
printf "\nITEM10_ICON='$ITEM10_ICON' # Icon for ITEM10" >> $HOME/.config/speedwm-de/status/config
printf "\nITEM11_ICON='$ITEM11_ICON' # Icon for ITEM11" >> $HOME/.config/speedwm-de/status/config
printf "\n\n# Format\n# Format to display the RAM status in\n#\n# @u - Used RAM\n# @t - Total RAM\n#\n# Example: @u/@t\nITEM1_FORMAT='$ITEM1_FORMAT'" >> $HOME/.config/speedwm-de/status/config
printf "\n\n# Format\n# Format to display the time in\n#\n# @h - Hour\n# @m - Minute\n# @s - Second\n#\n# Example: @h:@m:@s\nITEM2_FORMAT='$ITEM2_FORMAT'" >> $HOME/.config/speedwm-de/status/config
printf "\n\n# Format\n# Format to display the date in\n#\n# @d - Day\n# @m - Month\n# @y - Year\n#\n# Example: @d/@m/@y\nITEM3_FORMAT='$ITEM3_FORMAT'" >> $HOME/.config/speedwm-de/status/config
printf "\n\n# RAM format\n# Format to display the RAM status in\n#\n# @u - Used RAM\n# @t - Total RAM\n#\n# Example: @u/@t\nITEM1_FORMAT='$ITEM1_FORMAT'" >> $HOME/.config/speedwm-de/status/config
printf "\n\n# Time format\n# Format to display the time in\n#\n# @h - Hour\n# @m - Minute\n# @s - Second\n#\n# Example: @h:@m:@s\nITEM2_FORMAT='$ITEM2_FORMAT'" >> $HOME/.config/speedwm-de/status/config
printf "\n\n# Date format\n# Format to display the date in\n#\n# @d - Day\n# @m - Month\n# @y - Year\n#\n# Example: @d/@m/@y\nITEM3_FORMAT='$ITEM3_FORMAT'" >> $HOME/.config/speedwm-de/status/config
printf "\n\n# Volume item options\nITEM4_SHOW_MUTE=$ITEM4_SHOW_MUTE # Show mute status (true/false)" >> $HOME/.config/speedwm-de/status/config
printf "\nITEM4_MUTE_TEXT='$ITEM4_MUTE_TEXT' # Text to display when muted (text)" >> $HOME/.config/speedwm-de/status/config
printf "\n# dfmpeg status options\nITEM7_RECORDING_TEXT='$ITEM7_RECORDING_TEXT' # Text to display when recording (text)" >> $HOME/.config/speedwm-de/status/config
@ -228,7 +228,7 @@ else
printf "\nITEM9_DISPLAY_FILE=$ITEM9_DISPLAY_FILE # Display filename or not. This option will disable everything else. Path and file extension will be cut. (true/false)" >> $HOME/.config/speedwm-de/status/config
printf "\nITEM9_DISPLAY_TIMEELAPSED=$ITEM9_DISPLAY_TIMEELAPSED # Display time elapsed or not (true/false)" >> $HOME/.config/speedwm-de/status/config
printf "\nITEM9_DISPLAY_TIMETOTAL=$ITEM9_DISPLAY_TIMETOTAL # Display total time or not (true/false)" >> $HOME/.config/speedwm-de/status/config
printf "\n\n# Format\n# Format to display the music status in\n#\n# @a - Artist\n# @t - Title\n# @g - Genre\n# @ab - Album\n# @tt - Total time\n# @te - Time elapsed\n#\n# Example: @a - @t from @ab (@g) [@te/@tt]\nITEM9_FORMAT='$ITEM9_FORMAT'" >> $HOME/.config/speedwm-de/status/config
printf "\n\n# Music format\n# Format to display the music status in\n#\n# @a - Artist\n# @t - Title\n# @g - Genre\n# @ab - Album\n# @tt - Total time\n# @te - Time elapsed\n#\n# Example: @a - @t from @ab (@g) [@te/@tt]\nITEM9_FORMAT='$ITEM9_FORMAT'" >> $HOME/.config/speedwm-de/status/config
printf "\n\n# Newsboat item options\nITEM10_TEXT='$ITEM10_TEXT' # Text to display next to unread article count (text)" >> $HOME/.config/speedwm-de/status/config
printf "\n\n# Battery item options\nITEM11_SHOW_CHARGING_STATUS=$ITEM11_SHOW_CHARGING_STATUS # Show 'Charging', 'Not charging' or 'Fully charged' status after the percentage. (true/false)" >> $HOME/.config/speedwm-de/status/config
printf "\nITEM11_CHARGING_TEXT='$ITEM11_CHARGING_TEXT' # Text when charging (text)" >> $HOME/.config/speedwm-de/status/config

View file

@ -98,24 +98,9 @@ ResourcePref resources[] = {
{ "color13", STRING, &col_status13 },
{ "color14", STRING, &col_status14 },
{ "color15", STRING, &col_status15 },
{ "shell", STRING, &shell },
{ "status", STRING, &status },
{ "defaultstatus", STRING, &defaultstatus },
#if LAYOUT_MONOCLE
{ "monocleformat", STRING, &monocleformat },
{ "monocleclientcount", INTEGER, &monocleclientcount },
{ "monoclecount", INTEGER, &monoclecount },
#endif
#if LAYOUT_DECK
{ "deckformat", STRING, &deckformat },
{ "deckcount", INTEGER, &deckcount },
#endif
#if LAYOUT_STAIRS
{ "stairpx", INTEGER, &stairpx },
{ "stairdirection", INTEGER, &stairdirection },
{ "stairsamesize", INTEGER, &stairsamesize },
#endif
{ "altbarclass", STRING, &altbarclass },
{ "altbarcmd", STRING, &altbarcmd },
{ "alttrayname", STRING, &alttrayname },
@ -130,10 +115,6 @@ ResourcePref resources[] = {
{ "attachdirection", INTEGER, &attachdirection },
{ "resizehints", INTEGER, &resizehints },
{ "startontag", INTEGER, &startontag },
#if USEWINICON
{ "iconsize", INTEGER, &iconsize },
{ "iconspacing", INTEGER, &iconspacing },
#endif
{ "decorhints", INTEGER, &decorhints },
{ "swallowclients", INTEGER, &swallowclients },
{ "swallowfloating", INTEGER, &swallowfloating },
@ -145,15 +126,7 @@ ResourcePref resources[] = {
{ "warpcursor", INTEGER, &warpcursor },
{ "pertag", INTEGER, &pertag },
{ "i3nmaster", INTEGER, &i3nmaster },
#if USETAGPREVIEW
{ "scalepreview", INTEGER, &scalepreview },
{ "tagpreview", INTEGER, &tagpreview },
{ "tagpreviewpaddingv", INTEGER, &tagpreviewpaddingv },
{ "tagpreviewpaddingh", INTEGER, &tagpreviewpaddingh },
{ "barpreview", INTEGER, &barpreview },
{ "mousepreview", INTEGER, &mousepreview },
#endif
{ "leftlayout", INTEGER, &leftlayout },
{ "layoutposition", INTEGER, &layoutposition },
{ "hidelayout", INTEGER, &hidelayout },
{ "hidetitle", INTEGER, &hidetitle },
{ "hideicon", INTEGER, &hideicon },
@ -163,19 +136,12 @@ ResourcePref resources[] = {
{ "hidesticky", INTEGER, &hidesticky },
{ "hidefloating", INTEGER, &hidefloating },
{ "statusallmons", INTEGER, &statusallmons },
#if USEFADE
{ "fadeinactive", INTEGER, &fadeinactive },
#endif
{ "resetlayout", INTEGER, &resetlayout },
{ "resetmfact", INTEGER, &resetmfact },
{ "resetgaps", INTEGER, &resetgaps },
{ "wmclass", INTEGER, &wmclass },
{ "clicktofocus", INTEGER, &clicktofocus },
{ "urgentwindows", INTEGER, &urgentwindows },
#if USEROUNDCORNERS
{ "roundedcorners", INTEGER, &roundedcorners },
{ "cornerradius", INTEGER, &cornerradius },
#endif
{ "underline", INTEGER, &underline },
{ "underlinepad", INTEGER, &underlinepad },
{ "underlinestroke", INTEGER, &underlinestroke },
@ -187,9 +153,6 @@ ResourcePref resources[] = {
{ "gappov", INTEGER, &gappov },
{ "smartgaps", INTEGER, &smartgaps },
{ "smartgapsize", INTEGER, &smartgapsize },
#if LAYOUT_DGRID
{ "forcevsplit", INTEGER, &forcevsplit },
#endif
{ "mousemfact", INTEGER, &mousemfact },
{ "focusspawn", INTEGER, &focusspawn },
{ "floatscratchpad", INTEGER, &floatscratchpad },
@ -197,5 +160,42 @@ ResourcePref resources[] = {
{ "autoresize", INTEGER, &autoresize },
{ "mfact", FLOAT, &mfact },
{ "lowestmfact", FLOAT, &lowestmfact },
#if LAYOUT_MONOCLE
{ "monocleformat", STRING, &monocleformat },
{ "monocleclientcount", INTEGER, &monocleclientcount },
{ "monoclecount", INTEGER, &monoclecount },
#endif
#if LAYOUT_DECK
{ "deckformat", STRING, &deckformat },
{ "deckcount", INTEGER, &deckcount },
#endif
#if LAYOUT_STAIRS
{ "stairpx", INTEGER, &stairpx },
{ "stairdirection", INTEGER, &stairdirection },
{ "stairsamesize", INTEGER, &stairsamesize },
#endif
#if USEWINICON
{ "iconsize", INTEGER, &iconsize },
{ "iconspacing", INTEGER, &iconspacing },
#endif
#if USETAGPREVIEW
{ "scalepreview", INTEGER, &scalepreview },
{ "tagpreview", INTEGER, &tagpreview },
{ "tagpreviewpaddingv", INTEGER, &tagpreviewpaddingv },
{ "tagpreviewpaddingh", INTEGER, &tagpreviewpaddingh },
{ "barpreview", INTEGER, &barpreview },
{ "mousepreview", INTEGER, &mousepreview },
#endif
#if USEFADE
{ "fadeinactive", INTEGER, &fadeinactive },
#endif
#if USEROUNDCORNERS
{ "roundedcorners", INTEGER, &roundedcorners },
{ "cornerradius", INTEGER, &cornerradius },
#endif
#if LAYOUT_DGRID
{ "forcevsplit", INTEGER, &forcevsplit },
#endif
/* value in .Xresources type value in speedwm */
};