From 60ec1a2b7e00683148be631050f5dc0a9f2d5bcc Mon Sep 17 00:00:00 2001 From: Ian Adam Naval Date: Fri, 24 Apr 2015 13:12:01 -0400 Subject: [PATCH] Switch to rofi from dmenu --- X11/Xresources.dotfile | 36 ++++++++++++++++++++++++++++++++++++ i3/i3.dotfile/config | 20 +++++++++++--------- i3/i3.dotfile/passmenu | 4 +++- 3 files changed, 50 insertions(+), 10 deletions(-) diff --git a/X11/Xresources.dotfile b/X11/Xresources.dotfile index 47a6954..22a1a0e 100644 --- a/X11/Xresources.dotfile +++ b/X11/Xresources.dotfile @@ -45,6 +45,42 @@ xterm*toolBar: false xterm*metaSendsEscape: true xterm*borderWidth: 0 +rofi.modi: window,run,ssh +rofi.opacity: 100 +rofi.width: 720 +rofi.lines: 5 +rofi.columns: 1 +rofi.font: Meslo LG S DZ 10 +rofi.fg: #f8f8f2 +rofi.bg: #252525 +rofi.bgalt: #252525 +rofi.hlfg: #f8f8f2 +rofi.hlbg: #600 +rofi.bc: #252525 +rofi.bw: 0 +rofi.location: 2 +rofi.padding: 0 +rofi.yoffset: 26 +rofi.xoffset: 0 +rofi.fixed-num-lines: false +rofi.terminal: urxvt +rofi.ssh-client: ssh +rofi.ssh-command: {terminal} -e {ssh-client} {host} +rofi.run-command: {cmd} +rofi.run-list-command: +rofi.run-shell-command: {terminal} -e {cmd} +rofi.disable-history: false +rofi.levenshtein-sort: false +rofi.case-sensitive: false +rofi.sidebar-mode: false +rofi.lazy-filter-limit: 5000 +rofi.eh: 1 +rofi.auto-select: false +rofi.pid: /run/user/1000/rofi.pid +rofi.key-window: +rofi.key-run: +rofi.key-ssh: + *.cursorBlink: true *.foreground: #f8f8f2 *.background: #252525 diff --git a/i3/i3.dotfile/config b/i3/i3.dotfile/config index f15cbf6..f01fc1e 100644 --- a/i3/i3.dotfile/config +++ b/i3/i3.dotfile/config @@ -10,7 +10,6 @@ set $mod Mod4 set $lock lock -set $run_passmenu ~/.i3/passmenu --type -i -sb '#800' -nb '#252525' -fn 'Meslo LG S DZ-10' -hist ~/.passmenu_history -h 26 # Font for window titles. Will also be used by the bar unless a different font # is used in the bar {} block below. ISO 10646 = Unicode @@ -33,10 +32,12 @@ bindsym $mod+Shift+Return exec terminator bindsym $mod+q kill # start dmenu (a program launcher) #bindsym $mod+d exec dmenu_run -sb "#880000" -bindsym $mod+d exec --no-startup-id j4-dmenu-desktop --dmenu="dmenu -i -sb '#800' -nb '#252525' -fn 'Meslo LG S DZ-10' -hist ~/.dmenu_history -h 26" -bindsym $mod+Shift+d exec --no-startup-id dmenu_run -i -sb '#800' -nb '#252525' -fn 'Meslo LG S DZ-10' -hist ~/.dmenu_history -h 26 -bindsym $mod+p exec --no-startup-id $run_passmenu -bindsym $mod+Shift+p exec --no-startup-id ~/.i3/passmenu -i -sb '#800' -nb '#252525' -fn 'Meslo LG S DZ-10' -hist ~/.passmenu_history -h 26 +#bindsym $mod+d exec --no-startup-id j4-dmenu-desktop --dmenu="dmenu -i -sb '#800' -nb '#252525' -fn 'Meslo LG S DZ-10' -hist ~/.dmenu_history -h 26" +bindsym $mod+d exec --no-startup-id rofi -show run +bindsym $mod+Shift+d exec --no-startup-id j4-dmenu-desktop --dmenu="rofi -dmenu -p run" +bindsym $mod+p exec --no-startup-id ~/.i3/passmenu --type +bindsym $mod+Shift+p exec --no-startup-id ~/.i3/passmenu +bindsym $mod+n exec --no-startup-id nmcli_dmenu -i -sb '#800' -nb '#252525' -fn 'Meslo LG S DZ-10' -h 26 # 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. @@ -137,10 +138,11 @@ bindsym XF86MonBrightnessDown exec xbacklight -dec 5 # decrease screen brightnes bindsym Shift+XF86MonBrightnessUp exec xbacklight -inc 1 # increase screen brightness bindsym Shift+XF86MonBrightnessDown exec xbacklight -dec 1 # decrease screen brightness -bindsym XF86Tools exec --no-startup-id j4-dmenu-desktop --dmenu="dmenu -i -sb '#800' -nb '#252525' -fn 'Meslo LG S DZ-8' -hist ~/.dmenu_history -h 24" -bindsym XF86Search exec --no-startup-id j4-dmenu-desktop --dmenu="dmenu -i -sb '#800' -nb '#252525' -fn 'Meslo LG S DZ-8' -hist ~/.dmenu_history -h 24" -bindsym XF86LaunchA exec --no-startup-id $run_passmenu -bindsym XF86Explorer exec --no-startup-id j4-dmenu-desktop --dmenu="dmenu -i -sb '#800' -nb '#252525' -fn 'Meslo LG S DZ-8' -hist ~/.dmenu_history -h 24" +bindsym XF86Tools exec --no-startup-id rofi -show ssh +bindsym XF86Search exec --no-startup-id rofi -show fm -switchers 'fm:fmenu-rofi' +bindsym XF86LaunchA exec --no-startup-id rofi -show window +bindsym XF86Explorer exec --no-startup-id rofi -show run +bindsym Mod1+Tab exec --no-startup-id rofi -show window bindsym Print exec gnome-screenshot -i diff --git a/i3/i3.dotfile/passmenu b/i3/i3.dotfile/passmenu index 9e82168..98f4930 100755 --- a/i3/i3.dotfile/passmenu +++ b/i3/i3.dotfile/passmenu @@ -8,12 +8,14 @@ if [[ $1 == "--type" ]]; then shift fi +prompt="pass" + prefix=${PASSWORD_STORE_DIR-~/.password-store} password_files=( "$prefix"/**/*.gpg ) password_files=( "${password_files[@]#"$prefix"/}" ) password_files=( "${password_files[@]%.gpg}" ) -password=$(printf '%s\n' "${password_files[@]}" | dmenu "$@") +password=$(printf '%s\n' "${password_files[@]}" | rofi -dmenu -p "$prompt" "$@") [[ -n $password ]] || exit