소스 검색

first commit

Pierre B 4 년 전
커밋
50c69d7c3d
20개의 변경된 파일572개의 추가작업 그리고 0개의 파일을 삭제
  1. 19 0
      .Xdefaults
  2. 182 0
      .config/i3/config
  3. BIN
      .config/images/lockicon.png
  4. BIN
      .config/images/wallpaper.png
  5. 9 0
      .config/lock.sh
  6. 4 0
      .config/nitrogen/bg-saved.cfg
  7. 12 0
      .config/nitrogen/nitrogen.cfg
  8. 22 0
      .config/rofi/config
  9. 54 0
      .conkyrc
  10. 51 0
      .i3status.conf
  11. 33 0
      .vimrc
  12. 9 0
      .xinitrc
  13. 14 0
      README.md
  14. BIN
      background.jpg
  15. 1 0
      doas.conf
  16. 38 0
      install.sh
  17. BIN
      openbsd-dark/background.png
  18. BIN
      openbsd-dark/panel.png
  19. 31 0
      openbsd-dark/slim.theme
  20. 93 0
      slim.conf

+ 19 - 0
.Xdefaults

@@ -0,0 +1,19 @@
+#xterm*Background:		black
+#xterm*Foreground:		light grey		
+#xterm*cursorColor:		blue
+#xterm*faceName:			Liberation Mono:size=10:antialias=true
+#xterm*bellIsUrgent:		true
+
+
+#URxvt*saveLines:		999120
+URxvt*foreground:		White
+URxvt*background:		Black
+URxvt*transparent:		true
+URxvt*shading:			15	
+URxvt*scrollBar:		false
+URxvt*inheritPixmap:		true
+
+urxvt*font:			xft:Liberation Mono:pixelsize=11:xft:Inconsolata
+urxvt*boldFont:			xft:Liberation Mono:pixelsize=11:style=bold
+urxvt*italicFont:		xft:Liberation Mono:pixelsize=11:style=italic
+urxvt*boldItalicFont:		xft:Liberation Mono:pixelsize=11:style=bold italic

+ 182 - 0
.config/i3/config

