blob: 9079704ac2a50c7bfa8fb1cafaa200ced9710f52 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/bin/bash
#
# Wrapper for Midnight Commander
#
# Parameters
BASENAME="`basename $0`"
MC="/usr/bin/mc"
INI="$HOME/.config/mc/ini"
CONF="`readlink $INI || echo $INI`"
# Dispatch
if [ ! -z "$DISPLAY" ]; then
TERM=xterm-256color $MC $*
else
$MC $*
fi
# Fix configuration
#
# These settings vary from screen size to screen size and
# might change mc's dotfiles whenever it's run on a different
# screen configuration.
#
# If $INI is a link, $CONF will be the link destination.
# That's important because `sed -i` usually breaks the linking.
sed -i '/^left_panel_size=.*$/d' $CONF
sed -i '/^top_panel_size=.*$/d' $CONF
|