/* * This file is part of firk's window manager for x11 (fwm) * Copyright (C) 2016-2022 firk * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ /* watch for resolution changes via root window */ #define WATCH_ROOTWIN_RESIZE /* force border_width for all windows */ //#define FORCE_BORDERS_WIDTH 2 /* minimum border_width for all windows */ #define MIN_BORDERS_WIDTH 2 #define DESKTOP_BG DKGRAY #define TASKBAR_BG BLACK #define TASKBAR_BORDER LTGRAY #define TASKBAR_BWIDTH 1 /* TASKBAR_WIDTH includes 2*BWIDTH */ // #define TASKBAR_WIDTH(sw) 480 /* make 4:3 from 1920x1080 */ //#define TASKBAR_WIDTH(sw) 400 //#define TASKBAR_WIDTH(sw) 200 /* for 1024x768 */ //#define TASKBAR_WIDTH(sw) ((sw)/4) //#define TASKBAR_WIDTH(sw) ((sw)/5) #define TASKBAR_WIDTH(sw) (((sw)<750)?150:((sw)/5)) #define TASKBAR_BUTBORDER LTGRAY #define TASKBAR_BUTBORDER_ONTOP DKGRAY #define TASKBAR_BUTBORDER_FOCUSED WHITE #define TASKBAR_BUTBREAKLINE YELLOW #define TASKBAR_BUTTEXT LTGRAY #define TASKBAR_BUTTEXT_ONTOP DKGRAY #define TASKBAR_BUTTEXT_FOCUSED WHITE #define TASKBAR_BUTBG BLACK #define TASKBAR_BUTBG_HOVER BLUE #define TASKBAR_BUTBG_CLICK CYAN #define TASKBAR_TOPAREA 180 #define TASKBAR_BOTAREA 100 #define MAX_TOTAL_WINDOWS 1000 #define MAX_WINDOWS 100 #define DEFAULT_TASKBAR_WINHEIGHT 20 #define DEFAULT_TASKBAR_FONT_NAME "-Misc-Fixed-Medium-R-SemiCondensed--13-120-75-75-C-60-ISO10646-1" // iso10646 = utf-8 and it is very laggy for some reason // update: lags is in XQueryFont; fixed by removing extra calls to it //#define TASKBAR_FONT_NAME "-Misc-Fixed-Medium-R-SemiCondensed--13-120-75-75-C-60-ISO8859-1" /* mods that are ignored when receiving hotkeys usually: Lock=CapsLock,Shift=Shift,Control=Ctrl,Mod1=Alt,Mod2=NumLock */ static unsigned int ign_mods[] = {LockMask, Mod2Mask}; #define CLRMOD(x) ((x) & ~LockMask & ~Mod2Mask) /* required mod for hotkeys; Mod4 is usually Super key */ #define SPECMASK Mod4Mask /* double-click delay, ms */ #define DBLCLICK 500 #define CALENDAR_BG BLACK #define CALENDAR_CURDAYBG GREEN #define CALENDAR_DAY WHITE #define CALENDAR_HDAY LTRED #define CALENDAR_OTHERDAY DKGRAY #define CALENDAR_OTHERHDAY RED /* raw date string coords */ #define CALENDAR_RAWX 50 #define CALENDAR_RAWY 30 /* gui calendar sizes may be changed by calendar drawing code if this sizes does not fit taskbar width */ /* gui calendar coords */ #define CALENDAR_X 35 #define CALENDAR_Y 50 #define CALENDAR_CELLSX 30 #define CALENDAR_CELLSY 20 /* gui calendar ESTIMATED width for Expose events */ #define CALENDAR_SX 270 #define CALENDAR_SY 120 /* error indicator */ #define STERR_X 200 #define STERR_Y 20 #define STERR_MSG "ERR" #define STERR_COLOR LTRED /* pseudo-commands */ #define OP_CLOSE_WINDOW ((char const*)1) #define OP_KILL_WINDOW ((char const*)2) #define OP_TOGGLE_FULL ((char const*)3) #define OP_NEXT_WINDOW ((char const*)4) #define OP_PREV_WINDOW ((char const*)5) #define OP_ZPREV_WINDOW ((char const*)6) #define OP_TOGGLE_ONTOP ((char const*)7) #define OP_QUIT ((char const*)8) struct hotkeys_list { unsigned int keysym; unsigned int keycode; unsigned int shift; char const * cmd; }; extern int TASKBAR_WINHEIGHT; extern char const * TASKBAR_FONT_NAME; extern char const * HOLIDAYS_FILE; extern struct hotkeys_list * get_hotkeys_list(size_t * count); extern char const * get_hotkey_by_keycode(unsigned int kc, unsigned int shift); extern void load_configs(unsigned int count, char const * const * fns); extern void run_startup(void); extern int startup_errors; extern void check_holidays_file(int force); extern unsigned char const * get_holidays_list(unsigned Y, unsigned M, size_t * sz); extern int get_holiday_state(unsigned Y, unsigned M, unsigned D);