Skip to content

Instantly share code, notes, and snippets.

View Hayao0819's full-sized avatar

Yamada Hayao Hayao0819

View GitHub Profile
@Hayao0819
Hayao0819 / 日本語入力インストーラー
Last active December 12, 2019 13:33
ArchLinuxへ日本語入力をセットアップするGUIスクリプト
#!/bin/bash
# 初期化
function window () {
zenity \
--title="ArchLinux 日本語入力 インストーラー" \
--window-icon="/usr/share/icons/Papirus-Dark/16x16/apps/mozc.svg" \
--width="500" \
--height="100" \
@Hayao0819
Hayao0819 / aur.bash
Last active December 22, 2019 04:48
package-gui-installer用のAURビルドスクリプト
#!/usr/bin/env bash
## 変数
working_directory=/tmp/build
export_directory=/tmp
## Rootチェック
if [[ $UID = 0 ]]; then
echo "Rootで実行しないでください。"
@Hayao0819
Hayao0819 / search.sh
Last active December 24, 2019 03:08
指定したディレクトリ内のテキストファイルをcatで開き、検索語句があればそのファイルのパスを表示するスクリプト search.sh [ディレクトリ] [検索語句]
#!/usr/bin/env bash
if [[ ! -d $1 || -z $1 ]]; then
echo "ディレクトリを指定してください。"
exit 1
fi
if [[ -z $2 ]]; then
echo "検索する語句がありません。"
exit 1
@Hayao0819
Hayao0819 / install.sh
Last active December 27, 2019 05:37
Serene-Startdash-Installer
#!/usr/bin/env bash
if [[ -z $(dpkg --get-selections | awk '{pirnt $1}' | grep pacapt) ]]; then
curl -sL -o /tmp/pacapt-installer.sh https://raw.githubusercontent.com/Hayao0819/pacapt-installer/master/pacapt-installer.bash
chmod +x /tmp/pacapt-installer.sh
sudo /tmp/pacapt-installer.sh 2
sudo apt --yes install jq zenity
fi
@Hayao0819
Hayao0819 / updater
Last active January 11, 2020 15:02
EG-Installer-Updater
#!/usr/bin/env bash
#-- 設定 --#
eg_installer="/usr/bin/eg-installer"
#-- 関数定義 --#
# ウィンドウの基本型
function window () {
@Hayao0819
Hayao0819 / 女の子
Created January 17, 2020 12:37
好きな子に告白するスクリプト
#!/usr/bin/env bash
export PS1="女の子 < "
function sudo () {
echo "You are not in the sudoers file" 1>&2
return 1
}
function 好きです!付き合ってください () {
#!/usr/bin/env bash
#-- CUI --#
# 赤(エラー時)
function echo_r () {
echo -e "\033[1;31m$@\033[0;39m" >&2
return 0
}
@Hayao0819
Hayao0819 / mouse-speed
Last active January 27, 2020 11:25
Xfce環境でマウスの速度を簡単に変更できるスクリプト
#!/usr/bin/env bash
# 設定
setting="$HOME/.mouse-speed"
# setting="$HOME/Desktop/config"
# 現在のマウスの一覧を取得
mouse_list=$(xfconf-query -c pointers -vl | grep Acceleration | awk '{print $1}')
mouse_list=${mouse_list//\/Acceleration//}
@Hayao0819
Hayao0819 / ping-gen
Created February 1, 2020 02:35
引数にsvgを指定することで、freedesktopのhicolorに準拠したpngイメージを生成できます。
#!/usr/bin/env bash
size=(16 20 22 24 32 36 40 48 64 72 96 128 192 256 480 512 1024)
current_path=$(cd $(dirname ${0}) && pwd)/$(basename ${0})
current_dir=$(cd $(dirname ${0}) && pwd)
out=${current_dir}/out
function error_cli () { echo -e ${@} >&2; }
#!/usr/bin/env bash
## ArchLinux PackageList Ganarater
output="./alpg-list.txt"
comm -23 <(pacman -Qeq | sort) <(pacman -Qgq base base-devel | sort) >> $output