.xinitrc
author Oleksandr Gavenko <gavenkoa@gmail.com>
Thu, 26 Jan 2017 14:55:51 +0200
changeset 819 6d313c0c6247
parent 757 70dae9e483aa
permissions -rw-r--r--
Do not duplicate completion if we in the middle of the word.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
281
754e4ee92fc0 Switch to bash interpreter to get more advanced string matching functions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 123
diff changeset
     1
#!/bin/bash
3
a1e69064ee0b Added some linux conf files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     2
653
a5566b182446 Use .env file as common env var settings for Bash and Zsh.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 589
diff changeset
     3
if [[ -f ~/.env ]]; then
a5566b182446 Use .env file as common env var settings for Bash and Zsh.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 589
diff changeset
     4
  . ~/.env
282
3710f0a122cd Load PATH settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 281
diff changeset
     5
fi
449
63fe7a1ebae4 Load custom settings (user editable).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 442
diff changeset
     6
# Load custom settings (user editable).
653
a5566b182446 Use .env file as common env var settings for Bash and Zsh.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 589
diff changeset
     7
if [[ -f ~/.env.local ]]; then
a5566b182446 Use .env file as common env var settings for Bash and Zsh.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 589
diff changeset
     8
  . ~/.env.local
449
63fe7a1ebae4 Load custom settings (user editable).
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 442
diff changeset
     9
fi
282
3710f0a122cd Load PATH settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 281
diff changeset
    10
471
8b397639ecc3 Fix typo.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 470
diff changeset
    11
if [[ -f ~/.Xdefaults ]]; then
470
2d1f71f28130 Check for files before loading.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 449
diff changeset
    12
  xrdb -merge ~/.Xdefaults
2d1f71f28130 Check for files before loading.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 449
diff changeset
    13
  # xrdb -load ~/.Xdefaults
2d1f71f28130 Check for files before loading.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 449
diff changeset
    14
fi
3
a1e69064ee0b Added some linux conf files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    15
438
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 340
diff changeset
    16
# Under Cygwin I prefer '-multiwindow' option, so it needn't to setup WM.
289
914736b32f8a Use Bash syntax for string 'test'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 288
diff changeset
    17
if [[ -z $COMSPEC ]]; then
748
ae1a14ee2b1f Execute X settings sequentially.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 747
diff changeset
    18
  {
ae1a14ee2b1f Execute X settings sequentially.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 747
diff changeset
    19
    setxkbmap us,ru,ua
ae1a14ee2b1f Execute X settings sequentially.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 747
diff changeset
    20
    kbdd
ae1a14ee2b1f Execute X settings sequentially.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 747
diff changeset
    21
    if [[ -f ~/.xmodmaprc ]]; then
ae1a14ee2b1f Execute X settings sequentially.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 747
diff changeset
    22
        xmodmap ~/.xmodmaprc &
ae1a14ee2b1f Execute X settings sequentially.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 747
diff changeset
    23
    fi
ae1a14ee2b1f Execute X settings sequentially.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 747
diff changeset
    24
  } &
746
5dfc65f89cf0 Run more stuff in parallel. Run dependent utilities in sequence.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 745
diff changeset
    25
  xsetroot -mod 2 2 -fg gray70 -bg gray60 &
484
cf2e6576575c Use FvwmM4 module to avoid creating env vars. Use -m4-prefix
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 480
diff changeset
    26
  # To debug FvwmM4 add "-debug" after "FvwmM4".
cf2e6576575c Use FvwmM4 module to avoid creating env vars. Use -m4-prefix
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 480
diff changeset
    27
  fvwm -cmd "Module FvwmM4 -m4-prefix -m4-prefix-defines $HOME/.fvwm/config" &
735
26eaadaeb19a Run Emacs, Firefox and Goldendict in ".xinit".
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 659
diff changeset
    28
  emacs --name emacs-main &
26eaadaeb19a Run Emacs, Firefox and Goldendict in ".xinit".
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 659
diff changeset
    29
  goldendict &
26eaadaeb19a Run Emacs, Firefox and Goldendict in ".xinit".
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 659
diff changeset
    30
  firefox &
585
c2ceb8111620 Autostart notification daemon.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 582
diff changeset
    31
  notfy_daemon_cmd=/usr/lib/notification-daemon/notification-daemon
589
e1812451b4f8 Fix syntax error.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 585
diff changeset
    32
  if [[ -x $notfy_daemon_cmd ]]; then
585
c2ceb8111620 Autostart notification daemon.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 582
diff changeset
    33
    $notfy_daemon_cmd &
c2ceb8111620 Autostart notification daemon.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 582
diff changeset
    34
  fi
56
47272014a49a Don't use fvwm under Cygwin.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 38
diff changeset
    35
fi
3
a1e69064ee0b Added some linux conf files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    36
582
3412c9885616 Lock the computer by xscreensaver.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 544
diff changeset
    37
if command -v xscreensaver; then
3412c9885616 Lock the computer by xscreensaver.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 544
diff changeset
    38
  xscreensaver -nosplash &
3412c9885616 Lock the computer by xscreensaver.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 544
diff changeset
    39
fi
3412c9885616 Lock the computer by xscreensaver.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 544
diff changeset
    40
745
65070eb4aabb Disable beeping.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    41
# Disable beeping.
65070eb4aabb Disable beeping.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    42
if command -v xset; then
65070eb4aabb Disable beeping.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    43
  xset -b &
65070eb4aabb Disable beeping.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    44
fi
65070eb4aabb Disable beeping.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 735
diff changeset
    45
3
a1e69064ee0b Added some linux conf files.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    46
# Last command.
757
70dae9e483aa Better color for background to differ xinit lock terminal from other.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 756
diff changeset
    47
exec xterm -geometry 80x42 -name "xinitrc" -title "*** xinitrc ***" -bg bisque -e bash -i
438
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 340
diff changeset
    48