#下半年工作计划#
##dde-daemon 完善##
###总体任务###
整理优化代码,保持结构清晰,去除冗余代码
逐步使用go
替换c
代码
#下半年工作计划#
##dde-daemon 完善##
###总体任务###
整理优化代码,保持结构清晰,去除冗余代码
逐步使用go
替换c
代码
//Compile: gcc xgrabkey.c `pkg-config --cflags --libs x11` | |
#include <stdio.h> | |
#include <X11/Xlib.h> | |
int | |
main () | |
{ | |
Window root; | |
Display *dpy = NULL; |
#此类配置可以在命令行模式中输入show-options -g查询 | |
#窗口的初始序号;默认为0,这里设置为1 | |
set-option -g base-index 1 | |
#提示信息的持续时间;设置足够的时间以避免看不清提示,单位为毫秒 | |
set-option -g display-time 5000 | |
#控制台激活后的持续时间;设置合适的时间以避免每次操作都要先激活控制台,单位为毫秒 | |
set-option -g repeat-time 1000 | |
#操作状态栏时的默认键盘布局;可以设置为vi或emacs | |
set-option -g status-keys vi | |
#状态栏右方的内容;这里的设置将得到类似23:59的显示 |
" 关闭兼容模式 | |
set nocompatible | |
filetype off " required | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#begin() | |
"let Vundle manager Vundle | |
"required! | |
Bundle 'gmarik/vundle' |
# | |
# ~/.bashrc | |
# | |
# If not running interactively, don't do anything | |
[[ $- != *i* ]] && return | |
# launch tmux | |
#test -z "$TMUX" && (tmux attach || tmux new-session) |
func encodeURI(str string) string { | |
filepath, ok := objUtil.URIToPath(str) | |
if !ok { | |
return "" | |
} | |
u := url.URL{} | |
u.Path = filepath | |
v, _ := objUtil.PathToFileURI(u.String()) | |
return v |
package main | |
import ( | |
"fmt" | |
"github.com/howeyc/fsnotify" | |
"os" | |
"regexp" | |
"sync" | |
"time" | |
) |
package main | |
import ( | |
"fmt" | |
"github.com/howeyc/fsnotify" | |
"regexp" | |
) | |
func main() { | |
watcher, err := fsnotify.NewWatcher() |
type polkitSubject struct { | |
/* | |
* The following kinds of subjects are known: | |
* Unix Process: should be set to unix-process with keys | |
* pid (of type uint32) and | |
* start-time (of type uint64) | |
* Unix Session: should be set to unix-session with the key | |
* session-id (of type string) | |
* System Bus Name: should be set to system-bus-name with the key | |
* name (of type string) |