컴퓨터에서 휴식을 취할 수 있도록 자동으로 화면을 잠그는 타이머가 있나요?

컴퓨터에서 휴식을 취할 수 있도록 자동으로 화면을 잠그는 타이머가 있나요?

다음 작업 흐름을 제공하는 그래픽 또는 명령줄 프로그램을 찾고 있습니다.

  1. 25분 세션 시작
  2. 25분 후 화면이 자동으로 5분 동안 잠깁니다(아니면 그냥 검은색으로 변했을 수도 있나요?)
  3. 이제는 컴퓨터 앞에서 검은 화면이나 잠긴 화면을 보는 것 외에는 아무것도 할 수 없어서 잠시 쉴 수 있게 되었습니다 :)
  4. 5분 후 자동으로 화면이 돌아와서 작업을 계속할 수 있습니다

정확히 이것을 수행하는 프로그램이 있습니까?

답변1

휴식을 취하다

TakeaBreak가 현재 켜져 있습니다.발사대

sudo add-apt-repository ppa:vlijm/takeabreak
sudo apt-get update
sudo apt-get install takeabreak

최근 (또한) 18.04 / 18.10 / 19.04로 추진되었습니다.


면책 조항 : 나는 저자입니다

버그 등을 신고해 주시기 바랍니다.여기, 또는 댓글여기. 좋은 질문을 주신 orschiro와 격려해 주신 Rinzwind에게 감사드립니다!


남은 휴식 시간(초)(countdown- 옵션 사용)

여기에 이미지 설명을 입력하세요

설정

여기에 이미지 설명을 입력하세요

여기에 이미지 설명을 입력하세요


편집하다

이제 Ubuntu Budgie의 통합되고 현대화된 버전을 사용할 수 있습니다.

여기에 이미지 설명을 입력하세요여기에 이미지 설명을 입력하세요


여기에 이미지 설명을 입력하세요


이 애플릿은 Ubuntu Budgie 19.04에서 기본적으로 사용할 수 있을 가능성이 높지만 이제 가능합니다.여기실험적인 것으로.

답변2

당신은 또한 고려할 수 있습니다워크레이브. 사용하기 쉽고 사용자 정의가 가능하다는 것을 알았습니다. 또한 컴퓨터를 사용하는 방법과 휴식 시간에 대한 매우 유용한 통계도 포함되어 있습니다. 마지막으로, 여러 컴퓨터 간에 자체적으로 동기화할 수도 있다고 생각합니다. 이는 예를 들어 노트북과 학교 컴퓨터에서 모두 작업하는 경우 유용합니다.

작업 중 휴식 시간 프롬프트

편집: 여기에는 화면이 차단된 동안 수행할 몇 가지 운동 제안과 같이 제가 언급하지 않은 다른 많은 기능이 있습니다. 그리고 컴퓨터를 사용하는 시간만 고려할 수 있기 때문에 화장실에서 돌아올 때 휴식 시간을 알리는 메시지도 표시되지 않습니다. :)

편집 2:

"읽기" 모드를 꼭 확인해보세요!

위의특징컴퓨터를 적극적으로 사용한 시간만 계산하는 것은 많은 일을 하지 않는 경우(마우스나 키보드 이벤트가 없는 경우) 버그로 보일 수 있습니다. 많은 시간을 설정했습니다). 이러한 상황에서 "읽기" 모드를 활성화하면 사용량에 관계없이 정확한 시간에 메시지가 표시됩니다.

답변3

조잡하고 미니멀한 명령줄 방식:

sleep 1500; gnome-screensaver-command -l; sleep 300; killall gnome-screensaver

바탕화면 바로가기로 전환하거나 다음 기능으로 전환할 수도 있습니다..bashrc

왜 1500과 300입니까? 왜냐하면 그것은 초, 1500초/분당 60초 = 25분이기 때문입니다.


다음은 변수 세션 및 휴식 시간을 설정하고 휴식 시간을 알리는 방법을 허용하는 타이머용 스크립트입니다.

Linux의 모든 스크립트는 파일로 저장되어야 하며 chmod +x /path/to/script.sh. 이 작업이 완료되면 다음과 같이 스크립트를 바로가기에 바인딩할 수 있습니다..sh 파일을 키보드 조합에 어떻게 바인딩합니까?또는 다음과 같이 바탕 화면 바로 가기를 만듭니다.데스크탑에 실행 프로그램을 어떻게 만들 수 있나요?

