'tmux within guake eats my scrollback buffer
I want to run tmux within guake, then start a long command, hide guake, and bring it back to access the whole output.
But when I hide guake then show it back, I can no longer scroll to the beginning : I seem to scroll up only to the point where the output was when I brought back the guake window.
I do not have this scrolling issue when running my command in guake alone, or when running tmux through a basic terminal like gnome-terminal.
How can I toggle tmux visibility with guake, while still preserving my scrollback?
my tmux settings:
set -g mouse on
bind -n Pageup copy-mode -u
Solution 1:[1]
I would use a custom event to do this. See the following:
import pygame
from pygame.constants import *
#initialise pygame
pygame.init()
screen=pygame.display.set_mode((100,100))
screen.fill((255,255,255))
font=pygame.font.SysFont("Verdana",10)
#variables
bal=0
autoclickers=0
running=True
#create custom event. Note that you have to use USEREVENT+1 for the following event, +2 for the next...
secondpassed=USEREVENT
pygame.time.set_timer(secondpassed,1000)
while running:
for event in pygame.event.get():
if event.type==QUIT:
running=False
elif event.type==KEYDOWN and event.key==K_RETURN:
#enter pressed
bal+=1
elif event.type==secondpassed:
#event passed, add autoclickers
bal+=autoclickers
elif event.type==MOUSEBUTTONDOWN and bal>5:
#autoclicker bought
autoclickers+=1
bal-=5
#render amount of balls
screen.fill((255,255,255))
balls=font.render("balls: "+str(bal),False,(0,0,0))
screen.blit(balls,(0,0))
pygame.display.update()
pygame.quit()
Note that this does not schedule a timer upon an autoclicker is bought, so the time between the buying and the first ball gain will be less then 1 second. After that, it will be 1 second.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
