about summary refs log tree commit diff stats
path: root/config.mk
Commit message (Collapse)AuthorAgeFilesLines
* changed incnmaster shortcuts in config.arg.hAnselm R. Garbe2007-01-121-1/+1
|
* implemented nmaster appearance in mode label (using %u)Anselm R. Garbe2007-01-081-1/+1
|
* prevent pop() if first sel == nexttiled(clients)Anselm R. Garbe2007-01-051-2/+2
|
* fixing some minor issuesAnselm R. Garbe2007-01-051-2/+2
|
* I prefer two master windows by defaultAnselm R. Garbe2007-01-051-2/+2
|
* experimental version which allows master clients being increased/decreasedAnselm R. Garbe2007-01-051-2/+2
|
* next version will contain updated copyright noticearg@mig292007-01-021-1/+1
|
* added Solaris hintsarg@mig292006-12-181-1/+6
|
* removed the hardcoded fixed fallback, it is useless in non-Latin1 environmentsarg@mig292006-12-081-1/+1
|
* enforcing using fontsets even if they are incomplete for some encodingsarg@mig292006-12-051-1/+1
|
* hotfix of a serious crashing bug 2.5.1arg@mig292006-12-041-1/+1
|
* next version will be 2.5arg@mig292006-11-301-1/+1
|
* next version will be 2.4arg@mig292006-11-251-1/+1
|
* applied Gottox patchesarg@mig292006-11-211-1/+1
|
* next release will be 2.2arg@mig292006-11-031-1/+1
|
* applied Gottox patch to simplify the resizing of col, instead of resizing ↵arg@mig292006-10-311-1/+1
| | | | the current area, it only resizes the master area in the future (seems more predictable)
* now being at v2.0Anselm R. Garbe2006-10-141-1/+1
|
* changing MASTER value from percent into per millAnselm R. Garbe2006-10-051-1/+1
|
* first step to a more flexible dotile() algorithmAnselm R. Garbe2006-09-291-1/+1
|
* fixing the settags issue, preparing 1.7.1 1.7.1Anselm R. Garbe2006-09-271-1/+1
|
* improved intro comment in dwm.h, updated config.mkarg@mmvi2006-09-201-1/+1
|
* small fixAnselm R. Garbe2006-09-111-1/+1
|
* maybe this might workAnselm R. Garbe2006-09-061-1/+1
|
* prepared dwm-1.4 update 1.4Anselm R. Garbe2006-09-061-1/+1
|
* seems to preserve floating client z-layer order (even with reorder() calls)Anselm R. Garbe2006-09-061-1/+1
|
* after 1.3Anselm R. Garbe2006-09-041-1/+1
|
* retagged 1.3Anselm R. Garbe2006-09-041-1/+1
|
* removed html crapAnselm R. Garbe2006-09-041-1/+1
|
* applied sanders patch to remove unnecessary commit()Anselm R. Garbe2006-08-311-1/+1
|
* changed config.arg.h - I really need the 4th tagAnselm R. Garbe2006-08-281-1/+1
|
* 3->4 colorsAnselm R. Garbe2006-08-241-1/+1
|
* applied another config.mk patch made by sanderAnselm R.Garbe2006-08-161-1/+1
|
* fixing small bug in config.mkAnselm R.Garbe2006-08-151-2/+2
|
* applied Sanders LD and resize patchesAnselm R.Garbe2006-08-141-1/+2
|
* upgraded version infoAnselm R.Garbe2006-08-111-1/+1
|
* next version is 0.8arg@10ksloc.org2006-08-071-1/+1
|
* using -Os again, zoom is ignored in floating mode or on floating clientsarg@10ksloc.org2006-08-051-1/+1
|
* no need for -g anymore, regexp matching works nowarg@10ksloc.org2006-08-041-4/+4
|
* switched to regexp matching for Rulesarg@10ksloc.org2006-08-041-4/+4
|
* fixed a type in README, and patched config.mkarg@10ksloc.org2006-08-021-1/+1
|
* removed the CONFIG variable from config.mk, renamed config.h into ↵arg@10ksloc.org2006-08-021-5/+2
| | | | config.default.h, after first clone/extract one needs to copy config.default.h to config.h, that is easier than always heavy typing make CONFIG=blafasel
* applied Sanders patches (numlock2)arg@10ksloc.org2006-08-021-7/+7
|
* uppercasing all define'd values (uppercase-prefixed should only be enum ↵arg@10ksloc.org2006-08-011-7/+7
| | | | field qualifiers)
* centralized/externalized configuration to config.harg@10ksloc.org2006-08-011-2/+5
|
* applied Sanders patchesarg@10ksloc.org2006-08-011-15/+9
|
* s/0.5/0.6/ - my steps are wider than the realityarg@10ksloc.org2006-07-211-1/+1
|
* preparing 0.6 which will be available in the evening after sanders patch approx.arg@10ksloc.org2006-07-211-6/+6
|
* using double-linked list in order to get correct prev focus handlingarg@10ksloc.org2006-07-201-5/+5
|
* cleaned up codearg@10ksloc.org2006-07-201-1/+1
|
* using O3 instead of Os, binary size still < 40kbarg@10ksloc.org2006-07-201-1/+1
|
reen_bottom1.pos = Text.draw(State, line_index, y, startpos) y = y + State.line_height --? print('=> y', y) end if State.search_term then Text.draw_search_bar(State) end end function edit.update(State, dt) end function edit.quit(State) end function edit.mouse_pressed(State, x,y, mouse_button) if State.search_term then return end --? print('press', State.selection1.line, State.selection1.pos) for line_index,line in ipairs(State.lines) do if Text.in_line(State, line_index, x,y) then -- delicate dance between cursor, selection and old cursor/selection -- scenarios: -- regular press+release: sets cursor, clears selection -- shift press+release: -- sets selection to old cursor if not set otherwise leaves it untouched -- sets cursor -- press and hold to start a selection: sets selection on press, cursor on release -- press and hold, then press shift: ignore shift -- i.e. mouse_released should never look at shift state State.old_cursor1 = State.cursor1 State.old_selection1 = State.selection1 State.mousepress_shift = App.shift_down() State.selection1 = { line=line_index, pos=Text.to_pos_on_line(State, line_index, x, y), } --? print('selection', State.selection1.line, State.selection1.pos) break end end end function edit.mouse_released(State, x,y, mouse_button) if State.search_term then return end --? print('release') for line_index,line in ipairs(State.lines) do if Text.in_line(State, line_index, x,y) then --? print('reset selection') State.cursor1 = { line=line_index, pos=Text.to_pos_on_line(State, line_index, x, y), } --? print('cursor', State.cursor1.line, State.cursor1.pos) if State.mousepress_shift then if State.old_selection1.line == nil then State.selection1 = State.old_cursor1 else State.selection1 = State.old_selection1 end end State.old_cursor1, State.old_selection1, State.mousepress_shift = nil if eq(State.cursor1, State.selection1) then State.selection1 = {} end break end end --? print('selection:', State.selection1.line, State.selection1.pos) end function edit.textinput(State, t) for _,line_cache in ipairs(State.line_cache) do line_cache.starty = nil end -- just in case we scroll if State.search_term then State.search_term = State.search_term..t State.search_text = nil Text.search_next(State) end end function edit.keychord_pressed(State, chord, key) if State.selection1.line and -- printable character created using shift key => delete selection -- (we're not creating any ctrl-shift- or alt-shift- combinations using regular/printable keys) (not App.shift_down() or utf8.len(key) == 1) and chord ~= 'C-a' and chord ~= 'C-c' and chord ~= 'C-x' and chord ~= 'backspace' and backspace ~= 'delete' and not App.is_cursor_movement(chord) then Text.delete_selection(State, State.left, State.right) end if State.search_term then if chord == 'escape' then State.search_term = nil State.search_text = nil State.cursor1 = State.search_backup.cursor State.screen_top1 = State.search_backup.screen_top State.search_backup = nil Text.redraw_all(State) -- if we're scrolling, reclaim all fragments to avoid memory leaks elseif chord == 'return' then State.search_term = nil State.search_text = nil State.search_backup = nil elseif chord == 'backspace' then local len = utf8.len(State.search_term) local byte_offset = Text.offset(State.search_term, len) State.search_term = string.sub(State.search_term, 1, byte_offset-1) State.search_text = nil elseif chord == 'down' then State.cursor1.pos = State.cursor1.pos+1 Text.search_next(State) elseif chord == 'up' then Text.search_previous(State) end return elseif chord == 'C-f' then State.search_term = '' State.search_backup = { cursor={line=State.cursor1.line, pos=State.cursor1.pos}, screen_top={line=State.screen_top1.line, pos=State.screen_top1.pos}, } assert(State.search_text == nil) -- zoom elseif chord == 'C-=' then edit.update_font_settings(State, State.font_height+2) Text.redraw_all(State) elseif chord == 'C--' then edit.update_font_settings(State, State.font_height-2) Text.redraw_all(State) elseif chord == 'C-0' then edit.update_font_settings(State, 20) Text.redraw_all(State) -- clipboard elseif chord == 'C-a' then State.selection1 = {line=1, pos=1} State.cursor1 = {line=#State.lines, pos=utf8.len(State.lines[#State.lines].data)+1} elseif chord == 'C-c' then local s = Text.selection(State) if s then App.setClipboardText(s) end -- dispatch to text else for _,line_cache in ipairs(State.line_cache) do line_cache.starty = nil end -- just in case we scroll Text.keychord_pressed(State, chord) end end function edit.key_released(State, key, scancode) end function edit.update_font_settings(State, font_height) State.font_height = font_height love.graphics.setFont(love.graphics.newFont(State.font_height)) State.line_height = math.floor(font_height*1.3) State.em = App.newText(love.graphics.getFont(), 'm') Text_cache = {} end --== some methods for tests -- Insulate tests from some key globals so I don't have to change the vast -- majority of tests when they're modified for the real app. Test_margin_left = 25 Test_margin_right = 0 function edit.initialize_test_state() -- if you change these values, tests will start failing return edit.initialize_state( 15, -- top margin Test_margin_left, App.screen.width - Test_margin_right, 14, -- font height assuming default LÖVE font 15) -- line height end -- all textinput events are also keypresses -- TODO: handle chords of multiple keys function edit.run_after_textinput(State, t) edit.keychord_pressed(State, t) edit.textinput(State, t) edit.key_released(State, t) App.screen.contents = {} edit.draw(State) end -- not all keys are textinput function edit.run_after_keychord(State, chord) edit.keychord_pressed(State, chord) edit.key_released(State, chord) App.screen.contents = {} edit.draw(State) end function edit.run_after_mouse_click(State, x,y, mouse_button) App.fake_mouse_press(x,y, mouse_button) edit.mouse_pressed(State, x,y, mouse_button) App.fake_mouse_release(x,y, mouse_button) edit.mouse_released(State, x,y, mouse_button) App.screen.contents = {} edit.draw(State) end function edit.run_after_mouse_press(State, x,y, mouse_button) App.fake_mouse_press(x,y, mouse_button) edit.mouse_pressed(State, x,y, mouse_button) App.screen.contents = {} edit.draw(State) end function edit.run_after_mouse_release(State, x,y, mouse_button) App.fake_mouse_release(x,y, mouse_button) edit.mouse_released(State, x,y, mouse_button) App.screen.contents = {} edit.draw(State) end