@@ -0,0 +1,182 @@
+# This file has been auto-generated by i3-config-wizard(1).
+# It will not be overwritten, so edit it as you like.
+#
+# Should you change your keyboard layout some time, delete
+# this file and re-run i3-config-wizard(1).
+#
+
+# i3 config file (v4)
+#
+# Please see https://i3wm.org/docs/userguide.html for a complete reference!
+
+set $mod Mod4
+
+# Font for window titles. Will also be used by the bar unless a different font
+# is used in the bar {} block below.
+font pango:monospace 8
+
+# This font is widely installed, provides lots of unicode glyphs, right-to-left
+# text rendering and scalability on retina/hidpi displays (thanks to pango).
+#font pango:DejaVu Sans Mono 8
+
+# The combination of xss-lock, nm-applet and pactl is a popular choice, so
+# they are included here as an example. Modify as you see fit.
+
+# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
+# screen before suspend. Use loginctl lock-session to lock your screen.
+#exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
+
+# NetworkManager is the most popular way to manage wireless networks on Linux,
+# and nm-applet is a desktop environment-independent system tray GUI for it.
+#exec --no-startup-id nm-applet
+
+# Use pactl to adjust volume in PulseAudio.
+#set $refresh_i3status killall -SIGUSR1 i3status
+#bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
+#bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
+#bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
+#bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
+
+# Use Mouse+$mod to drag floating windows to their wanted position
+floating_modifier $mod
+
+# start a terminal
+bindsym $mod+Return exec /usr/local/bin/urxvt 
+
+# kill focused window
+bindsym $mod+Shift+q kill
+
+# start dmenu (a program launcher)
+bindsym $mod+d exec /usr/local/bin/dmenu_run
+# There also is the (new) i3-dmenu-desktop which only displays applications
+# shipping a .desktop file. It is a wrapper around dmenu, so you need that
+# installed.
+# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
+
+# change focus
+bindsym $mod+j focus left
+bindsym $mod+k focus down
+bindsym $mod+l focus up
+bindsym $mod+semicolon focus right
+
+# alternatively, you can use the cursor keys:
+bindsym $mod+Left focus left
+bindsym $mod+Down focus down
+bindsym $mod+Up focus up
+bindsym $mod+Right focus right
+
+# move focused window
+bindsym $mod+Shift+j move left
+bindsym $mod+Shift+k move down
+bindsym $mod+Shift+l move up
+bindsym $mod+Shift+semicolon move right
+
+# alternatively, you can use the cursor keys:
+bindsym $mod+Shift+Left move left
+bindsym $mod+Shift+Down move down
+bindsym $mod+Shift+Up move up
+bindsym $mod+Shift+Right move right
+
+# split in horizontal orientation
+bindsym $mod+h split h
+
+# split in vertical orientation
+bindsym $mod+v split v
+
+# enter fullscreen mode for the focused container
+bindsym $mod+f fullscreen toggle
+
+# change container layout (stacked, tabbed, toggle split)
+bindsym $mod+s layout stacking
+bindsym $mod+w layout tabbed
+bindsym $mod+e layout toggle split
+
+# toggle tiling / floating
+bindsym $mod+Shift+space floating toggle
+
+# change focus between tiling / floating windows
+bindsym $mod+space focus mode_toggle
+
+# focus the parent container
+bindsym $mod+a focus parent
+
+# focus the child container
+#bindsym $mod+d focus child
+
+# Define names for default workspaces for which we configure key bindings later on.
+# We use variables to avoid repeating the names in multiple places.
+set $ws1 "1"
+set $ws2 "2"
+set $ws3 "3"
+set $ws4 "4"
+set $ws5 "5"
+set $ws6 "6"
+set $ws7 "7"
+set $ws8 "8"
+set $ws9 "9"
+set $ws10 "10"
+
+# switch to workspace
+bindsym $mod+1 workspace number $ws1
+bindsym $mod+2 workspace number $ws2
+bindsym $mod+3 workspace number $ws3
+bindsym $mod+4 workspace number $ws4
+bindsym $mod+5 workspace number $ws5
+bindsym $mod+6 workspace number $ws6
+bindsym $mod+7 workspace number $ws7
+bindsym $mod+8 workspace number $ws8
+bindsym $mod+9 workspace number $ws9
+bindsym $mod+0 workspace number $ws10
+
+# move focused container to workspace
+bindsym $mod+Shift+1 move container to workspace number $ws1
+bindsym $mod+Shift+2 move container to workspace number $ws2
+bindsym $mod+Shift+3 move container to workspace number $ws3
+bindsym $mod+Shift+4 move container to workspace number $ws4
+bindsym $mod+Shift+5 move container to workspace number $ws5
+bindsym $mod+Shift+6 move container to workspace number $ws6
+bindsym $mod+Shift+7 move container to workspace number $ws7
+bindsym $mod+Shift+8 move container to workspace number $ws8
+bindsym $mod+Shift+9 move container to workspace number $ws9
+bindsym $mod+Shift+0 move container to workspace number $ws10
+
+# reload the configuration file
+bindsym $mod+Shift+c reload
+# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
+bindsym $mod+Shift+r restart
+# exit i3 (logs you out of your X session)
+bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
+
+# resize window (you can also use the mouse for that)
+mode "resize" {
+        # These bindings trigger as soon as you enter the resize mode
+
+        # Pressing left will shrink the window’s width.
+        # Pressing right will grow the window’s width.
+        # Pressing up will shrink the window’s height.
+        # Pressing down will grow the window’s height.
+        bindsym j resize shrink width 10 px or 10 ppt
+        bindsym k resize grow height 10 px or 10 ppt
+        bindsym l resize shrink height 10 px or 10 ppt
+        bindsym semicolon resize grow width 10 px or 10 ppt
+
+        # same bindings, but for the arrow keys
+        bindsym Left resize shrink width 10 px or 10 ppt
+        bindsym Down resize grow height 10 px or 10 ppt
+        bindsym Up resize shrink height 10 px or 10 ppt
+        bindsym Right resize grow width 10 px or 10 ppt
+
+        # back to normal: Enter or Escape or $mod+r
+        bindsym Return mode "default"
+        bindsym Escape mode "default"
+        bindsym $mod+r mode "default"
+}
+
+bindsym $mod+r mode "resize"
+
+# Start i3bar to display a workspace bar (plus the system information i3status
+# finds out, if available)
+bar {
+	position top
+        status_command i3status
+}

BIN
.config/images/lockicon.png


BIN
.config/images/wallpaper.png


+ 9 - 0
.config/lock.sh

