#] #] ********************* #] loaddefs link d_Qndfs 'USB workspace loads.ndf' # www.BillHowell.ca 24Jan2013 # Configures defined activities for my Lenovo desktop f_USBworkspaceLoads := 'USB workspace loads.ndf' ; loaddefs_start f_USBworkspaceLoads ; #**************************** # List of operators, generated with : # $ cat "$d_Qndfs""USB workspace loads.ndf" | grep "^#]" | sed 's/^#\]/ /' # ********************* loaddefs link d_Qndfs 'USB workspace loads.ndf' screen_setup IS OP computer orientation - start_Home IS - start_ToDos IS - start_Neural IS - start_Suspicious IS - start_Jobs IS - start_QNial IS - start_Stalin IS - start_Lucas IS - DesktopSetup IS - desktop_switch IS OP desktopNum - start IS OP projectPhrase DesktopNum - start_std IS - # START of #**************************** # versions 16Aug2017, 18Aug2017 # 19Aug2017 10:57 TEST of CHANGES # From link d_Qroot 'setup.ndf' # These have already been loadded # copy (commented out) key operators etc below # QNial directories (loaded) # Debugging (loaded) # [ flag_break flag_debug watch write_debug ] # environment (loaded) # [ setformat, writestatus, computer=['Toshiba','Lenovo'] ] # shell command implementation - shellApp_cmds (loaded) # Special Howell versions of basic ops (loaded) # [check_examples, find_Howell_subString, find_Howell] # Date strings (loaded) [ get_sec hhmmss_to_seconds lead_zero # sec_to_hhmmss waitLocal wait day_2digit,month_name,month_number, # timestamp_YYMMDD_HMS,timestamp_DDMMMYYYY_HMS] # strings - including standard QNial operators, and # Howell's adaptations & novelties # Handy mathematical stuff (loaded) # Matrix ops - symbolic through semi-symbolic through numeric (lq_) # select regions of an array (loaded) # [ ??? ] # HDdrive_mountCheck (loaded) # file operations (loaded) # [ dir_extract file_changeExtension file_rename line_charcodes # mv_files_marked rename_files ] # Linux systemOps - [windowOps,audioOps,videoOps, ???] (lq_'s) # DesktopSetup - [workspaces, programs, working docs] (loaded) #******************************* # #**************************** # Load libraries # Content - Structure.ndf # sd_ IS OP s_raw : structure definition # 07Aug2017 for now only for simple 2D array # sg_ IS OP struct s_lab : get component of structure ; # sp_ IS OP sdat s_lab - [put,change] component of structure # "place" usage is probably wrong! # sm_ IS OP sdat s_lab - apply internal method to structure # 08Aug2017 not yet set up IF not in "SG_ (EACH first symbols 0) THEN loaddefs (link d_QNial_mine 'Structure.ndf') 0 ENDIF ; IF not in "S_WINDOWOPS (EACH first symbols 0) THEN loaddefs (link d_QNial_mine 'windows.ndf') 0 ENDIF ; #**************************** # Screen and window coding IF flag_debug THEN write 'loading : Screen and window coding ...' ; ENDIF ; # How do I see current window sizes in Linux Mint ? ; # From "/media/bill/SWAPPER/Qnial/setup.ndf" # lq_windowOps : # get_winPosnSize_from_ID IS OP winID # get_winPosnSize_from_Title IS OP Titler IF flag_debug THEN write 'loading screen_setup' ; ENDIF ; #] screen_setup IS OP computer orientation - screen_setup IS OP computer orientation { LOCAL taskMgr_height LO_title_height LO_footer_height LO_horiztl_margins s_gap_wide s_gap_high s_widthMCnt s_lenMax_tosh s_lenMin_tosh s_lenMax_lenovo s_lenMin_lenovo s_lenMax s_lenMin s_width s_height s_width_half s_strtLft s_strtRg s_height_half s_strtTop s_strtBtm s_height_half s_width_LO s_width s_width_half_LO s_strtLft_LO s_strtRgt_LO s_height_LO s_height_half_LO s_strtTop_LO s_strtBtm_LO s_strtLR_MCnt s_strtTB_MCn s_width_MCnt s_height_MCnt s_strtLR_Cal s_strtTB_Cal s_width_Cal s_height_Cal s_strtLR_ToDos s_strtTB_ToDos s_width_ToDos s_height_ToDos t_delay_util t_delay_text t_delay_LO t_delay_MnthCnt t_delay_Calendar t_delay_ToDos wConfig_util wConfig_text wConfig_LO wConfigMnthCnt wConfigCalendar wConfigToDos ; NONLOCAL winConfig ; % Toshiba 34.2 cm wide = 1366 pixels, 19.3 cm high = 768 pixels ; s_lenMax_tosh := 1366 ; s_lenMin_tosh := 768 ; s_lenMax_lenovo := 1920 ; s_lenMin_lenovo := 1080 ; % ; % Gaps between all windows ; s_gap_wide := 10 ; s_gap_high := 10 ; % Constants - for LibreOffice (LO) ; taskMgr_height := 50 ; % for Desktop & laptop 28Jun2016 one line - from 2 height = 100 ; LO_title_height := 25 ; % for Desktop & laptop ; LO_footer_height := 100 ; % for Desktop & laptop ; LO_horiztl_margins := 0 ; LO_hAdj := 52 ; % approx = taskMgr_height ; LO_wAdj := 10 ; % approx = ?? ; % Toshiba measured MonthCount sheet width (10.4 / 34.2 * 1366) = 415 ; s_widthMCnt := floor (10.4 / 34.2 * 1366) ; % Windows [posn,size] error tolerance. WARNING! defaults are arbitrary ; % special cases needed for special files - like [ToDos,Calendar, MonthCount] ; % 17Aug2017 Howell - adjustPosnSize stuff no longer used. ; % Test current approach with wmctrl instead of xdotools on Lenovo portrait ; % then remove ; s_adjustPosnSize_util := (30 30) (30 30) ; s_adjustPosnSize_text := (30 30) (30 30) ; s_adjustPosnSize_LO := (10 LO_hAdj) (10 (opp LO_hAdj)) ; s_adjustPosnSize_MnthCnt := (10 LO_hAdj) (10 (opp LO_hAdj)) ; s_adjustPosnSize_Calendar := (10 LO_hAdj) (10 (opp LO_hAdj)) ; s_adjustPosnSize_ToDos := (10 LO_hAdj) (10 (opp LO_hAdj)) ; % ; % application delays (s) for startup - allow to load. WARNING! defaults are arbitrary ; % special cases needed for special files - like [ToDos,Calendar, MonthCount] ; t_delay_util := 5 ; t_delay_text := 5 ; t_delay_LO := 7 ; t_delay_Referncs := 5 ; t_delay_MnthCnt := 5 ; t_delay_Calendar := 8 ; t_delay_ToDos := 12 ; % ; IF = computer "Toshiba THEN s_lenMax s_lenMin := s_lenMax_tosh s_lenMin_tosh ; ELSEIF = computer "Lenovo THEN s_lenMax s_lenMin := s_lenMax_lenovo s_lenMin_lenovo ; ENDIF ; IF = orientation "landscape THEN s_width s_height := s_lenMax s_lenMin ; ELSEIF = orientation "portrait THEN s_width s_height := s_lenMin s_lenMax ; ENDIF ; % ; % set default standard window parameters ; s_width_half := floor ((s_width - s_gap_wide )/ 2) ; s_strtLft := 0 ; s_strtRgt := s_width_half + s_gap_wide ; s_height_half := floor ((s_height - s_gap_high)/ 2) ; s_strtTop := 0 ; s_strtBtm := s_height_half + s_gap_high ; % ; % set default LibreOffice (LO) window parameters ; s_width_LO := s_width ; s_width_half_LO := s_width_half ; s_strtLft_LO := s_strtLft ; s_strtRgt_LO := s_strtRgt ; s_height_LO := s_height - LO_title_height ; s_height_half_LO := s_height_half - LO_title_height ; s_strtTop_LO := s_strtTop + LO_title_height ; s_strtBtm_LO := s_strtBtm + LO_title_height ; % ; % set default [ToDos,Calendar,MonthCount] window parameters ; % for each [computer,orientation], ; % RL = Right or Left ; % TB = Top or Bottom ; IF = orientation "landscape THEN IF = computer "Toshiba THEN s_strtLR_MCnt := s_width_LO - s_widthMCnt ; s_strtTB_MCnt := s_strtTop_LO ; s_width_MCnt := s_widthMCnt ; s_height_MCnt := s_height_LO ; s_strtLR_Cal := s_strtLR_MCnt ; s_strtTB_Cal := s_strtTB_MCnt ; s_width_Cal := s_width_MCnt ; s_height_Cal := s_height_MCnt ; s_strtLR_ToDos := s_strtLft_LO ; s_strtTB_ToDos := s_strtTop_LO ; s_width_ToDos := s_strtLR_MCnt - s_gap_wide ; s_height_ToDos := s_height_LO ; ELSEIF = computer "Lenovo THEN s_strtLR_MCnt := s_width_LO - s_widthMCnt ; s_strtTB_MCnt := s_strtTop_LO ; s_width_MCnt := s_widthMCnt ; s_height_MCnt := s_height_LO ; s_strtLR_Cal := s_strtLR_MCnt ; s_strtTB_Cal := s_strtTB_MCnt ; s_width_Cal := s_width_MCnt ; s_height_Cal := s_height_MCnt ; s_strtLR_ToDos := s_strtLft_LO ; s_strtTB_ToDos := s_strtTop_LO ; s_width_ToDos := s_strtLR_MCnt - s_gap_wide ; s_height_ToDos := s_height_LO ; ENDIF ; ELSEIF = orientation "portrait THEN IF = computer "Toshiba THEN s_strtLR_MCnt := s_strtLft_LO ; s_strtTB_MCnt := s_strtTop_LO ; s_width_MCnt := s_widthMCnt ; s_height_MCnt := s_lenMin_tosh ; s_strtLR_Cal := s_strtLR_MCnt ; s_strtTB_Cal := s_strtTB_MCnt ; s_width_Cal := s_width_MCnt ; s_height_Cal := s_height_MCnt ; s_strtLR_ToDos := s_strtLft_LO ; s_strtTB_ToDos := s_height_MCnt - s_gap_high ; s_width_ToDos := s_width_LO ; s_height_ToDos := s_height_half ; ELSEIF = computer "Lenovo THEN s_strtLR_MCnt := s_width_LO - s_widthMCnt ; s_strtTB_MCnt := s_strtTop_LO ; s_width_MCnt := s_widthMCnt ; s_height_MCnt := s_lenMin_tosh ; s_strtLR_Cal := s_strtLft_LO ; s_strtTB_Cal := s_strtTop_LO ; s_width_Cal := s_width_MCnt - s_gap_wide ; s_height_Cal := s_height_MCnt ; s_strtLR_ToDos := s_strtLft_LO ; s_strtTB_ToDos := s_height_MCnt + s_gap_high ; s_width_ToDos := s_width_LO ; s_height_ToDos := s_height_LO - s_height_MCnt - s_gap_high ; ENDIF ; ELSE write 'ERROR : screen_setup - unrecognized oreintation' ; ENDIF ; % ; % collect [default,ToDos,Calendar,MonthCount] window parameters ; % need to add eog etc as per lists elsewhere ; % 16Aug2017 19:44 for now adjustments (allowed error for placement) are ; % set the same for all apps (see s_adjustPosnSize above) ; wConfig_util := (s_strtLft s_strtTop ) (s_width_half s_height ) s_adjustPosnSize_util t_delay_util ; wConfig_text := (s_strtRgt s_strtTop ) (s_width_half s_height ) s_adjustPosnSize_text t_delay_text ; wConfig_LO := (s_strtRgt_LO s_strtTop_LO ) (s_width_half_LO s_height_LO) s_adjustPosnSize_LO t_delay_LO ; wConfigMnthCnt := (s_strtLR_MCnt s_strtTB_MCnt ) (s_width_MCnt s_height_MCnt ) s_adjustPosnSize_MnthCnt t_delay_MnthCnt ; wConfigCalendar := (s_strtLR_Cal s_strtTB_Cal ) (s_width_Cal s_height_Cal ) s_adjustPosnSize_Calendar t_delay_Calendar ; wConfigToDos := (s_strtLR_ToDos s_strtTB_ToDOs) (s_width_ToDos s_height_ToDos) s_adjustPosnSize_ToDos t_delay_ToDos ; %EACH write_debug wConfigMnthCnt wConfigCalendar wConfigToDos ; % ; % asssign winConfig structure components ; sp_ "winConfig "computer computer ; sp_ "winConfig "orientn orientation ; sp_ "winConfig "utils wConfig_util ; sp_ "winConfig "text wConfig_text ; sp_ "winConfig "spreadSht wConfig_LO ; sp_ "winConfig "wordProc wConfig_LO ; sp_ "winConfig "LibOff wConfig_LO ; sp_ "winConfig "ToDos wConfigToDos ; sp_ "winConfig "Calendar wConfigCalendar ; sp_ "winConfig "MnthCnt wConfigMnthCnt ; } # % special fudges of winConfig structure components ; sp_ "winConfig "Referncs wConfig_LO ; sp_ "winConfig "Referncs t_delay_Referncs #*********************************** # Desktop & Window specifications IF flag_debug THEN write 'loading : Desktop & Window specifications' ; ENDIF ; IF flag_debug THEN write 'loading start_Home' ; ENDIF ; #] start_Home IS - start_Home IS { LOCAL d_ToDos ; d_ToDos := '/media/bill/SWAPPER/ToDos/' ; fileOpen "fileMgr '' '' ; fileOpen "terminal 'PS1="\w\n$ "' '' ; fileOpen "browser '' 'http://duckduckgo.com' ; fileOpen "textEd d_ToDos '_Howell - email signature.txt' ; fileOpen "spreadSht d_ToDos '0_References - papers, reports etc.ods' ; fileOpen "spreadSht d_ToDos '_contacts.ods' ; % ; % terminal opened manually to start qnial, so no action needed ; % Thunderbird email - launched manually ... ; % /usr/bin hunderbird & ; } IF flag_debug THEN write 'loading start_ToDos' ; ENDIF ; #] start_ToDos IS - start_ToDos IS { LOCAL d_ToDos ; d_ToDos := '/media/bill/SWAPPER/ToDos/' ; fileOpen "ToDos d_ToDos '0_ToDos.ods' ; fileOpen "Calendar d_ToDos '0_calendar.ods' ; %fileOpen "MonthCount d_ToDos '0_ToDos_Month_Count.ods' ; } IF flag_debug THEN write 'loading start_Neural' ; ENDIF ; #] start_Neural IS - start_Neural IS { LOCAL d_Neural d_WCCI2018 ; d_Neural := '/media/bill/SWAPPER/Neural Nets/' ; d_WCCI2018 := '/media/bill/SWAPPER/2018 WCCI Rio de Janiero/' ; fileOpen "fileMgr d_Neural '' ; fileOpen "browser '' 'https://duckduckgo.com http://www.ijcnn.org/ http://www.ecomp.poli.br/~wcci2018/' ; fileOpen "textEd d_Neural '0_notes Neural Nets.txt' ; fileOpen "textEd d_WCCI2018 '0_notes WCCI2018.txt' ; fileOpen "textEd d_WCCI2018 '0_mass email notes.txt' ; } IF flag_debug THEN write 'loading start_Suspicious' ; ENDIF ; #] start_Suspicious IS - start_Suspicious IS { LOCAL d_Suspic ; d_Suspic := '/media/bill/SWAPPER/My_Clubs/SuspiciousObserver/' ; fileOpen "fileMgr d_Suspic '' ; fileOpen "browser '' 'http://www.youtube.com/user/Suspicious0bservers/videos/' ; fileOpen "textEd d_Suspic '0_notes Suspicious.txt' ; } IF flag_debug THEN write 'loading start_Jobs' ; ENDIF ; #] start_Jobs IS - start_Jobs IS { LOCAL d_Jobs ; d_Jobs := '?where is this - on Lenovo?' ; fileOpen "fileMgr '' '' ; fileOpen "browser '' '' ; fileOpen "textEd d_Jobs '0_Job log.txt' ; fileOpen "textEd d_Jobs '0_Plans - business, serious stuff.txt' ; fileOpen "textEd d_Jobs '0_Contacts Jobs.ods' ; } IF flag_debug THEN write 'loading start_QNial' ; ENDIF ; #] start_QNial IS - start_QNial IS { LOCAL d_QNial ; d_QNial := '/media/bill/SWAPPER/Qnial/' ; fileOpen "fileMgr '' '/media/bill/SWAPPER/Qnial/MY_NDFS' ; fileOpen "terminal '' '' ; fileOpen "browser '' 'http://www.nial.com/' ; fileOpen "textEd d_QNial '0_QNial notes.txt' ; } IF flag_debug THEN write 'loading start_Stalin' ; ENDIF ; #] start_Stalin IS - start_Stalin IS { LOCAL d_Stalin d_subStalin fname_base ; NONLOCAL computer ; fileOpen "fileMgr '' '' ; fileOpen "terminal '' '' ; % ; % Different type of work is done on [Lenovo, Toshiba] so setup reflects that ; IF computer = "Lenovo THEN % Working directory - will change with each video source ; % fname base - will change with each video source, is same for ndf & ods ; d_Stalin := '/media/bill/ATA_WDC_500G/Stalin supported Hitler/' ; d_subStalin := link d_Stalin '' ; fname_base := '0_vidProdn Stalin supported Hitler' ; fileOpen "wordProc d_Stalin 'Script for Icebreaker Unchained.odt' ; fileOpen "textEd d_Stalin '0_video production notes.txt' ; fileOpen "textEd d_subStalin fname_base '.ndf' ; fileOpen "spreadSht d_subStalin fname_base '.ods' ; % ; %VLC video player, half screen - don't start this, as it's launched for each file separately! ; % ; ELSEIF computer = "Toshiba THEN % Working directory - will change with each video source ; % fname base - will change with each video source, is same for ndf & ods ; d_Stalin := '/media/bill/SWAPPER/Projects/Stalin supported Hitler/' ; d_subStalin := link d_Stalin 'animations - Howell/' ; fname_base := '0_vidProdn Stalin supported Hitler' ; fileOpen "wordProc d_Stalin 'Script for Icebreaker Unchained.odt' ; fileOpen "textEd d_Stalin '00_Icebreaker notes.txt' ; fileOpen "textEd d_subStalin '0_animation notes.txt' ; fileOpen "textEd d_subStalin '0_video production notes.txt' ; fileOpen "spreadSht d_subStalin '0_animation timing.ods' ; ELSE write 'DesktopSetup -> start_Stalin : UNKNOWN computer!!!' ; ENDIF ; } IF flag_debug THEN write 'loading start_Lucas' ; ENDIF ; #] start_Lucas IS - start_Lucas IS { LOCAL d_Lucas ; d_Lucas := '/media/bill/SWAPPER/Projects/Lucas - Universal Force/' ; fileOpen "terminal '' '' ; fileOpen "browser '' 'http://duckduckgo.com http://www.commonsensescience.org/' ; fileOpen "textEd d_Lucas 'Howell - math of Lucas Universal Force.ndf' ; fileOpen "wordProc d_Lucas 'Script for Icebreaker Unchained.odt' ; fileOpen "wordProc d_Lucas 'Howell - Background math for Lucas Universal Force, Chapter 4.odt' ; fileOpen "wordProc d_Lucas 'Working document.odt' ; } # Lucas - other files Lft out for this period of work : fileOpen "wordProc d_Lucas '0_Math symbols.odt' ; fileOpen "wordProc d_Lucas 'Howell - Figures for Lucas Univerrsal Force.odt' ; fileOpen "wordProc d_Lucas 'Howell - Variables, notations, styles for Bill Lucas, Universal Force.odt' ; # #*********************************** # Desktop & Window operators # Desktops MUST be specified as numbers! write 'loading : DesktopSetup' ; orientation := "landscape ; IF flag_debug THEN write 'loading DesktopSetup' ; ENDIF ; #] DesktopSetup IS - DesktopSetup IS { NONLOCAL computer orientation ; %Default settings - edit for different configs ; %computer = either ["Lenovo, "Toshiba] - set in each computer''s /media/bill/SWAPPER/Qnial/start.ndf file ; %orientation ["landscape,"portrait] ; screen_setup computer orientation ; } IF flag_debug THEN write 'loading desktop_switch' ; ENDIF ; #] desktop_switch IS OP desktopNum - desktop_switch IS OP desktopNum { desktopNum := string desktopNum ; host (link 'wmctrl -s "' desktopNum '"') ; } # Launch a "project", specifying appropriate Desktop and directories IF flag_debug THEN write 'loading start' ; ENDIF ; #] start IS OP projectPhrase DesktopNum - start IS OP projectPhrase DesktopNum { LOCAL desktopName desktopNum ; projectStr := link 'start_' (string projectPhrase) ; desktop_switch desktopNum ; host 'sleep 2s' ; execute projectStr ; } IF flag_debug THEN write 'loading start_std' ; ENDIF ; #] start_std IS - start_std IS { start "Home 0 ; start "ToDos 1 ; start "Neural 3 ; start "Suspicious 4 ; } # not active start "Jobs 2 ; start "Stalin 2 ; start "Lucas 2 ; # EACH write (link 'completed : ' f_workSpace) '<<<<<<<<<<<<<<<' '' 'Specify workspaces to load :' ' start_std (= start "[Home,ToDos,Neural,Suspicious]) ' ' start "Home 0 ' ' start "ToDos 1 ' ' start "Neural 3 ' ' start "Suspicious 4 ' ' start "QNial 3 ' ' start "Lucas 2 ' ' start "Stalin 2 ' ' start "Jobs 2 ' 'EXTRA Desktop selections - enter manually using an "unused" Desktop Number ' '' ; #********************* # Set it up DesktopSetup ; loaddefs_ended f_USBworkspaceLoads ; # enddoc