스크립트를 실행하면 다음과 같은 메뉴가 표시됩니다.

여기에 이미지 설명을 입력하세요

#!/bin/bash

# Author: Serg Kolo
# Date : Nov 17th, 2015
# Purpose: pomodoro timer script,
# with bunch of options
# Written for: https://askubuntu.com/q/696620/295286

#####################################################
# screenSaver function
# this one uses gnome-screensaver-command for locking
# and killall for unlocking the screen;
# $1 is provided from chooseBreakMethod function
#####################################################

function screenSaver
{
  gnome-screensaver-command -l; sleep $1 ; killall gnome-screensaver 
}


##############################################
# dialogBreak function
# this serves as "screensaver". The screen is never 
# actually locked but rather we open terminal window 
# with a simple command line dialog
# in full sccrean mode
# $1 provided in chooseBreakMethod function
##################################################
function dialogBreak
{
 gnome-terminal --full-screen  -e  "bash -c 'sleep $1 | dialog --progressbox \"TAKE A BREAK\" 100 100 ' "
}

#################################################################
# dimScreen function 
# dims the screen using xrandr; the --brightness 
# can be configured
# for full or partial dimming using decimal values
# from 1 to 0
# $1 is provided from chooseBreakMethod function
################################################################

function dimScreen
{
  xrandr  | awk '$2 == "connected" {print $1}' | xargs -I % xrandr --output % --brightness 0.5
  notify-send 'Take a Break'
  sleep $1
  xrandr  | awk '$2 == "connected" {print $1}' | xargs -I % xrandr --output % --brightness 1
}

##############################
# getSettings function
# This is where the user enters 
# the settings they want
# All the values must be integers
#############################
function getSettings
{
  FORM=$(zenity --forms \ --title="Sergiy's Tomato Script" --text="Choose this session options" \
   --add-entry="Number of Sessions (how many loops)" \
   --add-entry="Session time (minutes)" \
   --add-entry="Break time (minutes)" \
   --add-entry="Dim,dialog,or screensaver? (1,2,3)" \
   --separator=" " )  

  [ $? -eq 0 ] || exit 1

   echo $FORM
}

################################
# chooseBreakMethod function
# A helper function that calls appropriate
# break method, based on the value we got
# from getSettings function
# Because dialogBreak calls gnome-terminal
# this function exits, so it doesn't wait
# Therefore we need to add additional sleep
# command
###############################

function chooseBreakMethod
{

 # $1 is method passed from  ${SETS[3]}
 # $2 is break time passed from ${SETS[2]}
  case $1 in
    1) dimScreen $2 ;;
        2) dialogBreak $2 ; sleep $2 ;;
    3) screenSaver $2 ;;
  esac

}


function minutesToSeconds
{
  echo $(($1*60))
}

#################
# MAIN
#################

# get user settings and store them into array
# Item 0 : num sessions
# Item 1 : session duration
# Item 2 : break duration
# Item 3 : break method - lockscreen, dialog, or just
# turn off the screen 
# SETS == settings
SETS=( $(getSettings) )

COUNTER=${SETS[0]}

#######################################
# This is where most of the job is done
# we loop according to number of session
# specified in the  getSettings function
#########################################

notify-send 'Session started'
while [ $COUNTER -ne 0  ]; do

  sleep $( minutesToSeconds ${SETS[1]} ) # session timer
  chooseBreakMethod ${SETS[3]} $( minutesToSeconds ${SETS[2]} )
  COUNTER=$(($COUNTER-1))
done

notify-send "tomatoScript is done"
####### END OF SCRIT ###########

답변4

나는 사용했다xwrit이 목적을 위해 수년 동안.

sudo apt-get install xwrits

기본적으로 55분마다 5분간 휴식을 취하도록 되어 있지만,매뉴얼 페이지이 시간은 각각 breaktimetypetime명령줄 옵션을 통해 사용자 정의할 수 있습니다. 옵션 을 사용하여 화면 잠금 여부를 제어할 수도 있습니다 +lock. 따라서 25분마다 5분 휴식 시간을 설정하여 사용자를 차단하려면 다음과 같이 실행해야 합니다.

xwrits typetime=25 breaktime=5 +lock &

관련 정보