@@ -0,0 +1,9 @@
+#!/bin/sh
+
+icon="$HOME/.config/images/lockicon.png"
+tmpbg='/tmp/screen.png'
+
+scrot "$tmpbg"
+convert "$tmpbg" -scale 10% -scale 1000% "$tmpbg"
+convert "$tmpbg" "$icon" -gravity center -composite -matte "$tmpbg"
+i3lock -u -i "$tmpbg"

+ 4 - 0
.config/nitrogen/bg-saved.cfg

@@ -0,0 +1,4 @@
+[xin_-1]
+file=/home/pierre/.background.jpg
+mode=2
+bgcolor=#000000

+ 12 - 0
.config/nitrogen/nitrogen.cfg

@@ -0,0 +1,12 @@
+[geometry]
+posx=640
+posy=37
+sizex=636
+sizey=761
+
+[nitrogen]
+view=icon
+recurse=true
+sort=alpha
+icon_caps=false
+dirs=/home/pierre;

+ 22 - 0
.config/rofi/config

@@ -0,0 +1,22 @@
+rofi.color-enabled: true
+
+! Window:           'background', 'border', 'separator'
+rofi.color-window:  #1e1e1e,      #1e1e1e,  #ffffff
+
+!   State:         'bg',    'fg',    'altbg', 'hlbg',  hlfg
+rofi.color-normal: #1e1e1e, #ffffff, #1e1e1e, #2e2e2e, #ffffff
+rofi.color-active: #1e1e1e, #ffffff, #1e1e1e, #2e2e2e, #252936
+rofi.color-urgent: #1e1e1e, #ffffff, #1e1e1e, #2e2e2e, #ed3245
+
+rofi.width: 50
+rofi.padding: 0
+rofi.line-margin: 1
+rofi.lines: 10
+rofi.columns: 1
+rofi.separator-style: none
+rofi.font: mono 12
+rofi.bw: 8
+rofi.eh: 1
+rofi.hide-scrollbar: false
+rofi.scrollbar-width: 4
+rofi.display-drun: run

+ 54 - 0
.conkyrc

@@ -0,0 +1,54 @@
+# General settings.
+background yes
+use_xft yes
+xftfont Mono:size=8
+xftalpha 1
+update_interval 1
+total_run_times 0
+own_window no
+own_window_transparent yes
+double_buffer yes
+minimum_size 200 250
+maximum_width 200
+draw_shades yes
+default_color white
+default_shade_color black
+default_outline_color white
+alignment top_right
+gap_x 5
+gap_y 5
+no_buffers yes
+cpu_avg_samples 2
+
+# Text and graphs.
+TEXT
+${font mono:bold:size=8}SYSTEM ${hr 2}
+${font mono:normal:size=8}$sysname $kernel/$machine
+Host:$alignr$nodename
+Uptime:$alignr$uptime
+RAM:$alignr$mem/$memmax
+Swap usage:$alignr$swap/$swapmax
+Disk usage:$alignr${fs_used /} of ${fs_size /}
+${fs_bar 6 /}
+ 
+${font Mono:bold:size=8}PROCESSOR ${hr 2}
+${font Mono:normal:size=8}${top name 1} $alignr ${top pid 1} ${top cpu 1}
+${top name 2} $alignr ${top pid 2} ${top cpu 2}
+${top name 3} $alignr ${top pid 3} ${top cpu 3}
+${top name 4} $alignr ${top pid 4} ${top cpu 4}
+${top name 5} $alignr ${top pid 5} ${top cpu 5}
+Total CPU usage:$alignr${cpu cpu0}%
+${cpugraph 000000 ffffff}
+ 
+${font Mono:bold:size=8}MEMORY ${hr 2}
+${font Mono:normal:size=8}${top_mem name 1}${alignr}${top mem 1}%
+${top_mem name 2}${alignr}${top mem 2}%
+$font${top_mem name 3}${alignr}${top mem 3}%
+$font${top_mem name 4}${alignr}${top mem 4}%
+$font${top_mem name 5}${alignr}${top mem 5}%
+ 
+${font Mono:bold:size=8}NETWORK ${hr 2}
+${font Mono:normal:size=8}IP address: $alignr ${addr em0}
+${downspeedgraph em0}
+Inbound ${downspeed em0} kb/s $alignr Total: ${totaldown em0}
+Outbound ${upspeed em0} kb/s $alignr Total: ${totalup em0}

