Skip to content

Instantly share code, notes, and snippets.

@10sr
Last active December 13, 2015 07:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 10sr/8949566 to your computer and use it in GitHub Desktop.
Save 10sr/8949566 to your computer and use it in GitHub Desktop.

General Recommendations - ArchWiki

ユーザ追加

https://wiki.archlinux.org/index.php/Users_and_Groups

# useradd -m -g [initial_group] -G [additional_groups] -s [login_shell] [username]
# gpasswd -a [username] [group]

サービス

TLP - ArchWiki

laptop-mode tools の代わりに使ってみることにした。

電源周り

acpid は古いらしい。

Power Management - ArchWiki

/etc/systemd/logind.conf に電源ボタンとかの設定がある。

電源ボタンで hibernate 、蓋を閉じるとサスペンドにする。

systemctl suspend, とか使える。 systemctl hibernate はなんだか失敗した。 swap がないから

結局したこととしては、 /etc/fstab で ext4 のエントリに discard を加えた。

始めは有効になってない。

# systemctl start cronie
# systemctl enable cronie

コンソールフォント

Fonts - ArchWiki, Keyboard Configuration in Console - ArchWiki

フォントのあるディレクトリは /usr/share/kbd/consolefont 。 setfont を使ってフォントを試せる。 LatGrkCyr-8x16 を使うので、 /etc/vconsole.conf に FONT=LatGrkCyr-8x16 を追加。

Swapfile and Hibernate

画面が砂嵐になって失敗してる。

Swap file

Swap - ArchWiki

# fallocate -l 4G /swapfile_4g
# chmod 600 /swapfile_4g
# mkswap /swapfile_4g
# swapon /swapfile_4g
# vi /etc/fstab
## /swapfile_4g none swap defaults 0 0

Hibernate

Suspend and Hibernate - ArchWiki

# vi /boot/refind_linux.conf
## "Boot with standsard options" に
## resume=/dev/disk/by-uuid/<uuid for />
## resume=offset=<swap file offset>
## を追加する。
## オフセットは、 filefrag -v /swapfile_4g 実行して physical_offset の始めの値にする。
# vi /etc/mkinitcpio.conf
## HOOKS に resume を追加する。
# mkinitcpio -p linux

日本語入力

必要なものを入れる。

# pacman -S fcitx-im fcitx-mozc fcitx-gtk2 fcitx-configtool

~/.xinitrc に以下を追加

export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
fcitx

英数、かなのキーがわからなかったので fcitx-configtool を使う。入力してみたところ、 Hangul と Hangulhanja に見えるらしい。 拡張オプションの表示にチェックをして、入力メソッドのオン、オフにそれぞれ指定する。

まず、 notification server が必要。

とりあえず、 xfce4-notifyd を使ってみる。設定は xfce4-notifyd-config 。

見た目の設定

  • lxappearance
  • obconf

Config Files

今の状態: https://gist.github.com/10sr/2101119 https://gist.github.com/10sr/1998681

ファイルを xdg からコピーする

$ cp -R /etc/xdg/openbox/* ~/.config/openbox

デフォルトの設定では、 rc.xml から、右クリックは root-menu を表示する。 menu.xml を見ると、 root-menu は一番下で定義されていて、それぞれ上で定義された id のメニューを表示する。

menu.xml に <menu id="xdg-menu" label="Openbox 3" execute="xdg_menu --format openbox3-pipe" /> を追加する。

キーバインド

  • 方針

    • A + : デスクトップ移動
    • Win + : ランチャ
    • Win + z: システム的なメニュー
    • Win + x: アプリケーションメニュー

tint2

  • gsimplecal
  • volumeicon
  • nm-applet (network-manager-applet)

launcher

[synapse}(https://launchpad.net/synapse-project) を使ってみることにした。

他の候補:

  • kupfer
  • gmrun
  • dmenu

pcmanfm

  • gvfs 入れるとゴミ箱とか使えるようになる。

~/.config/user-dirs.dirs を書き換えて全部 .xdg-dirs 以下に作るようにする。

触ってないもの

Printer

https://wiki.archlinux.org/index.php/CUPS

ネットワーク接続されたプリンタを使う。

  1. cups, ghostscript, gsfonts をインストールする
  2. PPD ファイルをダウンロードする。今回 PKGBUILD を作った。 (NOTE: updpkgsums でチェックサムを更新できる)
  3. サービスを有効にする。
# systemctl start cups.service
# systemctl enable cups.service
  1. http://localhost:631/ にアクセスする。
  2. 追加する。確か、「インターネット印刷プロトコル (http) 」で socket://xxx.xxx.xxx.xxx:9100 を使った。

Problem

MacBook のタッチパッドは右クリックができない。2本指とか使うとできるらしいが不安定すぎるので採用しない(そもそもタップによるクリックは OFF にしてある)。 何か確実に右クリックを発行できるような設定をしたい。

Right Click by Command Key

Add file named /etc/sysctl.d/90-mac_mouse.conf and add these lines:

dev.mac_hid.mouse_button_emulation = 1
dev.mac_hid.mouse_button3_keycode = 126

The keycode 126 can be get by showkey command.

うまくいかなかった方法

2本指クリックで右クリックになる。

右下のクリックで右クリックにする?

$ synclient RBCornerButton=3

xkbset が見つからない…

  • gthumb
  • feh
  • 単機能画像ビューア
    • viewnior 一番よさ気
    • gpicview 大きさ調節してくれない
    • qiv 開けない
    • gimmage 開けない
  • dstat
  • ndcu
  • vinagre --- VNC client
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment