source: dotfiles/guix/.zprofile@ caef369

Last change on this file since caef369 was 9989e84, checked in by Mikhail Kirillov <w96k@…>, on Apr 13, 2020 at 7:41:10 PM

Update everything

  • Property mode set to 100644
File size: 2.4 KB
Line 
1export GUIX_PROFILE="$HOME/.guix-profile"
2source "$HOME/.guix-profile/etc/profile"
3
4# Wayland vars
5export XDG_SESSION_TYPE=wayland
6export SDL_VIDEODRIVER=wayland
7export _JAVA_AWT_WM_NONREPARENTING=1
8export MOZ_ENABLE_WAYLAND=1
9
10if test -z "${XDG_RUNTIME_DIR}";
11then
12 export XDG_RUNTIME_DIR=/tmp/${UID}-runtime-dir
13 if ! test -d "${XDG_RUNTIME_DIR}"; then
14 mkdir "${XDG_RUNTIME_DIR}"
15 chmod 0700 "${XDG_RUNTIME_DIR}"
16 fi
17fi
18
19streaming() {
20 INRES="1280x720" # input resolution
21 OUTRES="1280x720" # output resolution
22 FPS="10" # target FPS
23 GOP="20" # i-frame interval, should be double of FPS,
24 GOPMIN="10" # min i-frame interval, should be equal to fps,
25 THREADS="2" # max 6
26 CBR="1000k" # constant bitrate (should be between 1000k - 3000k)
27 QUALITY="ultrafast" # one of the many FFMPEG preset
28 AUDIO_RATE="44100"
29 STREAM_KEY="$1" # use the terminal command Streaming streamkeyhere to stream your video to twitch or justin
30 SERVER="live-sjc" # twitch server in California, see http://bashtech.net/twitch/ingest.php to change
31
32 ffmpeg -f x11grab -s "$INRES" -r "$FPS" -i :0.0 -f flv -ac 2 -ar $AUDIO_RATE \
33 -vcodec libx264 -g $GOP -keyint_min $GOPMIN -b:v $CBR -minrate $CBR -maxrate $CBR -pix_fmt yuv420p\
34 -s $OUTRES -preset $QUALITY -tune film -acodec libmp3lame -threads $THREADS -strict normal \
35 -bufsize $CBR "rtmp://$SERVER.twitch.tv/app/$STREAM_KEY"
36}
37
38GUIX_PROFILE="/home/w96k/.config/guix/current"
39. "$GUIX_PROFILE/etc/profile"
40
41
42export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale
43
44# Add npm to PATH
45export PATH="$PATH:$HOME/.nodejs/bin/"
46
47# Add .bin to PATH
48export PATH="~$PATH:/.bin/"
49
50export PATH="$PATH:$HOME/.local/bin/"
51export PATH="$PATH:$HOME/usr/local/bin/"
52
53# Add ruby gems to PATH
54export PATH=$PATH:/home/w96k/.gem/
55export PATH=$PATH:/home/w96k/.gem/ruby/2.5.0/bin/
56
57export PATH=$HOME/.config/guix/current/bin:$PATH
58
59#sh export GDK_CORE_DEVICE_EVENTS=1
60
61export ALTERNATE_EDITOR=""
62export EDITOR="emacsclient -t" # $EDITOR opens in terminal
63export VISUAL="emacsclient -c -a emacs" # $VISUAL opens in GUI mode
64
65#[[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && \
66 # . /usr/share/bash-completion/bash_completion
67
68# Colored ls
69export LS_OPTIONS='--color=auto'
70eval "`dircolors`"
71alias ls='ls $LS_OPTIONS'
72
73alias python='python3'
74
75if [ -f .zshrc ]
76then
77 . ~/.zshrc
78fi
79
80
81if [ "$(tty)" = "/dev/tty1" ]; then
82 tor &
83 exec sway
84fi
Note: See TracBrowser for help on using the repository browser.