【Tricks】Gedit的配置与计算器

Part 1. Gedit的配置

在拓展工具里创建新工具Complie

#!/bin/sh  
fullname=$GEDIT_CURRENT_DOCUMENT_NAME  
name=`echo $fullname | cut -d. -f1`  
suffix=`echo $fullname | cut -d. -f2`  
    
g++ $fullname -o $name

在拓展工具里创建新工具Run

#!/bin/sh
fullname=$GEDIT_CURRENT_DOCUMENT_NAME  
name=`echo $fullname | cut -d. -f1`  
suffix=`echo $fullname | cut -d. -f2`  
dir=$GEDIT_CURRENT_DOCUMENT_DIR
    
gnome-terminal --working-directory=$dir -x bash -c "$dir/$name; echo; echo 'press ENTER to continue'; read"

Part 2. 计算器

NOI Linux下似乎没有图形界面的计算器
于是只能在终端中输入bc来使用命令行计算器
话说这货还挺好用的,唯一的问题就是:默认所有数全部为整数
我们需要使用scale=x来指定精度,x可以是任意自然数

—————————— UPD 2017.5.15 ——————————
被$Menci$啪啪啪 QwQ
请在终端中输入$xcalc$,有惊喜

—————————— UPD 2017.6.13 ——————————
学Python了,弃疗xcalc

3 thoughts to “【Tricks】Gedit的配置与计算器”

  1. There are some fascinating deadlines on this article but I don’t know if I see all of them heart to heart. There’s some validity but I’ll take maintain opinion until I look into it further. Good article , thanks and we wish more! Added to FeedBurner as nicely

Leave a Reply

Your email address will not be published. Required fields are marked *