+ 51 - 0
.i3status.conf

@@ -0,0 +1,51 @@
+# i3status configuration file.
+# see "man i3status" for documentation.
+
+# It is important that this file is edited as UTF-8.
+# The following line should contain a sharp s:
+# ß
+# If the above line is not correctly displayed, fix your editor first!
+
+general {
+    colors = true
+    interval = 2
+    color_good = "#6298e0"
+    color_bad = "#808080"
+    color_degraded = "#faffff"
+    output_format = i3bar
+}
+
+order += "ipv6"
+order += "disk /"
+order += "wireless _first_"
+order += "ethernet _first_"
+order += "battery all"
+order += "load"
+order += "tztime local"
+
+wireless _first_ {
+    format_up = "W: (%quality at %essid) %ip"
+    format_down = "W: down"
+}
+
+ethernet _first_ {
+    # if you use %speed, i3status requires root privileges
+    format_up = "E: %ip (%speed)"
+    format_down = "E: down"
+}
+
+battery all {
+    format = "%status %percentage %remaining"
+}
+
+tztime local {
+    format = "%Y-%m-%d %H:%M:%S"
+}
+
+load {
+    format = "%1min"
+}
+
+disk "/" {
+    format = "%avail"
+}

+ 33 - 0
.vimrc

@@ -0,0 +1,33 @@
+set linebreak
+set number
+set showcmd
+set showmatch
+set wildmenu
+filetype indent on
+syntax on
+
+set expandtab
+set tabstop=4
+set shiftwidth=4
+set softtabstop=4
+set backspace=indent,eol,start
+
+set autoindent
+set smartindent
+
+set incsearch
+set hlsearch
+set ignorecase
+set smartcase
+
+set complete-=i
+set encoding=utf-8
+set display+=lastline
+
+set completeopt=menuone,preview,longest
+
+inoremap {<CR> {<CR>}<Esc>O
+inoremap ( ()<Left>
+inoremap { {}<Left>
+inoremap <expr> ) getline('.')[col('.')-1] == ")" ? "\<Right>" : ")"
+inoremap <expr> } getline('.')[col('.')-1] == "}" ? "\<Right>" : "}"

+ 9 - 0
.xinitrc

@@ -0,0 +1,9 @@
+conky &
+nitrogen --restore &
+
+xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation" 1
+xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Button" 2
+xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Axes" 6 7 4 5 
+
+export LANG=fr_FR.UTF-8
+exec i3 

+ 14 - 0
README.md

@@ -0,0 +1,14 @@
+# dotfiles
+
+My OpenBSD dotfiles.
+
+## How to install
+
+1. If the user account doesn't exist, create it (`adduser(8)`) and configure `doas(1)`.
+2. Run the following commands:
+```
+$ tmpdir=$(mktemp -d)
+$ ftp -Vo - https://codeload.github.com/crhenr/dotfiles/tar.gz/master | tar zxf - -C $tmpdir
+$ doas /$tmpdir/dotfiles-master/install.sh
+$ rm -fr $tmpdir
+```

BIN
background.jpg


+ 1 - 0
doas.conf

@@ -0,0 +1 @@
+permit nopass :wheel

+ 38 - 0
install.sh

@@ -0,0 +1,38 @@
+#!/bin/sh
+
+echo -n "Install additional software? [y/n] "
+read install
+
+echo -n "Move dotfiles to which user? "
+read user
+
+if [[ $install == y ]]; then
+    pkg_add firefox vlc git vim 
+fi
+
+echo "[*] Installing necessary software..."
+pkg_add feh conky i3 i3status nitrogen pcmanfm dmenu i3lock scrot rofi ImageMagick slim slim-themes zsh curl wget screen iftop htop
+
+echo "[*] Copying dotfiles..."
+cp .conkyrc /home/$user/.conkyrc
+cp .vimrc /home/$user/.vimrc
+cp .Xdefaults /home/$user/.Xdefaults
+cp -r .config /home/$user/
+cp .i3status.conf /home/$user/
+cp .xinitrc /home/$user/
+cp background.jpg /home/$user/.background.jpg
+cp doas.conf /etc/
+cp slim.conf /etc/
+
+chown -R $user /home/$user
+
+cp -R ./openbsd-dark /usr/local/share/slim/themes/
+
+
+echo "[*] Activate some services..."
+rcctl enable avahi_daemon
+rcctl enable slim
+rcctl disable xenodm
+
+
+echo "[*] Done."

BIN
openbsd-dark/background.png


BIN
openbsd-dark/panel.png


+ 31 - 0
openbsd-dark/slim.theme

@@ -0,0 +1,31 @@
+# Text messages for startup, shutdown, reboot, etc.
+msg_color               #eeeeee
+msg_font                Mono:size=10:bold:dpi=96
+msg_x                   50%
+msg_y                   70%
+
+# valid values: stretch, tile
+background_style        stretch
+background_color        #000000
+
+# input box controls
+input_font          	Mono:size=10:bold:dpi=96
+input_fgcolor           #000000
+# panel location
+input_panel_x           50%
+input_panel_y           50%
+input_name_x            75
+input_name_y            258
+# force single input box (gdm style)
+input_pass_x            -1
+input_pass_y            -1
+
+# Username/password request text
+username_font           Mono:size=10:bold:dpi=96
+username_color        	#eeeeee
+username_x              66
+username_y              235
+password_x              66
+password_y              235
+username_msg            Username:
+password_msg            Password:

+ 93 - 0
slim.conf

@@ -0,0 +1,93 @@
+# Path, X server and arguments (if needed)
+# Note: -xauth $authfile is automatically appended
+default_path        /bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
+default_xserver     /usr/X11R6/bin/X
+xserver_arguments   vt05
+
+# Commands for halt, login, etc.
+halt_cmd            /sbin/shutdown -ph now
+reboot_cmd          /sbin/shutdown -r now
+console_cmd         /usr/X11R6/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/usr/bin/head -1 /etc/motd; exec /usr/bin/login"
+#suspend_cmd        /usr/sbin/suspend
+
+# Full path to the xauth binary
+xauth_path         /usr/X11R6/bin/xauth 
+
+# Xauth file for server
+authfile           /var/run/slim.auth
+
+
+# Activate numlock when slim starts. Valid values: on|off
+# numlock             on
+
+# Hide the mouse cursor (note: does not work with some WMs).
+# Valid values: true|false
+# hidecursor          false
+
+# This command is executed after a succesful login.
+# you can place the %session and %theme variables
+# to handle launching of specific commands in .xinitrc
+# depending of chosen session and slim theme
+#
+# NOTE: if your system does not have bash you need
+# to adjust the command according to your preferred shell,
+# i.e. for freebsd use:
+login_cmd           exec /bin/sh -l ~/.xinitrc %session
+# login_cmd           exec /bin/bash -login ~/.xinitrc %session
+
+# Commands executed when starting and exiting a session.
+# They can be used for registering a X11 session with
+# sessreg. You can use the %user variable
+#
+
+# transfer /dev/drm0 ownership to the logged in user
+sessionstart_cmd	chown %user /dev/drm0
+sessionstop_cmd	chown root /dev/drm0
+
+# Start in daemon mode. Valid values: yes | no
+# Note that this can be overriden by the command line
+# options "-d" and "-nodaemon"
+# daemon	yes
+
+# Available sessions (first one is the default).
+# The current chosen session name is replaced in the login_cmd
+# above, so your login command can handle different sessions.
+# see the xinitrc.sample file shipped with slim sources
+sessions            xfce4,icewm-session,wmaker,blackbox
+
+# Executed when pressing F11 (requires imagemagick)
+screenshot_cmd      import -window root /tmp/slim.png
+
+# welcome message. Available variables: %host, %domain
+welcome_msg         Welcome to %host
+
+# Session message. Prepended to the session name when pressing F1
+# session_msg         Session: 
+
+# shutdown / reboot messages
+shutdown_msg       The system is halting...
+reboot_msg         The system is rebooting...
+
+# default user, leave blank or remove this line
+# for avoid pre-loading the username.
+#default_user        simone
+
+# Focus the password field on start when default_user is set
+# Set to "yes" to enable this feature
+#focus_password      no
+
+# Automatically login the default user (without entering
+# the password. Set to "yes" to enable this feature
+#auto_login          no
+
+
+# current theme, use comma separated list to specify a set to 
+# randomly choose from
+current_theme       openbsd-dark
+
+# Lock file
+lockfile            /var/run/slim.pid
+
+# Log file
+logfile             /var/log/slim.log
+